Notify on p2p failure

And terminate conenction with this peer
Fix #95
This commit is contained in:
Daniel Berteaud 2015-03-17 18:20:21 +01:00
parent c1d1aaf58b
commit 6773c19138
3 changed files with 14 additions and 0 deletions

View File

@ -18,6 +18,7 @@ our %Lexicon = (
"ERROR_DB_UNAVAILABLE" => "The database is not available",
"ERROR_DB_VERSION_MISMATCH" => "The database must be updated",
"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",
"EMAIL_INVITATION" => "Video conference invitation",
"INVITE_SENT_TO_s" => "An invitation was sent to the following addresses\n%s",

View File

@ -20,6 +20,7 @@ our %Lexicon = (
"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_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",
"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. " .

View File

@ -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
webrtc.connection.socket.on('disconnect', function(){
setTimeout(function(){