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 SmallVideo object not making a difference between an audio and a video stream, which was causing FireFox issues with large video set to the audio stream.

yanasfe2804f474a0
diff --git a/modules/UI/videolayout/LocalVideo.js b/modules/UI/videolayout/LocalVideo.js
index 05118ca328..a2bd7bed0e 100644
--- a/modules/UI/videolayout/LocalVideo.js
+++ b/modules/UI/videolayout/LocalVideo.js
@@ -148,7 +148,7 @@ LocalVideo.prototype.createConnectionIndicator = function() {
};
LocalVideo.prototype.changeVideo = function (stream) {
- this.stream = stream;
+ this.videoStream = stream;
let localVideoClick = (event) => {
// FIXME: with Temasys plugin event arg is not an event, but
diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js
index 7ec01cd0bd..1d24748243 100644
--- a/modules/UI/videolayout/RemoteVideo.js
+++ b/modules/UI/videolayout/RemoteVideo.js
@@ -143,7 +143,7 @@ if (!interfaceConfig.filmStripOnly) {
* Removes the remote stream element corresponding to the given stream and
* parent container.
*
- * @param stream the stream
+ * @param stream the MediaStream
* @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
*/
RemoteVideo.prototype.removeRemoteStreamElement =
@@ -219,9 +219,8 @@ RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
return;
}
- this.stream = stream;
-
let isVideo = stream.isVideoTrack();
+ isVideo ? this.videoStream = stream : this.audioStream = stream;
// Add click handler.
let onClickHandler = (event) => {
@@ -250,7 +249,7 @@ RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
let sel = $(`#${newElementId}`);
- // If the container is currently visible we attach the stream.
+ // If the container is currently visible we attach the stream to the element.
if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
this.waitForPlayback(sel, stream);
diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js
index ccb5d856be..9b2e264857 100644
--- a/modules/UI/videolayout/SmallVideo.js
+++ b/modules/UI/videolayout/SmallVideo.js
@@ -9,7 +9,8 @@ function SmallVideo() {
this.isMuted = false;
this.hasAvatar = false;
this.isVideoMuted = false;
- this.stream = null;
+ this.videoStream = null;
+ this.audioStream = null;
}
function setVisibility(selector, show) {
@@ -18,8 +19,8 @@ function setVisibility(selector, show) {
}
}
-/**
- * Indicates if this small video is currently visible.
+
+/* Indicates if this small video is currently visible.
*
* @return <tt>true</tt> if this small video isn't currently visible and
* <tt>false</tt> - otherwise.
@@ -370,7 +371,7 @@ SmallVideo.prototype.updateView = function () {
} else {
// We want to show the avatar when the video is muted or not exists
// that is when 'true' or 'null' is returned
- showAvatar = !this.stream || this.stream.isMuted();
+ showAvatar = !this.videoStream || this.videoStream.isMuted();
}
showAvatar = showAvatar && !isCurrentlyOnLarge;
diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js
index be4130dd3a..6805410483 100644
--- a/modules/UI/videolayout/VideoLayout.js
+++ b/modules/UI/videolayout/VideoLayout.js
@@ -49,7 +49,7 @@ function onContactClicked (id) {
if (remoteVideo && remoteVideo.selectVideoElement().length) {
// It is not always the case that a videoThumb exists (if there is
// no actual video).
- if (remoteVideo.stream) {
+ if (remoteVideo.videoStream) {
// We have a video src, great! Let's update the large video
// now.
@@ -694,7 +694,7 @@ var VideoLayout = {
if (!remoteVideo.isVisible()) {
console.log("Add to last N", resourceJid);
- remoteVideo.addRemoteStreamElement(remoteVideo.stream);
+ remoteVideo.addRemoteStreamElement(remoteVideo.videoStream);
if (lastNPickupId == resourceJid) {
// Clean up the lastN pickup id.
@@ -709,7 +709,7 @@ var VideoLayout = {
updateLargeVideo = false;
}
remoteVideo.waitForPlayback(
- remoteVideo.selectVideoElement(), remoteVideo.stream);
+ remoteVideo.selectVideoElement(), remoteVideo.videoStream);
}
});
}
@@ -987,7 +987,7 @@ var VideoLayout = {
let videoType = this.getRemoteVideoType(id);
largeVideo.updateLargeVideo(
- smallVideo.stream,
+ smallVideo.videoStream,
videoType
).then(function() {
// update current small video and the old one