From 986651a0790081d5d95ed0a681db28d87f41178b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 15 Feb 2015 22:02:38 +0100 Subject: [PATCH] Print correct message if you select no window in Firefox --- public/js/vroom.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index b914d6d..7b50c88 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -1713,7 +1713,7 @@ function initVroom(room) { webrtc.shareScreen(function(err){ // An error occured while sharing our screen if(err){ - if (err.name == 'EXTENSION_UNAVAILABLE'){ + if (err.name === 'EXTENSION_UNAVAILABLE'){ var ver = 34; if ($.browser.linux){ ver = 35; @@ -1727,7 +1727,10 @@ function initVroom(room) { } // This error usually means you have denied access (old flag way) // or you cancelled screen sharing (new extension way) - else if (err.name == 'PERMISSION_DENIED' || err.name == 'PermissionDeniedError'){ + // or you select no window (in Firefox) + else if (err.name === 'PERMISSION_DENIED' || + err.name === 'PermissionDeniedError' || + err.name === 'ConstraintNotSatisfiedError'){ cantShare(locale.SCREEN_SHARING_CANCELLED); } else{