Notify on p2p failure

And terminate conenction with this peer
Fix #95
master
Daniel Berteaud 10 years ago
parent c1d1aaf58b
commit 6773c19138
  1. 1
      lib/Vroom/I18N/en.pm
  2. 1
      lib/Vroom/I18N/fr.pm
  3. 12
      public/js/vroom.js

@ -18,6 +18,7 @@ our %Lexicon = (
"ERROR_DB_UNAVAILABLE" => "The database is not available", "ERROR_DB_UNAVAILABLE" => "The database is not available",
"ERROR_DB_VERSION_MISMATCH" => "The database must be updated", "ERROR_DB_VERSION_MISMATCH" => "The database must be updated",
"ERROR_TOO_MANY_MEMBERS" => "This room reached its members limit", "ERROR_TOO_MANY_MEMBERS" => "This room reached its members limit",
"ERROR_ESTABLISHING_P2P" => "Cannot establish a connection with a participant",
"JS_REQUIRED" => "VROOM needs javascript to work properly", "JS_REQUIRED" => "VROOM needs javascript to work properly",
"EMAIL_INVITATION" => "Video conference invitation", "EMAIL_INVITATION" => "Video conference invitation",
"INVITE_SENT_TO_s" => "An invitation was sent to the following addresses\n%s", "INVITE_SENT_TO_s" => "An invitation was sent to the following addresses\n%s",

@ -20,6 +20,7 @@ our %Lexicon = (
"ERROR_DB_UNAVAILABLE" => "La base de données n'est pas accessible", "ERROR_DB_UNAVAILABLE" => "La base de données n'est pas accessible",
"ERROR_DB_VERSION_MISMATCH" => "La base de donnée doit être mise à jour", "ERROR_DB_VERSION_MISMATCH" => "La base de donnée doit être mise à jour",
"ERROR_TOO_MANY_MEMBERS" => "Ce salon a atteint sa limite de participants", "ERROR_TOO_MANY_MEMBERS" => "Ce salon a atteint sa limite de participants",
"ERROR_ESTABLISHING_P2P" => "Impossible d'établir une connexion avec un des participants",
"JS_REQUIRED" => "VROOM nécessite l'activation du javascript", "JS_REQUIRED" => "VROOM nécessite l'activation du javascript",
"EMAIL_INVITATION" => "Invitation à une conférence vidéo", "EMAIL_INVITATION" => "Invitation à une conférence vidéo",
"YOU_ARE_INVITED_TO_A_MEETING" => "Vous êtes attendu sur un salon de vidéo conférence. " . "YOU_ARE_INVITED_TO_A_MEETING" => "Vous êtes attendu sur un salon de vidéo conférence. " .

@ -1631,6 +1631,18 @@ function initVroom(room) {
} }
}); });
// Display an error if an error occures during p2p connection
function p2pFailure(peer){
peer.end();
$.notify(localize('ERROR_ESTABLISHING_P2P'));
}
webrtc.on('iceFailed', function(peer){
p2pFailure(peer);
});
webrtc.on('connectivityError', function(peer){
p2pFailure(peer);
});
// Detect connection lost // Detect connection lost
webrtc.connection.socket.on('disconnect', function(){ webrtc.connection.socket.on('disconnect', function(){
setTimeout(function(){ setTimeout(function(){

Loading…
Cancel
Save