How to select video/audio source devices
PowZone opened this issue · comments
Paolo Faccini commented
Browser: Chrome
OS: Windows 10
Hello,
I have several video and audio sources configured on my pc.
Can I configure RecordRTC to record from the sources I choose?
Thanks
Paolo Faccini commented
Solved.
Get list of devices:
navigator.mediaDevices.enumerateDevices().then(function(da){
console.log(da);
}).catch(function(err){
console.log('navigator.MediaDevices.getUserMedia error: ', err.message, err.name);
});
Modified code of the default example:
navigator.mediaDevices.getUserMedia({
video: {
deviceId: da[selectedCameraIndex].deviceId,
},
audio: {
deviceId: "default",
}
}).then(async function(stream) {
....