From 9e93ce75d17d8d2ff5e3dd6028fec561a7587792 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 2 Jun 2016 14:41:21 +0200 Subject: [PATCH] Newer Firefox changed the error name when screensharing is not allowed Update this so the screen sharing help modal dialog opens correctly --- public/js/vroom.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index 5f3da9c..19b0f98 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -2009,11 +2009,12 @@ function initVroom(room) { // This error usually means you have denied access (old flag way) // or you cancelled screen sharing (new extension way) // or you select no window (in Firefox) - else if (err.name === 'PermissionDeniedError' && $.browser.mozilla){ + else if ((err.name === 'PermissionDeniedError' || err.name === 'SecurityError') && $.browser.mozilla){ $('#firefoxShareScreenModal').modal('show'); } else if (err.name === 'PERMISSION_DENIED' || err.name === 'PermissionDeniedError' || + err.name === 'SecurityError' || err.name === 'ConstraintNotSatisfiedError'){ cantShare(localize('SCREEN_SHARING_CANCELLED')); }