From 0c16518025be02e576058d91553fcec8fd6798c5 Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Wed, 16 May 2018 13:53:06 -0300 Subject: [PATCH] add specific messages to permissions errors --- .../ui/components/video-provider/component.jsx | 15 ++++++++++++++- bigbluebutton-html5/private/locales/en.json | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/component.jsx b/bigbluebutton-html5/imports/ui/components/video-provider/component.jsx index f5f1fccf55..79ae66e7fc 100755 --- a/bigbluebutton-html5/imports/ui/components/video-provider/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/video-provider/component.jsx @@ -32,6 +32,18 @@ const intlMessages = defineMessages({ id: 'app.video.chromeExtensionErrorLink', description: 'Error message for Chrome Extension not installed', }, + NotFoundError: { + id: 'app.video.notFoundError', + description: 'error message when can not get webcam video', + }, + NotAllowedError: { + id: 'app.video.notAllowed', + description: 'error message when webcam had permission denied', + }, + NotSupportedError: { + id: 'app.video.notSupportedError', + description: 'error message when origin do not have ssl valid', + }, }); const CAMERA_SHARE_FAILED_WAIT_TIME = 10000; @@ -364,7 +376,8 @@ class VideoProvider extends Component { if (error) { log('error', ' WebRTC peerObj create error'); log('error', error); - that.notifyError(intl.formatMessage(intlMessages.permissionError)); + const errorMessage = intlMessages[error.name] || intlMessages.permissionError; + that.notifyError(intl.formatMessage(errorMessage)); /* This notification error is displayed considering kurento-utils * returned the error 'The request is not allowed by the user agent * or the platform in the current context.', but there are other diff --git a/bigbluebutton-html5/private/locales/en.json b/bigbluebutton-html5/private/locales/en.json index a264c8204f..3b39da2a6e 100755 --- a/bigbluebutton-html5/private/locales/en.json +++ b/bigbluebutton-html5/private/locales/en.json @@ -315,6 +315,9 @@ "app.video.iceCandidateError": "Error on adding ice candidate", "app.video.permissionError": "Error on sharing webcam. Please check permissions", "app.video.sharingError": "Error on sharing webcam", + "app.video.notFoundError": "Could not get webcam video. Please make sure it's connected", + "app.video.notAllowed": "missing permission for share webcam, please make sure your browser permissions", + "app.video.notSupportedError": "can share webcam video only with safe sources, make sure your SSL certificate is valid", "app.video.swapCam": "Swap", "app.video.swapCamDesc": "swap the direction of webcams", "app.video.videoMenu": "Video menu",