|
@@ -16,7 +16,6 @@ import PanelToggler from "../side_pannels/SidePanelToggler";
|
16
|
16
|
const RTCUIUtil = JitsiMeetJS.util.RTCUIHelper;
|
17
|
17
|
|
18
|
18
|
var remoteVideos = {};
|
19
|
|
-var remoteVideoTypes = {};
|
20
|
19
|
var localVideoThumbnail = null;
|
21
|
20
|
|
22
|
21
|
var currentDominantSpeaker = null;
|
|
@@ -277,10 +276,11 @@ var VideoLayout = {
|
277
|
276
|
/**
|
278
|
277
|
* Return the type of the remote video.
|
279
|
278
|
* @param id the id for the remote video
|
280
|
|
- * @returns the video type video or screen.
|
|
279
|
+ * @returns {String} the video type video or screen.
|
281
|
280
|
*/
|
282
|
281
|
getRemoteVideoType (id) {
|
283
|
|
- return remoteVideoTypes[id];
|
|
282
|
+ let smallVideo = VideoLayout.getSmallVideo(id);
|
|
283
|
+ return smallVideo ? smallVideo.getVideoType() : null;
|
284
|
284
|
},
|
285
|
285
|
|
286
|
286
|
handleVideoThumbClicked (noPinnedEndpointChangedEvent,
|
|
@@ -340,10 +340,12 @@ var VideoLayout = {
|
340
|
340
|
remoteVideo = new RemoteVideo(id, VideoLayout, eventEmitter);
|
341
|
341
|
remoteVideos[id] = remoteVideo;
|
342
|
342
|
|
343
|
|
- let videoType = remoteVideoTypes[id];
|
344
|
|
- if (videoType) {
|
345
|
|
- remoteVideo.setVideoType(videoType);
|
|
343
|
+ let videoType = VideoLayout.getRemoteVideoType(id);
|
|
344
|
+ if (!videoType) {
|
|
345
|
+ // make video type the default one (camera)
|
|
346
|
+ videoType = VideoContainerType;
|
346
|
347
|
}
|
|
348
|
+ remoteVideo.setVideoType(videoType);
|
347
|
349
|
|
348
|
350
|
// In case this is not currently in the last n we don't show it.
|
349
|
351
|
if (localLastNCount && localLastNCount > 0 &&
|
|
@@ -754,12 +756,11 @@ var VideoLayout = {
|
754
|
756
|
},
|
755
|
757
|
|
756
|
758
|
onVideoTypeChanged (id, newVideoType) {
|
757
|
|
- if (remoteVideoTypes[id] === newVideoType) {
|
|
759
|
+ if (VideoLayout.getRemoteVideoType(id) === newVideoType) {
|
758
|
760
|
return;
|
759
|
761
|
}
|
760
|
762
|
|
761
|
763
|
console.info("Peer video type changed: ", id, newVideoType);
|
762
|
|
- remoteVideoTypes[id] = newVideoType;
|
763
|
764
|
|
764
|
765
|
var smallVideo;
|
765
|
766
|
if (APP.conference.isLocalId(id)) {
|
|
@@ -773,8 +774,8 @@ var VideoLayout = {
|
773
|
774
|
} else {
|
774
|
775
|
return;
|
775
|
776
|
}
|
776
|
|
-
|
777
|
777
|
smallVideo.setVideoType(newVideoType);
|
|
778
|
+
|
778
|
779
|
if (this.isCurrentlyOnLarge(id)) {
|
779
|
780
|
this.updateLargeVideo(id, true);
|
780
|
781
|
}
|