Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes for FF: failing avatar tests and problem when last participant leaves the owner video does not switch to local video.

damenchofd954580b71b
diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js
index c62784e7c8..1d0c1ffcbd 100644
--- a/modules/UI/videolayout/RemoteVideo.js
+++ b/modules/UI/videolayout/RemoteVideo.js
@@ -4,6 +4,7 @@ var SmallVideo = require("./SmallVideo");
var AudioLevels = require("../audio_levels/AudioLevels");
var RTCBrowserType = require("../../RTC/RTCBrowserType");
var UIUtils = require("../util/UIUtil");
+var XMPPEvents = require("../../../service/xmpp/XMPPEvents");
function RemoteVideo(peerJid, VideoLayout) {
this.peerJid = peerJid;
@@ -232,6 +233,19 @@ RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {
};
+ /**
+ * FF is missing onended event for remote streams. The problem we are fixing
+ * here is when the last participant leaves the room the video element is
+ * not updated. So the avatar or last video frame will stay, the fix updates
+ * the video elem and switches to local video the same as behavior in other
+ * browsers.
+ */
+ if (RTCBrowserType.isFirefox()) {
+ APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) {
+ self.removeRemoteStreamElement(stream, isVideo, newElementId);
+ });
+ }
+
// Add click handler.
var onClickHandler = function (event) {