|
@@ -1,4 +1,4 @@
|
1
|
|
-/* global $, APP, interfaceConfig */
|
|
1
|
+/* global $, interfaceConfig */
|
2
|
2
|
/* jshint -W101 */
|
3
|
3
|
|
4
|
4
|
import Filmstrip from './Filmstrip';
|
|
@@ -11,22 +11,6 @@ export const VIDEO_CONTAINER_TYPE = "camera";
|
11
|
11
|
|
12
|
12
|
const FADE_DURATION_MS = 300;
|
13
|
13
|
|
14
|
|
-/**
|
15
|
|
- * Get stream id.
|
16
|
|
- * @param {JitsiTrack?} stream
|
17
|
|
- */
|
18
|
|
-function getStreamOwnerId(stream) {
|
19
|
|
- if (!stream) {
|
20
|
|
- return;
|
21
|
|
- }
|
22
|
|
- // local stream doesn't have method "getParticipantId"
|
23
|
|
- if (stream.isLocal()) {
|
24
|
|
- return APP.conference.getMyUserId();
|
25
|
|
- } else {
|
26
|
|
- return stream.getParticipantId();
|
27
|
|
- }
|
28
|
|
-}
|
29
|
|
-
|
30
|
14
|
/**
|
31
|
15
|
* Returns an array of the video dimensions, so that it keeps it's aspect
|
32
|
16
|
* ratio and fits available area with it's larger dimension. This method
|
|
@@ -171,7 +155,7 @@ export class VideoContainer extends LargeContainer {
|
171
|
155
|
}
|
172
|
156
|
|
173
|
157
|
get id () {
|
174
|
|
- return getStreamOwnerId(this.stream);
|
|
158
|
+ return this.userId;
|
175
|
159
|
}
|
176
|
160
|
|
177
|
161
|
/**
|
|
@@ -184,6 +168,7 @@ export class VideoContainer extends LargeContainer {
|
184
|
168
|
constructor (resizeContainer, emitter) {
|
185
|
169
|
super();
|
186
|
170
|
this.stream = null;
|
|
171
|
+ this.userId = null;
|
187
|
172
|
this.videoType = null;
|
188
|
173
|
this.localFlipX = true;
|
189
|
174
|
this.emitter = emitter;
|
|
@@ -410,10 +395,12 @@ export class VideoContainer extends LargeContainer {
|
410
|
395
|
|
411
|
396
|
/**
|
412
|
397
|
* Update video stream.
|
|
398
|
+ * @param {string} userID
|
413
|
399
|
* @param {JitsiTrack?} stream new stream
|
414
|
400
|
* @param {string} videoType video type
|
415
|
401
|
*/
|
416
|
|
- setStream (stream, videoType) {
|
|
402
|
+ setStream (userID, stream, videoType) {
|
|
403
|
+ this.userId = userID;
|
417
|
404
|
if (this.stream === stream) {
|
418
|
405
|
// Handles the use case for the remote participants when the
|
419
|
406
|
// videoType is received with delay after turning on/off the
|