Mark screen unshared just before doing so

Fix #67
master
Daniel Berteaud 11 years ago
parent 003d094625
commit 68228482d6
  1. 4
      public/js/vroom.js

@ -1269,7 +1269,7 @@ function initVroom(room) {
id = id + '_screen'; id = id + '_screen';
} }
// Or the peer itself // Or the peer itself
else if (peer && peers[peer.id]){ else if (peer && peers[peer.id] && id != 'local'){
delete peers[peer.id]; delete peers[peer.id];
} }
$("#peer_" + id).hide(300); $("#peer_" + id).hide(300);
@ -1504,10 +1504,10 @@ function initVroom(room) {
}); });
} }
else{ else{
peers.local.screenShared = false;
webrtc.stopScreenShare(); webrtc.stopScreenShare();
$('#shareScreenLabel').removeClass('btn-danger'); $('#shareScreenLabel').removeClass('btn-danger');
$.notify(locale.SCREEN_UNSHARED, 'success'); $.notify(locale.SCREEN_UNSHARED, 'success');
peers.local.screenShared = false;
} }
}); });

Loading…
Cancel
Save