nextcloud / spreed

🗨️ Nextcloud Talk – chat, video & audio calls for Nextcloud
https://nextcloud.com/talk
GNU Affero General Public License v3.0
1.63k stars 434 forks source link

Video calls app allow selecting camera and microphone #358

Closed Tomasu closed 4 years ago

Tomasu commented 7 years ago

This is just a feature request, I'd like to be able to select which camera and microphone is used for calls. Currently it seems to default to the first one found. A brief look suggests that webrtc allows selecting both input and output devices.

MariusBluem commented 7 years ago

You are able to change this client-side in your browser settings ;)

Tomasu commented 7 years ago

I was unable to find an option for that in chrome on Linux.

On July 15, 2017 2:01:24 AM Marius Blüm notifications@github.com wrote:

You are able to change this client-side in your browser settings ;)

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/nextcloud/spreed/issues/358#issuecomment-315517905

Tomasu commented 7 years ago

I finally found the option. It seems to be burried in the privacy settings? But it would be very nice if it was a simple selector in the app itself.

small1 commented 7 years ago

This should be an app setting. I started looking at it right now and found the setting for it. But for a normal deadly user, fiddling with browser settings is just not an option :)

nickvergessen commented 7 years ago

Well sorry, but we can't do anything there. The browser provides us what you gave access to. Nothing we can do.

Tomasu commented 7 years ago

Which api are you using? Webrtc totally allows the user/app to select sources:

https://webrtc.github.io/samples/src/content/devices/input-output/

fancycode commented 7 years ago

Yeah, there is an API to select the camera/mic from the app, so I would rather keep this issue open as a feature request.

krodelabestiole commented 6 years ago

add to this that some users (including myself) might not want to use the same audio device to listen to music or watch video on youtube (speakers) and to communicate (headset with mic). I don't know if any browser has any way to differentiate default audio devices from audio communication devices, but I'm pretty sure most of them don't.

Peterede commented 5 years ago

It is relatively simple to select an audio or video device using the config.media setting and passing the deviceId.
var audioSource = audioSelect.value; var videoSource = videoSelect.value;

  OCA.SpreedMe.webrtc.config.media = {
    audio: {
      optional: [{sourceId: audioSource}]
    },
    video: {
      optional: [{sourceId: videoSource}]
    }
  };

to get the sources: navigator.mediaDevices.enumerateDevices().then(gotSources);

function gotSources(sourceInfos) { for (var i = 0; i != sourceInfos.length; ++i) { var sourceInfo = sourceInfos[i]; var option = document.createElement("option"); option.value = sourceInfo.deviceId; if (sourceInfo.kind === 'audioinput') { option.text = sourceInfo.label || 'microphone ' + (audioSelect.length + 1); audioSelect.appendChild(option); } else if (sourceInfo.kind === 'videoinput') { option.text = sourceInfo.label || 'camera ' + (videoSelect.length + 1); videoSelect.appendChild(option); } else { console.log('Some other kind of source: ', sourceInfo); } } }

The user can select the video and/or audio device before connecting the call then the deviceId is passed to startLocalVideo()

Peterede commented 5 years ago

It is relatively simple to select an audio or video device using the config.media setting and passing the deviceId.
var audioSource = audioSelect.value; var videoSource = videoSelect.value;

  OCA.SpreedMe.webrtc.config.media = {
    audio: {
      optional: [{sourceId: audioSource}]
    },
    video: {
      optional: [{sourceId: videoSource}]
    }
  };

to get the sources: navigator.mediaDevices.enumerateDevices().then(gotSources);

function gotSources(sourceInfos) { for (var i = 0; i != sourceInfos.length; ++i) { var sourceInfo = sourceInfos[i]; var option = document.createElement("option"); option.value = sourceInfo.deviceId; if (sourceInfo.kind === 'audioinput') { option.text = sourceInfo.label || 'microphone ' + (audioSelect.length + 1); audioSelect.appendChild(option); } else if (sourceInfo.kind === 'videoinput') { option.text = sourceInfo.label || 'camera ' + (videoSelect.length + 1); videoSelect.appendChild(option); } else { console.log('Some other kind of source: ', sourceInfo); } } }

The user can select the video and/or audio device before connecting the call then the deviceId is passed to startLocalVideo()

cryptoquick commented 5 years ago

I ran into needing this feature when using Vivaldi on Linux. I tried going to chrome://settings/content/camera, but the settings don't seem to work on Nextcloud. It would be really handy to have a way to set this, and ideally, the setting would stay in localStorage or something browser-specific. Settings on that page do work on Chrome, however. I have this problem because I have a ThinkPad with Windows Hello support and it's set as the first camera in the OS. Perhaps I could try disabling the hardware, or something, but ideally, this could be just set in Nextcloud. Further, if I wanted to use my Logitech camera, I'd want that setting, regardless.

nickvergessen commented 4 years ago

First attempt was in https://github.com/nextcloud/spreed/pull/1450

optiprime commented 4 years ago

I didn't find an option for selecting the active camera in Firefox's settings. Talk does not even select the second (external) camera after disabling the first one (notebook internal camera) in the Windows Device-Manager. In this case it just says "No Camera". The WebRTC-based Jitsi-software (https://github.com/jitsi) allows to select camera and microphone from its settings menu. As Jisi is open-source it might be easy to lookup this solution in addition to Peterede's suggestion from above.

mneiger commented 4 years ago

Same as @optiprime here. Similar setting and same results including with Jitsi Thanks guys.

nickvergessen commented 4 years ago

Reopening as it's still not possible doing it while in a call.