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 video mute in Firefox. Disables VideoSSRCHack for Firefox by default.
paweldomasab4c29eddc82
diff --git a/modules/RTC/LocalStream.js b/modules/RTC/LocalStream.jsindex 468cc96f46..acd18ac505 100644--- a/modules/RTC/LocalStream.js+++ b/modules/RTC/LocalStream.js@@ -66,9 +66,11 @@ LocalStream.prototype.setMute = function (mute)var eventType = isAudio ? RTCEvents.AUDIO_MUTE : RTCEvents.VIDEO_MUTE;if ((window.location.protocol != "https:" && this.isGUMStream) ||- (isAudio && this.isGUMStream) || this.videoType === "screen") {- var tracks = this.getTracks();+ (isAudio && this.isGUMStream) || this.videoType === "screen" ||+ // FIXME FF does not support 'removeStream' method used to mute+ RTCBrowserType.isFirefox()) {+ var tracks = this.getTracks();for (var idx = 0; idx < tracks.length; idx++) {tracks[idx].enabled = !mute;}diff --git a/modules/xmpp/VideoSSRCHack.js b/modules/xmpp/VideoSSRCHack.jsindex 5628733591..09ec10a06e 100644--- a/modules/xmpp/VideoSSRCHack.js+++ b/modules/xmpp/VideoSSRCHack.js@@ -19,6 +19,14 @@*/var SDP = require('./SDP');+var RTCBrowserType = require('../RTC/RTCBrowserType');++/**+ * The hack is enabled on all browsers except FF by default+ * FIXME finish the hack once removeStream method is implemented in FF+ * @type {boolean}+ */+var isEnabled = !RTCBrowserType.isFirefox();/*** Stored SSRC of local video stream.@@ -94,6 +102,9 @@ var LocalVideoSSRCHack = {* which will be scanned for local video SSRC.*/processSessionInit: function (sessionInit) {+ if (!isEnabled)+ return;+if (localVideoSSRC) {console.error("Local SSRC stored already: " + localVideoSSRC);return;@@ -109,6 +120,9 @@ var LocalVideoSSRCHack = {* @returns modified <tt>localDescription</tt> object.*/mungeLocalVideoSSRC: function (localDescription) {+ if (!isEnabled)+ return localDescription;+// IF we have local video SSRC stored make sure it is replaced// with old SSRCif (localVideoSSRC) {@@ -144,6 +158,9 @@ var LocalVideoSSRCHack = {* a Strophe IQ Builder instance, but DOM element tree.*/processSourceAdd: function (sourceAdd) {+ if (!isEnabled)+ return sourceAdd;+if (!localVideoSSRC) {// Store local SSRC if availablestoreLocalVideoSSRC(sourceAdd);@@ -163,7 +180,19 @@ var LocalVideoSSRCHack = {* a Strophe IQ Builder instance, but DOM element tree.*/processSourceRemove: function (sourceRemove) {+ if (!isEnabled)+ return sourceRemove;+return filterOutSource(sourceRemove, 'source-remove');+ },++ /**+ * Turns the hack on or off+ * @param enabled <tt>true</tt> to enable the hack or <tt>false</tt>+ * to disable it+ */+ setEnabled: function (enabled) {+ isEnabled = enabled;}};