You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
switch to using new media constraints to allow device selection to work
This commit is contained in:
@@ -1219,6 +1219,8 @@ const _getScreenSharingConstraints = function(call) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const _getUserMediaVideoContraints = function(callType) {
|
const _getUserMediaVideoContraints = function(callType) {
|
||||||
|
const isWebkit = !!global.window.navigator.webkitGetUserMedia;
|
||||||
|
|
||||||
switch (callType) {
|
switch (callType) {
|
||||||
case 'voice':
|
case 'voice':
|
||||||
return {
|
return {
|
||||||
@@ -1232,12 +1234,11 @@ const _getUserMediaVideoContraints = function(callType) {
|
|||||||
deviceId: audioInput ? {exact: audioInput} : undefined,
|
deviceId: audioInput ? {exact: audioInput} : undefined,
|
||||||
}, video: {
|
}, video: {
|
||||||
deviceId: videoInput ? {exact: videoInput} : undefined,
|
deviceId: videoInput ? {exact: videoInput} : undefined,
|
||||||
mandatory: {
|
/* We want 640x360. Chrome will give it only if we ask exactly,
|
||||||
minWidth: 640,
|
FF refuses entirely if we ask exactly, so have to ask for ideal
|
||||||
maxWidth: 640,
|
instead */
|
||||||
minHeight: 360,
|
width: isWebkit ? { exact: 640 } : { ideal: 640 },
|
||||||
maxHeight: 360,
|
height: isWebkit ? { exact: 360 } : { ideal: 360 },
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user