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 a problem with receiving presence for start muted video before creating the stream element, which will end up that the muted video element will hide the avatar.

damencho303287f7a651
diff --git a/modules/RTC/MediaStream.js b/modules/RTC/MediaStream.js
index fc500781e6..3432859565 100644
--- a/modules/RTC/MediaStream.js
+++ b/modules/RTC/MediaStream.js
@@ -54,4 +54,8 @@ MediaStream.prototype.setMute = function (value) {
this.muted = value;
};
+MediaStream.prototype.getMute = function () {
+ return this.muted;
+};
+
module.exports = MediaStream;
diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js
index 5352b22ee9..06fee6ef70 100644
--- a/modules/UI/videolayout/SmallVideo.js
+++ b/modules/UI/videolayout/SmallVideo.js
@@ -112,6 +112,13 @@ SmallVideo.createStreamElement = function (stream) {
: document.createElement('audio');
if (isVideo) {
element.setAttribute("muted", "true");
+
+ // the presence for muted (start muted) can be received before creating
+ // the element, so we need to check here and if that is the case
+ // hide the element
+ if (stream.getMute()) {
+ $(element).hide();
+ }
}
if (!RTCBrowserType.isIExplorer()) {
diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js
index d98a184647..021dc5c179 100644
--- a/modules/UI/videolayout/VideoLayout.js
+++ b/modules/UI/videolayout/VideoLayout.js
@@ -579,6 +579,9 @@ var VideoLayout = (function (my) {
remoteVideo.showVideoIndicator(value);
var el = remoteVideo.selectVideoElement();
+ // the presence and trigger of onVideoMute can be earlier than
+ // creating the stream element. So show and hide can be ignored
+ // we need to take care for them also on creating the stream elem
if (!value)
el.show();
else