Print correct message if you select no window in Firefox

master
Daniel Berteaud 10 years ago
parent cfac2dc3e6
commit 986651a079
  1. 7
      public/js/vroom.js

@ -1713,7 +1713,7 @@ function initVroom(room) {
webrtc.shareScreen(function(err){ webrtc.shareScreen(function(err){
// An error occured while sharing our screen // An error occured while sharing our screen
if(err){ if(err){
if (err.name == 'EXTENSION_UNAVAILABLE'){ if (err.name === 'EXTENSION_UNAVAILABLE'){
var ver = 34; var ver = 34;
if ($.browser.linux){ if ($.browser.linux){
ver = 35; ver = 35;
@ -1727,7 +1727,10 @@ function initVroom(room) {
} }
// This error usually means you have denied access (old flag way) // This error usually means you have denied access (old flag way)
// or you cancelled screen sharing (new extension 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); cantShare(locale.SCREEN_SHARING_CANCELLED);
} }
else{ else{

Loading…
Cancel
Save