From 249d69bdc9ad971c189f346760b0c65106f46e4d Mon Sep 17 00:00:00 2001 From: paweldomas Date: Wed, 18 Jun 2014 19:05:22 +0200 Subject: [PATCH] Quits the conference when too old browser is being used. --- app.js | 10 ++++++++++ libs/strophe/strophe.jingle.session.js | 1 + 2 files changed, 11 insertions(+) diff --git a/app.js b/app.js index 72204e9d8..c7e7a0424 100644 --- a/app.js +++ b/app.js @@ -1114,3 +1114,13 @@ function setView(viewName) { // document.getElementById('videolayout_fullscreen').disabled = true; // } } + +$(document).bind('fatalError.jingle', + function (event, session, error) + { + sessionTerminated = true; + connection.emuc.doLeave(); + openMessageDialog( "Sorry", + "Your browser version is too old. Please update and try again..."); + } +); diff --git a/libs/strophe/strophe.jingle.session.js b/libs/strophe/strophe.jingle.session.js index cb92e2329..1127a78d4 100644 --- a/libs/strophe/strophe.jingle.session.js +++ b/libs/strophe/strophe.jingle.session.js @@ -420,6 +420,7 @@ JingleSession.prototype.setRemoteDescription = function (elem, desctype) { }, function (e) { console.error('setRemoteDescription error', e); + $(document).trigger('fatalError.jingle', [self, e]); } ); };