diff --git a/src/matrix.js b/src/matrix.js index 43d1a1c24..f75e66855 100644 --- a/src/matrix.js +++ b/src/matrix.js @@ -88,21 +88,21 @@ module.exports.createNewMatrixCall = require("./webrtc/call").createNewMatrixCal /** - * Set an audio output device to use for MatrixCalls + * Set a preferred audio output device to use for MatrixCalls * @function * @param {string=} deviceId the identifier for the device * undefined treated as unset */ module.exports.setMatrixCallAudioOutput = require('./webrtc/call').setAudioOutput; /** - * Set an audio input device to use for MatrixCalls + * Set a preferred audio input device to use for MatrixCalls * @function * @param {string=} deviceId the identifier for the device * undefined treated as unset */ module.exports.setMatrixCallAudioInput = require('./webrtc/call').setAudioInput; /** - * Set a video input device to use for MatrixCalls + * Set a preferred video input device to use for MatrixCalls * @function * @param {string=} deviceId the identifier for the device * undefined treated as unset diff --git a/src/webrtc/call.js b/src/webrtc/call.js index 3611c49c1..da3b64de7 100644 --- a/src/webrtc/call.js +++ b/src/webrtc/call.js @@ -583,7 +583,7 @@ MatrixCall.prototype._maybeGotUserMediaForInvite = function(stream) { ' Or possibly you are using an insecure domain. Receiving only.'); this.peerConn = _createPeerConnection(this); } else { - debuglog('Failed to getUserMedia.'); + debuglog('Failed to getUserMedia: ' + error.name); this._getUserMediaFailed(error); return; } @@ -1274,15 +1274,15 @@ const _getUserMediaVideoContraints = function(callType) { case 'voice': return { audio: { - deviceId: audioInput ? {exact: audioInput} : undefined, + deviceId: audioInput ? {ideal: audioInput} : undefined, }, video: false, }; case 'video': return { audio: { - deviceId: audioInput ? {exact: audioInput} : undefined, + deviceId: audioInput ? {ideal: audioInput} : undefined, }, video: { - deviceId: videoInput ? {exact: videoInput} : undefined, + deviceId: videoInput ? {ideal: videoInput} : undefined, /* We want 640x360. Chrome will give it only if we ask exactly, FF refuses entirely if we ask exactly, so have to ask for ideal instead */