|
|
@@ -105,7 +105,10 @@ const VideoLayout = {
|
|
105
|
105
|
init(emitter) {
|
|
106
|
106
|
eventEmitter = emitter;
|
|
107
|
107
|
|
|
108
|
|
- localVideoThumbnail = new LocalVideo(VideoLayout, emitter);
|
|
|
108
|
+ localVideoThumbnail = new LocalVideo(
|
|
|
109
|
+ VideoLayout,
|
|
|
110
|
+ emitter,
|
|
|
111
|
+ this._updateLargeVideoIfDisplayed.bind(this));
|
|
109
|
112
|
|
|
110
|
113
|
// sets default video type of local video
|
|
111
|
114
|
// FIXME container type is totally different thing from the video type
|
|
|
@@ -175,10 +178,7 @@ const VideoLayout = {
|
|
175
|
178
|
|
|
176
|
179
|
localVideoThumbnail.changeVideo(stream);
|
|
177
|
180
|
|
|
178
|
|
- /* Update if we're currently being displayed */
|
|
179
|
|
- if (this.isCurrentlyOnLarge(localId)) {
|
|
180
|
|
- this.updateLargeVideo(localId);
|
|
181
|
|
- }
|
|
|
181
|
+ this._updateLargeVideoIfDisplayed(localId);
|
|
182
|
182
|
},
|
|
183
|
183
|
|
|
184
|
184
|
/**
|
|
|
@@ -348,8 +348,8 @@ const VideoLayout = {
|
|
348
|
348
|
remoteVideo.removeRemoteStreamElement(stream);
|
|
349
|
349
|
}
|
|
350
|
350
|
|
|
351
|
|
- if (stream.isVideoTrack() && this.isCurrentlyOnLarge(id)) {
|
|
352
|
|
- this.updateLargeVideo(id);
|
|
|
351
|
+ if (stream.isVideoTrack()) {
|
|
|
352
|
+ this._updateLargeVideoIfDisplayed(id);
|
|
353
|
353
|
}
|
|
354
|
354
|
|
|
355
|
355
|
this.updateMutedForNoTracks(id, stream.getType());
|
|
|
@@ -1147,6 +1147,20 @@ const VideoLayout = {
|
|
1147
|
1147
|
Object.values(remoteVideos).forEach(
|
|
1148
|
1148
|
remoteVideo => remoteVideo.updateRemoteVideoMenu()
|
|
1149
|
1149
|
);
|
|
|
1150
|
+ },
|
|
|
1151
|
+
|
|
|
1152
|
+ /**
|
|
|
1153
|
+ * Triggers an update of large video if the passed in participant is
|
|
|
1154
|
+ * currently displayed on large video.
|
|
|
1155
|
+ *
|
|
|
1156
|
+ * @param {string} participantId - The participant ID that should trigger an
|
|
|
1157
|
+ * update of large video if displayed.
|
|
|
1158
|
+ * @returns {void}
|
|
|
1159
|
+ */
|
|
|
1160
|
+ _updateLargeVideoIfDisplayed(participantId) {
|
|
|
1161
|
+ if (this.isCurrentlyOnLarge(participantId)) {
|
|
|
1162
|
+ this.updateLargeVideo(participantId);
|
|
|
1163
|
+ }
|
|
1150
|
1164
|
}
|
|
1151
|
1165
|
};
|
|
1152
|
1166
|
|