ref(conference): try video only
Will make an attempt to create video only stream in case microphone permissions were not granted.
This commit is contained in:
parent
de2eee2e61
commit
63377a2f76
|
@ -134,7 +134,8 @@ function connect(roomName) {
|
||||||
*/
|
*/
|
||||||
function createInitialLocalTracksAndConnect(roomName) {
|
function createInitialLocalTracksAndConnect(roomName) {
|
||||||
let audioAndVideoError,
|
let audioAndVideoError,
|
||||||
audioOnlyError;
|
audioOnlyError,
|
||||||
|
videoOnlyError;
|
||||||
|
|
||||||
JitsiMeetJS.mediaDevices.addEventListener(
|
JitsiMeetJS.mediaDevices.addEventListener(
|
||||||
JitsiMeetJS.events.mediaDevices.PERMISSION_PROMPT_IS_SHOWN,
|
JitsiMeetJS.events.mediaDevices.PERMISSION_PROMPT_IS_SHOWN,
|
||||||
|
@ -152,8 +153,14 @@ function createInitialLocalTracksAndConnect(roomName) {
|
||||||
return createLocalTracks({ devices: ['audio'] }, true);
|
return createLocalTracks({ devices: ['audio'] }, true);
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
// If audio failed too then just return empty array for tracks.
|
|
||||||
audioOnlyError = err;
|
audioOnlyError = err;
|
||||||
|
|
||||||
|
// Try video only...
|
||||||
|
return createLocalTracks({ devices: ['video'] }, true);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
videoOnlyError = err;
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -165,7 +172,8 @@ function createInitialLocalTracksAndConnect(roomName) {
|
||||||
// If both requests for 'audio' + 'video' and 'audio' only
|
// If both requests for 'audio' + 'video' and 'audio' only
|
||||||
// failed, we assume that there is some problems with user's
|
// failed, we assume that there is some problems with user's
|
||||||
// microphone and show corresponding dialog.
|
// microphone and show corresponding dialog.
|
||||||
APP.UI.showDeviceErrorDialog(audioOnlyError, null);
|
APP.UI.showDeviceErrorDialog(
|
||||||
|
audioOnlyError, videoOnlyError);
|
||||||
} else {
|
} else {
|
||||||
// If request for 'audio' + 'video' failed, but request for
|
// If request for 'audio' + 'video' failed, but request for
|
||||||
// 'audio' only was OK, we assume that we had problems with
|
// 'audio' only was OK, we assume that we had problems with
|
||||||
|
|
Loading…
Reference in New Issue