From ea431ca90ca3fb8268cf019d6c994b0b15477e52 Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 21 Mar 2018 17:19:01 -0500 Subject: [PATCH] Adds new text for Firefox screen-sharing permission denied error. --- conference.js | 19 +++++++++++++++++-- lang/main.json | 2 ++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/conference.js b/conference.js index a9d84a6d4..c768c4386 100644 --- a/conference.js +++ b/conference.js @@ -1721,8 +1721,23 @@ export default { let titleKey; if (error.name === JitsiTrackErrors.PERMISSION_DENIED) { - descriptionKey = 'dialog.screenSharingPermissionDeniedError'; - titleKey = 'dialog.screenSharingFailedToInstallTitle'; + + // in FF the only option for user is to deny access temporary or + // permanently and we only receive permission_denied + // we always show some info cause in case of permanently, no info + // shown will be bad experience + // + // TODO: detect interval between requesting permissions and received + // error, this way we can detect user interaction which will have + // longer delay + if (JitsiMeetJS.util.browser.isFirefox()) { + descriptionKey + = 'dialog.screenSharingFirefoxPermissionDeniedError'; + titleKey = 'dialog.screenSharingFirefoxPermissionDeniedTitle'; + } else { + descriptionKey = 'dialog.screenSharingPermissionDeniedError'; + titleKey = 'dialog.screenSharingFailedToInstallTitle'; + } } else { descriptionKey = 'dialog.screenSharingFailedToInstall'; titleKey = 'dialog.screenSharingFailedToInstallTitle'; diff --git a/lang/main.json b/lang/main.json index ca113ffaa..ecd96612a 100644 --- a/lang/main.json +++ b/lang/main.json @@ -293,6 +293,8 @@ "permissionDenied": "Permission Denied", "screenSharingFailedToInstall": "Oops! Your screen sharing extension failed to install.", "screenSharingFailedToInstallTitle": "Screen sharing extension failed to install", + "screenSharingFirefoxPermissionDeniedError": "Something went wrong while we were trying to share your screen. Please make sure that you have given us permission to do so. ", + "screenSharingFirefoxPermissionDeniedTitle": "Oops! We weren’t able to start screen sharing!", "screenSharingPermissionDeniedError": "Oops! Something went wrong with your screen sharing extension permissions. Please reload and try again.", "cameraUnsupportedResolutionError": "Your camera does not support required video resolution.", "cameraUnknownError": "Cannot use camera for an unknown reason.",