Chage owner's action buttons depending on the actual status

master
Daniel Berteaud 11 years ago
parent 4327f56a86
commit 8286e77155
  1. 3
      public/css/vroom.css
  2. 4
      public/js/vroom.js

@ -111,17 +111,14 @@
} }
.actionMute:before{ .actionMute:before{
font-family: 'Glyphicons Halflings'; font-family: 'Glyphicons Halflings';
color: red;
content: "\e036"; content: "\e036";
} }
.actionPause:before{ .actionPause:before{
font-family: 'Glyphicons Halflings'; font-family: 'Glyphicons Halflings';
color: red;
content: "\e106"; content: "\e106";
} }
.actionKick:before{ .actionKick:before{
font-family: 'Glyphicons Halflings'; font-family: 'Glyphicons Halflings';
color: red;
content: "\e083"; content: "\e083";
} }
#emailNotificationList { #emailNotificationList {

@ -712,11 +712,13 @@ function initVroom(room) {
var div = 'mute_' + data.id, var div = 'mute_' + data.id,
cl = 'muted'; cl = 'muted';
peers[data.id].micMuted = true; peers[data.id].micMuted = true;
$('#actionMute_' + data.id).addClass('btn-danger');
} }
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; peers[data.id].videoPaused = true;
$('#actionPause_' + data.id).addClass('btn-danger');
} }
else{ else{
return; return;
@ -729,10 +731,12 @@ function initVroom(room) {
if (data.name === 'audio'){ if (data.name === 'audio'){
var el = '#mute_' + data.id; var el = '#mute_' + data.id;
peers[data.id].micMuted = false; peers[data.id].micMuted = false;
$('#actionMute_' + data.id).removeClass('btn-danger');
} }
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; peers[data.id].videoPaused = false;
$('#actionPause_' + data.id).removeClass('btn-danger');
} }
else{ else{
return; return;

Loading…
Cancel
Save