Notify other peers when a password is set

master
Daniel Berteaud 11 years ago
parent 074a5e6785
commit 75709997d9
  1. 2
      lib/Vroom/I18N/en.pm
  2. 2
      lib/Vroom/I18N/fr.pm
  3. 12
      public/js/vroom.js

@ -36,6 +36,8 @@ our %Lexicon = (
"ONE_OF_THE_PEERS" => "one of the peers",
"ROOM_LOCKED_BY_s" => "%s locked the room",
"ROOM_UNLOCKED_BY_s" => "%s unlocked the room",
"PASSWORD_PROTECT_ON_BY_s" => "%s password protected the room",
"PASSWORD_PROTECT_OFF_BY_s" => "%s removed password protection",
"OOOPS" => "Ooops",
"GOODBY" => "Goodby",
"THANKS_SEE_YOU_SOON" => "Thanks and see you soon",

@ -39,6 +39,8 @@ our %Lexicon = (
"ONE_OF_THE_PEERS" => "un des participants",
"ROOM_LOCKED_BY_s" => "%s a verrouillé le salon",
"ROOM_UNLOCKED_BY_s" => "%s a déverrouillé le salon",
"PASSWORD_PROTECT_ON_BY_s" => "%s a protégé le salon par un mot de passe",
"PASSWORD_PROTECT_OFF_BY_s" => "%s a supprimé la protection par mot de passe",
"OOOPS" => "Oups",
"GOODBY" => "Au revoir",
"THANKS_SEE_YOU_SOON" => "Merci et à bientôt",

@ -27,6 +27,8 @@ var locale = {
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: '',
SCREEN_s: '',
TO_INVITE_SHARE_THIS_URL: ''
@ -428,6 +430,14 @@ function initVroom(room) {
$.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');
});
webrtc.on('password_protect_off', function(data){
$.notify(sprintf(locale.PASSWORD_PROTECT_OFF_BY_s, stringEscape(peers[data.id].displayName)), 'info');
});
// Handle the readyToCall event: join the room
webrtc.once('readyToCall', function () {
webrtc.joinRoom(room);
@ -643,6 +653,7 @@ function initVroom(room) {
success: function(data) {
$.notify(data.msg, 'success');
$('#joinPass').val('');
webrtc.sendToAll('password_protect_on', {});
}
});
});
@ -661,6 +672,7 @@ function initVroom(room) {
success: function(data) {
$.notify(data.msg, 'success');
$('#joinPass').val('');
webrtc.sendToAll('password_protect_off', {});
}
});
});

Loading…
Cancel
Save