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
ref(SmallVideo): add 'isCurrentlyOnLargeVideo'
paweldomasfceb512a032a
diff --git a/modules/UI/videolayout/LocalVideo.js b/modules/UI/videolayout/LocalVideo.jsindex 9c2111e4e9..1a070652b6 100644--- a/modules/UI/videolayout/LocalVideo.js+++ b/modules/UI/videolayout/LocalVideo.js@@ -201,7 +201,7 @@ LocalVideo.prototype.changeVideo = function (stream) {localVideoContainer.removeChild(localVideo);// when removing only the video element and we are on stage// update the stage- if(this.VideoLayout.isCurrentlyOnLarge(this.id))+ if(this.isCurrentlyOnLargeVideo())this.VideoLayout.updateLargeVideo(this.id);stream.off(TrackEvents.LOCAL_TRACK_STOPPED, endedHandler);};diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.jsindex 52d3d6220f..85df94bfe5 100644--- a/modules/UI/videolayout/RemoteVideo.js+++ b/modules/UI/videolayout/RemoteVideo.js@@ -223,7 +223,7 @@ RemoteVideo.prototype.removeRemoteStreamElement = function (stream) {// when removing only the video element and we are on stage// update the stage- if (isVideo && this.VideoLayout.isCurrentlyOnLarge(this.id))+ if (isVideo && this.isCurrentlyOnLargeVideo())this.VideoLayout.updateLargeVideo(this.id);};diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.jsindex 87bfe072b6..5cc9769f10 100644--- a/modules/UI/videolayout/SmallVideo.js+++ b/modules/UI/videolayout/SmallVideo.js@@ -369,6 +369,17 @@ SmallVideo.prototype.hasVideo = function () {return this.selectVideoElement().length !== 0;};+/**+ * Checks whether the user associated with this <tt>SmallVideo</tt> is currently+ * being displayed on the "large video".+ *+ * @return {boolean} <tt>true</tt> if the user is displayed on the large video+ * or <tt>false</tt> otherwise.+ */+SmallVideo.prototype.isCurrentlyOnLargeVideo = function () {+ return this.VideoLayout.isCurrentlyOnLarge(this.id);+};+/*** Hides or shows the user's avatar.* This update assumes that large video had been updated and we will@@ -392,7 +403,7 @@ SmallVideo.prototype.updateView = function () {let avatar = this.$avatar;- var isCurrentlyOnLarge = this.VideoLayout.isCurrentlyOnLarge(this.id);+ var isCurrentlyOnLarge = this.isCurrentlyOnLargeVideo();var showVideo = !this.isVideoMuted && !isCurrentlyOnLarge;var showAvatar;