diff --git a/public/js/vroom.js b/public/js/vroom.js index 68dcaff..57d6c29 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -683,25 +683,28 @@ function initVroom(room) { $('#overlay_' + data.id).append('
'); }); - // This peer claims he changed its role (usually from participant to owner) - // Lets check this - webrtc.on('role_change', function(data){ - getPeerRole(data.id); - }); - // Handle unmute/resume webrtc.on('unmute', function(data){ if (data.name === 'audio'){ var el = '#mute_' + data.id; peers[data.id].micMuted = false; } - else { // if (data.name === 'video') + else if (data.name === 'video'){ var el = '#pause_' + data.id; peers[data.id].videoPaused = false; } + else{ + return; + } $(el).remove(); }); + // This peer claims he changed its role (usually from participant to owner) + // Lets check this + webrtc.on('role_change', function(data){ + getPeerRole(data.id); + }); + // A few notif on password set/unset or lock/unlock webrtc.on('room_locked', function(data){ $('#lockLabel').addClass('btn-danger active');