Record peers mute/pause status

master
Daniel Berteaud 11 years ago
parent 24bee4d6f8
commit 4f4bc8397c
  1. 4
      public/js/vroom.js

@ -630,10 +630,12 @@ function initVroom(room) {
showVolume($('#volume_' + data.id), -46); showVolume($('#volume_' + data.id), -46);
var div = 'mute_' + data.id, var div = 'mute_' + data.id,
cl = 'muted'; cl = 'muted';
peers[data.id].micMuted = true;
} }
else if (data.name === 'video'){ else if (data.name === 'video'){
var div = 'pause_' + data.id, var div = 'pause_' + data.id,
cl = 'paused'; cl = 'paused';
peers[data.id].videoPaused = true;
} }
else{ else{
return; return;
@ -651,9 +653,11 @@ function initVroom(room) {
webrtc.on('unmute', function(data){ webrtc.on('unmute', function(data){
if (data.name === 'audio'){ if (data.name === 'audio'){
var el = "#mute_" + data.id; 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; var el = "#pause_" + data.id;
peers[data.id].videoPaused = false;
} }
$(el).remove(); $(el).remove();
}); });

Loading…
Cancel
Save