Remove support for device cookie at the moment
parent
f5bb382ee3
commit
4be0444bf4
|
|
@ -1273,27 +1273,9 @@ export default class RoomClient
|
||||||
|
|
||||||
await this._updateAudioDevices();
|
await this._updateAudioDevices();
|
||||||
|
|
||||||
const devicesCookie = cookiesManager.getDevices();
|
|
||||||
|
|
||||||
let audioDeviceId;
|
|
||||||
|
|
||||||
if (devicesCookie)
|
|
||||||
audioDeviceId = devicesCookie.audioDeviceId;
|
|
||||||
|
|
||||||
logger.debug('_setMicProducer() | calling getUserMedia()');
|
logger.debug('_setMicProducer() | calling getUserMedia()');
|
||||||
|
|
||||||
let stream;
|
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
||||||
|
|
||||||
if (this._audioDevices.has(audioDeviceId))
|
|
||||||
stream = await navigator.mediaDevices.getUserMedia(
|
|
||||||
{
|
|
||||||
audio :
|
|
||||||
{
|
|
||||||
deviceId : { exact: audioDeviceId }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
else
|
|
||||||
stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
||||||
|
|
||||||
const track = stream.getAudioTracks()[0];
|
const track = stream.getAudioTracks()[0];
|
||||||
|
|
||||||
|
|
@ -1512,28 +1494,9 @@ export default class RoomClient
|
||||||
if (!device)
|
if (!device)
|
||||||
throw new Error('no webcam devices');
|
throw new Error('no webcam devices');
|
||||||
|
|
||||||
const devicesCookie = cookiesManager.getDevices();
|
|
||||||
|
|
||||||
let videoDeviceId;
|
|
||||||
|
|
||||||
if (devicesCookie)
|
|
||||||
videoDeviceId = devicesCookie.videoDeviceId;
|
|
||||||
|
|
||||||
logger.debug('_setWebcamProducer() | calling getUserMedia()');
|
logger.debug('_setWebcamProducer() | calling getUserMedia()');
|
||||||
|
|
||||||
let stream;
|
const stream = await navigator.mediaDevices.getUserMedia(
|
||||||
|
|
||||||
if (this._webcams.has(videoDeviceId))
|
|
||||||
stream = await navigator.mediaDevices.getUserMedia(
|
|
||||||
{
|
|
||||||
video :
|
|
||||||
{
|
|
||||||
deviceId : { exact: videoDeviceId },
|
|
||||||
...VIDEO_CONSTRAINS
|
|
||||||
}
|
|
||||||
});
|
|
||||||
else
|
|
||||||
stream = await navigator.mediaDevices.getUserMedia(
|
|
||||||
{
|
{
|
||||||
video :
|
video :
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue