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
Removes remoteVideoTypes and uses the set/get in the small video instances.
damencho5837ef506c20
diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.jsindex 787835b557..3a6e7c2fed 100644--- a/modules/UI/videolayout/VideoLayout.js+++ b/modules/UI/videolayout/VideoLayout.js@@ -16,7 +16,6 @@ import PanelToggler from "../side_pannels/SidePanelToggler";const RTCUIUtil = JitsiMeetJS.util.RTCUIHelper;var remoteVideos = {};-var remoteVideoTypes = {};var localVideoThumbnail = null;var currentDominantSpeaker = null;@@ -277,10 +276,11 @@ var VideoLayout = {/*** Return the type of the remote video.* @param id the id for the remote video- * @returns the video type video or screen.+ * @returns {String} the video type video or screen.*/getRemoteVideoType (id) {- return remoteVideoTypes[id];+ let smallVideo = VideoLayout.getSmallVideo(id);+ return smallVideo ? smallVideo.getVideoType() : null;},handleVideoThumbClicked (noPinnedEndpointChangedEvent,@@ -340,10 +340,12 @@ var VideoLayout = {remoteVideo = new RemoteVideo(id, VideoLayout, eventEmitter);remoteVideos[id] = remoteVideo;- let videoType = remoteVideoTypes[id];- if (videoType) {- remoteVideo.setVideoType(videoType);+ let videoType = VideoLayout.getRemoteVideoType(id);+ if (!videoType) {+ // make video type the default one (camera)+ videoType = VideoContainerType;}+ remoteVideo.setVideoType(videoType);// In case this is not currently in the last n we don't show it.if (localLastNCount && localLastNCount > 0 &&@@ -754,12 +756,11 @@ var VideoLayout = {},onVideoTypeChanged (id, newVideoType) {- if (remoteVideoTypes[id] === newVideoType) {+ if (VideoLayout.getRemoteVideoType(id) === newVideoType) {return;}console.info("Peer video type changed: ", id, newVideoType);- remoteVideoTypes[id] = newVideoType;var smallVideo;if (APP.conference.isLocalId(id)) {@@ -773,8 +774,8 @@ var VideoLayout = {} else {return;}-smallVideo.setVideoType(newVideoType);+if (this.isCurrentlyOnLarge(id)) {this.updateLargeVideo(id, true);}