Fix a crash on IE/Safari when plugin is not installed
This commit is contained in:
parent
71a778b65c
commit
34a24ce290
|
@ -137,30 +137,37 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
// DEVICES LIST
|
// DEVICES LIST
|
||||||
if (JitsiMeetJS.mediaDevices.isDeviceListAvailable() &&
|
JitsiMeetJS.mediaDevices.isDeviceListAvailable()
|
||||||
JitsiMeetJS.mediaDevices.isDeviceChangeAvailable()) {
|
.then((isDeviceListAvailable) => {
|
||||||
this.changeDevicesList([]);
|
if (isDeviceListAvailable &&
|
||||||
|
JitsiMeetJS.mediaDevices.isDeviceChangeAvailable()) {
|
||||||
|
this._initializeDeviceSelectionSettings(emitter);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
$('#selectCamera').change(function () {
|
_initializeDeviceSelectionSettings(emitter) {
|
||||||
let cameraDeviceId = $(this).val();
|
this.changeDevicesList([]);
|
||||||
if (cameraDeviceId !== Settings.getCameraDeviceId()) {
|
|
||||||
emitter.emit(UIEvents.VIDEO_DEVICE_CHANGED, cameraDeviceId);
|
$('#selectCamera').change(function () {
|
||||||
}
|
let cameraDeviceId = $(this).val();
|
||||||
});
|
if (cameraDeviceId !== Settings.getCameraDeviceId()) {
|
||||||
$('#selectMic').change(function () {
|
emitter.emit(UIEvents.VIDEO_DEVICE_CHANGED, cameraDeviceId);
|
||||||
let micDeviceId = $(this).val();
|
}
|
||||||
if (micDeviceId !== Settings.getMicDeviceId()) {
|
});
|
||||||
emitter.emit(UIEvents.AUDIO_DEVICE_CHANGED, micDeviceId);
|
$('#selectMic').change(function () {
|
||||||
}
|
let micDeviceId = $(this).val();
|
||||||
});
|
if (micDeviceId !== Settings.getMicDeviceId()) {
|
||||||
$('#selectAudioOutput').change(function () {
|
emitter.emit(UIEvents.AUDIO_DEVICE_CHANGED, micDeviceId);
|
||||||
let audioOutputDeviceId = $(this).val();
|
}
|
||||||
if (audioOutputDeviceId !== Settings.getAudioOutputDeviceId()) {
|
});
|
||||||
emitter.emit(UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
|
$('#selectAudioOutput').change(function () {
|
||||||
audioOutputDeviceId);
|
let audioOutputDeviceId = $(this).val();
|
||||||
}
|
if (audioOutputDeviceId !== Settings.getAudioOutputDeviceId()) {
|
||||||
});
|
emitter.emit(
|
||||||
}
|
UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED, audioOutputDeviceId);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue