|
|
|
@ -25,8 +25,6 @@ var locale = { |
|
|
|
|
CAM_RESUMED: '', |
|
|
|
|
SET_YOUR_NAME_TO_CHAT: '', |
|
|
|
|
ONE_OF_THE_PEERS: '', |
|
|
|
|
ROOM_LOCKED_BY_s: '', |
|
|
|
|
ROOM_UNLOCKED_BY_s: '', |
|
|
|
|
PASSWORD_PROTECT_ON_BY_s: '', |
|
|
|
|
PASSWORD_PROTECT_OFF_BY_s: '', |
|
|
|
|
CANT_SEND_TO_s: '', |
|
|
|
@ -420,16 +418,6 @@ function initVroom(room) { |
|
|
|
|
$(el).remove(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
webrtc.on('room_locked', function(data){ |
|
|
|
|
$('#lockLabel').addClass('btn-danger active'); |
|
|
|
|
$.notify(sprintf(locale.ROOM_LOCKED_BY_s, stringEscape(peers[data.id].displayName)), 'info'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
webrtc.on('room_unlocked', function(data){ |
|
|
|
|
$('#lockLabel').removeClass('btn-danger active'); |
|
|
|
|
$.notify(sprintf(locale.ROOM_UNLOCKED_BY_s, stringEscape(peers[data.id].displayName)), 'info'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
webrtc.on('password_protect_on', function(data){ |
|
|
|
|
$.notify(sprintf(locale.PASSWORD_PROTECT_ON_BY_s, stringEscape(peers[data.id].displayName)), 'info'); |
|
|
|
|
}); |
|
|
|
@ -523,32 +511,6 @@ function initVroom(room) { |
|
|
|
|
webrtc.sendDirectlyToAll('vroom', 'setDisplayName', $('#displayName').val()); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// Handle room lock/unlock
|
|
|
|
|
$('#lockButton').change(function() { |
|
|
|
|
var action = ($(this).is(":checked")) ? 'lock':'unlock'; |
|
|
|
|
$.ajax({ |
|
|
|
|
data: { |
|
|
|
|
action: action, |
|
|
|
|
room: roomName |
|
|
|
|
}, |
|
|
|
|
error: function(data) { |
|
|
|
|
var msg = (data && data.msg) ? data.msg : locale.ERROR_OCCURED; |
|
|
|
|
$.notify(msg, 'error'); |
|
|
|
|
}, |
|
|
|
|
success: function(data) { |
|
|
|
|
$.notify(data.msg, 'info'); |
|
|
|
|
if (action === 'lock'){ |
|
|
|
|
$("#lockLabel").addClass('btn-danger'); |
|
|
|
|
webrtc.sendToAll('room_locked', {}); |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
$("#lockLabel").removeClass('btn-danger'); |
|
|
|
|
webrtc.sendToAll('room_unlocked', {}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// ScreenSharing
|
|
|
|
|
$('#shareScreenButton').change(function() { |
|
|
|
|
var action = ($(this).is(":checked")) ? 'share':'unshare'; |
|
|
|
|