From 68228482d6a0891dcb9c966b1051107c7f2ae5ec Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 12 Jun 2014 18:22:19 +0200 Subject: [PATCH] Mark screen unshared just before doing so Fix #67 --- public/js/vroom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index 6aa0ce5..445e3c9 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -1269,7 +1269,7 @@ function initVroom(room) { id = id + '_screen'; } // Or the peer itself - else if (peer && peers[peer.id]){ + else if (peer && peers[peer.id] && id != 'local'){ delete peers[peer.id]; } $("#peer_" + id).hide(300); @@ -1504,10 +1504,10 @@ function initVroom(room) { }); } else{ + peers.local.screenShared = false; webrtc.stopScreenShare(); $('#shareScreenLabel').removeClass('btn-danger'); $.notify(locale.SCREEN_UNSHARED, 'success'); - peers.local.screenShared = false; } });