|
@@ -382,18 +382,30 @@ var VideoLayout = {
|
382
|
382
|
},
|
383
|
383
|
|
384
|
384
|
/**
|
385
|
|
- * Creates a participant container for the given id and smallVideo.
|
|
385
|
+ * Creates or adds a participant container for the given id and smallVideo.
|
386
|
386
|
*
|
387
|
|
- * @param id the id of the participant to add
|
|
387
|
+ * @param {JitsiParticipant} user the participant to add
|
388
|
388
|
* @param {SmallVideo} smallVideo optional small video instance to add as a
|
389
|
|
- * remote video, if undefined RemoteVideo will be created
|
|
389
|
+ * remote video, if undefined <tt>RemoteVideo</tt> will be created
|
390
|
390
|
*/
|
391
|
|
- addParticipantContainer (id, smallVideo) {
|
|
391
|
+ addParticipantContainer (user, smallVideo) {
|
|
392
|
+ let id = user.getId();
|
392
|
393
|
let remoteVideo;
|
393
|
394
|
if(smallVideo)
|
394
|
395
|
remoteVideo = smallVideo;
|
395
|
396
|
else
|
396
|
|
- remoteVideo = new RemoteVideo(id, VideoLayout, eventEmitter);
|
|
397
|
+ remoteVideo = new RemoteVideo(user, VideoLayout, eventEmitter);
|
|
398
|
+ this.addRemoteVideoContainer(id, remoteVideo);
|
|
399
|
+ },
|
|
400
|
+
|
|
401
|
+ /**
|
|
402
|
+ * Adds remote video container for the given id and <tt>SmallVideo</tt>.
|
|
403
|
+ *
|
|
404
|
+ * @param {string} the id of the video to add
|
|
405
|
+ * @param {SmallVideo} smallVideo the small video instance to add as a
|
|
406
|
+ * remote video
|
|
407
|
+ */
|
|
408
|
+ addRemoteVideoContainer (id, remoteVideo) {
|
397
|
409
|
remoteVideos[id] = remoteVideo;
|
398
|
410
|
|
399
|
411
|
let videoType = VideoLayout.getRemoteVideoType(id);
|