Newer Firefox changed the error name when screensharing is not allowed

Update this so the screen sharing help modal dialog opens correctly
master
Daniel Berteaud 9 years ago
parent a975142f64
commit 9e93ce75d1
  1. 3
      public/js/vroom.js

@ -2009,11 +2009,12 @@ 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)
// or you select no window (in Firefox) // 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'); $('#firefoxShareScreenModal').modal('show');
} }
else if (err.name === 'PERMISSION_DENIED' || else if (err.name === 'PERMISSION_DENIED' ||
err.name === 'PermissionDeniedError' || err.name === 'PermissionDeniedError' ||
err.name === 'SecurityError' ||
err.name === 'ConstraintNotSatisfiedError'){ err.name === 'ConstraintNotSatisfiedError'){
cantShare(localize('SCREEN_SHARING_CANCELLED')); cantShare(localize('SCREEN_SHARING_CANCELLED'));
} }

Loading…
Cancel
Save