diff --git a/conference.js b/conference.js index c2de11ff3..09d33d011 100644 --- a/conference.js +++ b/conference.js @@ -1056,8 +1056,6 @@ export default { this.useVideoStream(null); this.videoSwitchInProgress = false; console.error('failed to share local video', err); - - APP.UI.showDeviceErrorDialog('camera', err); }); } }, diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 89e1589d0..40b12180d 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -1164,23 +1164,29 @@ UI.showDeviceErrorDialog = function (type, error) { throw new Error("Invalid device type"); } - if (window.localStorage[type + "DoNotShowErrorAgain-" + error.name] - === "true") { + if (error.name && error instanceof JitsiMeetJS.JitsiTrackError && + window.localStorage[type + "DoNotShowErrorAgain-" + error.name] + === "true") { return; } let titleKey = error.name === TrackErrors.PERMISSION_DENIED ? "dialog.permissionDenied" : "dialog.error", - errorMsg = JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP[type][error.name], - doNotShowAgainMsg = "dialog.doNotShowWarningAgain", + errorMsg = JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP[type][error.name] || + JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP[type][TrackErrors.GENERAL], title = ``, - message = ` -
- `; + message = "" + + (!JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP[type][error.name] + && error.message + ? "