Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fixes issue with not working hangup button on FF
hristoterezov9dc9dc36857d
diff --git a/conference.js b/conference.jsindex e48f28814b..93043fe895 100644--- a/conference.js+++ b/conference.js@@ -121,30 +121,49 @@ function muteLocalVideo (muted) {}}+/**+ * Check if the welcome page is enabled and redirects to it.+ */+function maybeRedirectToWelcomePage() {+ if (!config.enableWelcomePage) {+ return;+ }+ // redirect to welcome page+ setTimeout(() => {+ APP.settings.setWelcomePageEnabled(true);+ window.location.pathname = "/";+ }, 3000);+}++/**+ * Executes connection.disconnect and shows the feedback dialog+ * @param {boolean} [requestFeedback=false] if user feedback should be requested+ * @returns Promise.+ */+function disconnectAndShowFeedback(requestFeedback) {+ connection.disconnect();+ if (requestFeedback) {+ return APP.UI.requestFeedback();+ } else {+ return Promise.resolve();+ }+}+/*** Disconnect from the conference and optionally request user feedback.* @param {boolean} [requestFeedback=false] if user feedback should be requested*/function hangup (requestFeedback = false) {- APP.conference._room.leave().then(() => {- connection.disconnect();- if (requestFeedback) {- return APP.UI.requestFeedback();- } else {- return Promise.resolve();- }- }).then(function () {- if (!config.enableWelcomePage) {- return;- }- // redirect to welcome page- setTimeout(() => {- APP.settings.setWelcomePageEnabled(true);- window.location.pathname = "/";- }, 3000);- }, function (err) {- console.error('Failed to hangup the call:', err);- });+ const errCallback = (f, err) => {+ console.error('Error occurred during hanging up: ', err);+ return f();+ };+ const disconnect = disconnectAndShowFeedback.bind(null, requestFeedback);+ APP.conference._room.leave()+ .then(disconnect)+ .catch(errCallback.bind(null, disconnect))+ .then(maybeRedirectToWelcomePage)+ .catch(errCallback.bind(null, maybeRedirectToWelcomePage));}/**