diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index 329f14c..05fdfde 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -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", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index 7d95fd8..d0a110f 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -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. " . diff --git a/public/js/vroom.js b/public/js/vroom.js index 8d063f4..338bff8 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -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(){