Updated resolution handling.

master
Håvar Aambø Fosstveit 2018-06-17 23:14:42 +02:00
parent bca6db0e5e
commit 7857ae27dd
1 changed files with 93 additions and 60 deletions

View File

@ -48,6 +48,9 @@ export default class RoomClient
// Redux store getState function.
this._getState = getState;
// This device
this._device = device;
// My peer name.
this._peerName = peerName;
@ -459,6 +462,16 @@ export default class RoomClient
logger.debug('changeWebcam() | calling getUserMedia()');
if (this._device.flag !== 'chrome')
return navigator.mediaDevices.getUserMedia(
{
video :
{
deviceId : { exact: device.deviceId },
width : { ideal: 3840 }
}
});
else
return navigator.mediaDevices.getUserMedia(
{
video :
@ -550,6 +563,16 @@ export default class RoomClient
logger.debug('changeWebcamResolution() | calling getUserMedia()');
if (this._device.flag !== 'chrome')
return navigator.mediaDevices.getUserMedia(
{
video :
{
deviceId : { exact: device.deviceId },
width : { ideal: 3840 }
}
});
else
return navigator.mediaDevices.getUserMedia(
{
video :
@ -1473,6 +1496,16 @@ export default class RoomClient
logger.debug('_setWebcamProducer() | calling getUserMedia()');
if (this._device.flag !== 'chrome')
return navigator.mediaDevices.getUserMedia(
{
video :
{
deviceId : { exact: device.deviceId },
width : { ideal: 3840 }
}
});
else
return navigator.mediaDevices.getUserMedia(
{
video :