|
|
@@ -6,6 +6,9 @@ var VideoLayout = (function (my) {
|
|
6
|
6
|
updateInProgress: false,
|
|
7
|
7
|
newSrc: ''
|
|
8
|
8
|
};
|
|
|
9
|
+
|
|
|
10
|
+ var defaultLocalDisplayName = "Me";
|
|
|
11
|
+
|
|
9
|
12
|
my.connectionIndicators = {};
|
|
10
|
13
|
|
|
11
|
14
|
my.changeLocalAudio = function(stream) {
|
|
|
@@ -45,10 +48,10 @@ var VideoLayout = (function (my) {
|
|
45
|
48
|
// Add click handler to both video and video wrapper elements in case
|
|
46
|
49
|
// there's no video.
|
|
47
|
50
|
localVideoSelector.click(function () {
|
|
48
|
|
- VideoLayout.handleVideoThumbClicked(localVideo.src);
|
|
|
51
|
+ VideoLayout.handleVideoThumbClicked(RTC.getVideoSrc(localVideo), connection.emuc.myroomjid);
|
|
49
|
52
|
});
|
|
50
|
53
|
$('#localVideoContainer').click(function () {
|
|
51
|
|
- VideoLayout.handleVideoThumbClicked(localVideo.src);
|
|
|
54
|
+ VideoLayout.handleVideoThumbClicked(RTC.getVideoSrc(localVideo), connection.emuc.myroomjid);
|
|
52
|
55
|
});
|
|
53
|
56
|
|
|
54
|
57
|
// Add hover handler
|
|
|
@@ -58,14 +61,14 @@ var VideoLayout = (function (my) {
|
|
58
|
61
|
},
|
|
59
|
62
|
function() {
|
|
60
|
63
|
if (!VideoLayout.isLargeVideoVisible()
|
|
61
|
|
- || localVideo.src !== $('#largeVideo').attr('src'))
|
|
|
64
|
+ || RTC.getVideoSrc(localVideo) !== RTC.getVideoSrc($('#largeVideo')[0]))
|
|
62
|
65
|
VideoLayout.showDisplayName('localVideoContainer', false);
|
|
63
|
66
|
}
|
|
64
|
67
|
);
|
|
65
|
68
|
// Add stream ended handler
|
|
66
|
69
|
stream.onended = function () {
|
|
67
|
70
|
localVideoContainer.removeChild(localVideo);
|
|
68
|
|
- VideoLayout.updateRemovedVideo(localVideo.src);
|
|
|
71
|
+ VideoLayout.updateRemovedVideo(RTC.getVideoSrc(localVideo));
|
|
69
|
72
|
};
|
|
70
|
73
|
// Flip video x axis if needed
|
|
71
|
74
|
flipXLocalVideo = flipX;
|
|
|
@@ -76,9 +79,16 @@ var VideoLayout = (function (my) {
|
|
76
|
79
|
var videoStream = simulcast.getLocalVideoStream();
|
|
77
|
80
|
RTC.attachMediaStream(localVideoSelector, videoStream);
|
|
78
|
81
|
|
|
79
|
|
- localVideoSrc = localVideo.src;
|
|
|
82
|
+ localVideoSrc = RTC.getVideoSrc(localVideo);
|
|
|
83
|
+
|
|
|
84
|
+ var myResourceJid = null;
|
|
|
85
|
+ if(connection.emuc.myroomjid)
|
|
|
86
|
+ {
|
|
|
87
|
+ myResourceJid = Strophe.getResourceFromJid(connection.emuc.myroomjid);
|
|
|
88
|
+ }
|
|
|
89
|
+ VideoLayout.updateLargeVideo(localVideoSrc, 0,
|
|
|
90
|
+ myResourceJid);
|
|
80
|
91
|
|
|
81
|
|
- VideoLayout.updateLargeVideo(localVideoSrc, 0);
|
|
82
|
92
|
};
|
|
83
|
93
|
|
|
84
|
94
|
/**
|
|
|
@@ -87,7 +97,7 @@ var VideoLayout = (function (my) {
|
|
87
|
97
|
* @param removedVideoSrc src stream identifier of the video.
|
|
88
|
98
|
*/
|
|
89
|
99
|
my.updateRemovedVideo = function(removedVideoSrc) {
|
|
90
|
|
- if (removedVideoSrc === $('#largeVideo').attr('src')) {
|
|
|
100
|
+ if (removedVideoSrc === RTC.getVideoSrc($('#largeVideo')[0])) {
|
|
91
|
101
|
// this is currently displayed as large
|
|
92
|
102
|
// pick the last visible video in the row
|
|
93
|
103
|
// if nobody else is left, this picks the local video
|
|
|
@@ -99,7 +109,7 @@ var VideoLayout = (function (my) {
|
|
99
|
109
|
console.info("Last visible video no longer exists");
|
|
100
|
110
|
pick = $('#remoteVideos>span[id!="mixedstream"]>video').get(0);
|
|
101
|
111
|
|
|
102
|
|
- if (!pick || !pick.src) {
|
|
|
112
|
+ if (!pick || !RTC.getVideoSrc(pick)) {
|
|
103
|
113
|
// Try local video
|
|
104
|
114
|
console.info("Fallback to local video...");
|
|
105
|
115
|
pick = $('#remoteVideos>span>span>video').get(0);
|
|
|
@@ -108,20 +118,28 @@ var VideoLayout = (function (my) {
|
|
108
|
118
|
|
|
109
|
119
|
// mute if localvideo
|
|
110
|
120
|
if (pick) {
|
|
111
|
|
- VideoLayout.updateLargeVideo(pick.src, pick.volume);
|
|
|
121
|
+ var container = pick.parentNode;
|
|
|
122
|
+ var jid = null;
|
|
|
123
|
+ if(container)
|
|
|
124
|
+ jid = VideoLayout.getPeerContainerResourceJid(container);
|
|
|
125
|
+ VideoLayout.updateLargeVideo(RTC.getVideoSrc(pick), pick.volume, jid);
|
|
112
|
126
|
} else {
|
|
113
|
127
|
console.warn("Failed to elect large video");
|
|
114
|
128
|
}
|
|
115
|
129
|
}
|
|
116
|
130
|
};
|
|
117
|
131
|
|
|
|
132
|
+ my.getLargeVideoState = function () {
|
|
|
133
|
+ return largeVideoState;
|
|
|
134
|
+ }
|
|
|
135
|
+
|
|
118
|
136
|
/**
|
|
119
|
137
|
* Updates the large video with the given new video source.
|
|
120
|
138
|
*/
|
|
121
|
|
- my.updateLargeVideo = function(newSrc, vol) {
|
|
|
139
|
+ my.updateLargeVideo = function(newSrc, vol, jid) {
|
|
122
|
140
|
console.log('hover in', newSrc);
|
|
123
|
141
|
|
|
124
|
|
- if ($('#largeVideo').attr('src') != newSrc) {
|
|
|
142
|
+ if (RTC.getVideoSrc($('#largeVideo')[0]) != newSrc) {
|
|
125
|
143
|
|
|
126
|
144
|
// Due to the simulcast the localVideoSrc may have changed when the
|
|
127
|
145
|
// fadeOut event triggers. In that case the getJidFromVideoSrc and
|
|
|
@@ -133,15 +151,13 @@ var VideoLayout = (function (my) {
|
|
133
|
151
|
|
|
134
|
152
|
largeVideoState.newSrc = newSrc;
|
|
135
|
153
|
largeVideoState.isVisible = $('#largeVideo').is(':visible');
|
|
136
|
|
- largeVideoState.isDesktop = isVideoSrcDesktop(newSrc);
|
|
137
|
|
- largeVideoState.userJid = getJidFromVideoSrc(newSrc);
|
|
|
154
|
+ largeVideoState.isDesktop = isVideoSrcDesktop(jid);
|
|
|
155
|
+ largeVideoState.oldJid = largeVideoState.userJid;
|
|
|
156
|
+ largeVideoState.userJid = jid;
|
|
138
|
157
|
|
|
139
|
158
|
// Screen stream is already rotated
|
|
140
|
159
|
largeVideoState.flipX = (newSrc === localVideoSrc) && flipXLocalVideo;
|
|
141
|
160
|
|
|
142
|
|
- var oldSrc = $('#largeVideo').attr('src');
|
|
143
|
|
- largeVideoState.oldJid = getJidFromVideoSrc(oldSrc);
|
|
144
|
|
-
|
|
145
|
161
|
var userChanged = false;
|
|
146
|
162
|
if (largeVideoState.oldJid != largeVideoState.userJid) {
|
|
147
|
163
|
userChanged = true;
|
|
|
@@ -157,7 +173,8 @@ var VideoLayout = (function (my) {
|
|
157
|
173
|
|
|
158
|
174
|
if (!userChanged && largeVideoState.preload
|
|
159
|
175
|
&& largeVideoState.preload != null
|
|
160
|
|
- && $(largeVideoState.preload).attr('src') == newSrc) {
|
|
|
176
|
+ && RTC.getVideoSrc($(largeVideoState.preload)[0]) == newSrc)
|
|
|
177
|
+ {
|
|
161
|
178
|
|
|
162
|
179
|
console.info('Switching to preloaded video');
|
|
163
|
180
|
var attributes = $('#largeVideo').prop("attributes");
|
|
|
@@ -183,7 +200,7 @@ var VideoLayout = (function (my) {
|
|
183
|
200
|
largeVideoState.preload = null;
|
|
184
|
201
|
largeVideoState.preload_ssrc = 0;
|
|
185
|
202
|
} else {
|
|
186
|
|
- $('#largeVideo').attr('src', largeVideoState.newSrc);
|
|
|
203
|
+ RTC.setVideoSrc($('#largeVideo')[0], largeVideoState.newSrc);
|
|
187
|
204
|
}
|
|
188
|
205
|
|
|
189
|
206
|
var videoTransform = document.getElementById('largeVideo')
|
|
|
@@ -211,14 +228,12 @@ var VideoLayout = (function (my) {
|
|
211
|
228
|
// Only if the large video is currently visible.
|
|
212
|
229
|
// Disable previous dominant speaker video.
|
|
213
|
230
|
if (largeVideoState.oldJid) {
|
|
214
|
|
- var oldResourceJid = Strophe.getResourceFromJid(largeVideoState.oldJid);
|
|
215
|
|
- VideoLayout.enableDominantSpeaker(oldResourceJid, false);
|
|
|
231
|
+ VideoLayout.enableDominantSpeaker(largeVideoState.oldJid, false);
|
|
216
|
232
|
}
|
|
217
|
233
|
|
|
218
|
234
|
// Enable new dominant speaker in the remote videos section.
|
|
219
|
235
|
if (largeVideoState.userJid) {
|
|
220
|
|
- var resourceJid = Strophe.getResourceFromJid(largeVideoState.userJid);
|
|
221
|
|
- VideoLayout.enableDominantSpeaker(resourceJid, true);
|
|
|
236
|
+ VideoLayout.enableDominantSpeaker(largeVideoState.userJid, true);
|
|
222
|
237
|
}
|
|
223
|
238
|
|
|
224
|
239
|
if (userChanged && largeVideoState.isVisible) {
|
|
|
@@ -239,17 +254,20 @@ var VideoLayout = (function (my) {
|
|
239
|
254
|
}
|
|
240
|
255
|
};
|
|
241
|
256
|
|
|
242
|
|
- my.handleVideoThumbClicked = function(videoSrc) {
|
|
|
257
|
+ my.handleVideoThumbClicked = function(videoSrc, jid) {
|
|
243
|
258
|
// Restore style for previously focused video
|
|
244
|
|
- var focusJid = getJidFromVideoSrc(focusedVideoSrc);
|
|
245
|
|
- var oldContainer = getParticipantContainer(focusJid);
|
|
|
259
|
+ var oldContainer = null;
|
|
|
260
|
+ if(focusedVideoSrc) {
|
|
|
261
|
+ var focusJid = focusedVideoSrc.jid;
|
|
|
262
|
+ oldContainer = getParticipantContainer(focusJid);
|
|
|
263
|
+ }
|
|
246
|
264
|
|
|
247
|
265
|
if (oldContainer) {
|
|
248
|
266
|
oldContainer.removeClass("videoContainerFocused");
|
|
249
|
267
|
}
|
|
250
|
268
|
|
|
251
|
269
|
// Unlock current focused.
|
|
252
|
|
- if (focusedVideoSrc === videoSrc)
|
|
|
270
|
+ if (focusedVideoSrc && focusedVideoSrc.src === videoSrc)
|
|
253
|
271
|
{
|
|
254
|
272
|
focusedVideoSrc = null;
|
|
255
|
273
|
var dominantSpeakerVideo = null;
|
|
|
@@ -260,7 +278,7 @@ var VideoLayout = (function (my) {
|
|
260
|
278
|
.get(0);
|
|
261
|
279
|
|
|
262
|
280
|
if (dominantSpeakerVideo) {
|
|
263
|
|
- VideoLayout.updateLargeVideo(dominantSpeakerVideo.src, 1);
|
|
|
281
|
+ VideoLayout.updateLargeVideo(RTC.getVideoSrc(dominantSpeakerVideo), 1, currentDominantSpeaker);
|
|
264
|
282
|
}
|
|
265
|
283
|
}
|
|
266
|
284
|
|
|
|
@@ -268,13 +286,15 @@ var VideoLayout = (function (my) {
|
|
268
|
286
|
}
|
|
269
|
287
|
|
|
270
|
288
|
// Lock new video
|
|
271
|
|
- focusedVideoSrc = videoSrc;
|
|
|
289
|
+ focusedVideoSrc = {
|
|
|
290
|
+ src: videoSrc,
|
|
|
291
|
+ jid: jid
|
|
|
292
|
+ };
|
|
272
|
293
|
|
|
273
|
294
|
// Update focused/pinned interface.
|
|
274
|
|
- var userJid = getJidFromVideoSrc(videoSrc);
|
|
275
|
|
- if (userJid)
|
|
|
295
|
+ if (jid)
|
|
276
|
296
|
{
|
|
277
|
|
- var container = getParticipantContainer(userJid);
|
|
|
297
|
+ var container = getParticipantContainer(jid);
|
|
278
|
298
|
container.addClass("videoContainerFocused");
|
|
279
|
299
|
}
|
|
280
|
300
|
|
|
|
@@ -282,7 +302,7 @@ var VideoLayout = (function (my) {
|
|
282
|
302
|
// this isn't a prezi.
|
|
283
|
303
|
$(document).trigger("video.selected", [false]);
|
|
284
|
304
|
|
|
285
|
|
- VideoLayout.updateLargeVideo(videoSrc, 1);
|
|
|
305
|
+ VideoLayout.updateLargeVideo(videoSrc, 1, Strophe.getResourceFromJid(jid));
|
|
286
|
306
|
|
|
287
|
307
|
$('audio').each(function (idx, el) {
|
|
288
|
308
|
if (el.id.indexOf('mixedmslabel') !== -1) {
|
|
|
@@ -328,8 +348,7 @@ var VideoLayout = (function (my) {
|
|
328
|
348
|
* Shows/hides the large video.
|
|
329
|
349
|
*/
|
|
330
|
350
|
my.setLargeVideoVisible = function(isVisible) {
|
|
331
|
|
- var largeVideoJid = getJidFromVideoSrc($('#largeVideo').attr('src'));
|
|
332
|
|
- var resourceJid = Strophe.getResourceFromJid(largeVideoJid);
|
|
|
351
|
+ var resourceJid = largeVideoState.userJid;
|
|
333
|
352
|
|
|
334
|
353
|
if (isVisible) {
|
|
335
|
354
|
$('#largeVideo').css({visibility: 'visible'});
|
|
|
@@ -458,7 +477,7 @@ var VideoLayout = (function (my) {
|
|
458
|
477
|
RTC.attachMediaStream(sel, videoStream);
|
|
459
|
478
|
|
|
460
|
479
|
if (isVideo)
|
|
461
|
|
- waitForRemoteVideo(sel, thessrc, stream);
|
|
|
480
|
+ waitForRemoteVideo(sel, thessrc, stream, peerJid);
|
|
462
|
481
|
}
|
|
463
|
482
|
|
|
464
|
483
|
stream.onended = function () {
|
|
|
@@ -480,7 +499,7 @@ var VideoLayout = (function (my) {
|
|
480
|
499
|
var videoThumb = $('#' + container.id + '>video').get(0);
|
|
481
|
500
|
|
|
482
|
501
|
if (videoThumb)
|
|
483
|
|
- VideoLayout.handleVideoThumbClicked(videoThumb.src);
|
|
|
502
|
+ VideoLayout.handleVideoThumbClicked(RTC.getVideoSrc(videoThumb), peerJid);
|
|
484
|
503
|
|
|
485
|
504
|
event.preventDefault();
|
|
486
|
505
|
return false;
|
|
|
@@ -495,13 +514,13 @@ var VideoLayout = (function (my) {
|
|
495
|
514
|
var videoSrc = null;
|
|
496
|
515
|
if ($('#' + container.id + '>video')
|
|
497
|
516
|
&& $('#' + container.id + '>video').length > 0) {
|
|
498
|
|
- videoSrc = $('#' + container.id + '>video').get(0).src;
|
|
|
517
|
+ videoSrc = RTC.getVideoSrc($('#' + container.id + '>video').get(0));
|
|
499
|
518
|
}
|
|
500
|
519
|
|
|
501
|
520
|
// If the video has been "pinned" by the user we want to
|
|
502
|
521
|
// keep the display name on place.
|
|
503
|
522
|
if (!VideoLayout.isLargeVideoVisible()
|
|
504
|
|
- || videoSrc !== $('#largeVideo').attr('src'))
|
|
|
523
|
+ || videoSrc !== RTC.getVideoSrc($('#largeVideo')[0]))
|
|
505
|
524
|
VideoLayout.showDisplayName(container.id, false);
|
|
506
|
525
|
}
|
|
507
|
526
|
);
|
|
|
@@ -526,13 +545,11 @@ var VideoLayout = (function (my) {
|
|
526
|
545
|
var removedVideoSrc = null;
|
|
527
|
546
|
if (isVideo) {
|
|
528
|
547
|
select = $('#' + container.id + '>video');
|
|
529
|
|
- removedVideoSrc = select.get(0).src;
|
|
|
548
|
+ removedVideoSrc = RTC.getVideoSrc(select.get(0));
|
|
530
|
549
|
}
|
|
531
|
550
|
else
|
|
532
|
551
|
select = $('#' + container.id + '>audio');
|
|
533
|
552
|
|
|
534
|
|
- // Remove video source from the mapping.
|
|
535
|
|
- delete videoSrcToSsrc[removedVideoSrc];
|
|
536
|
553
|
|
|
537
|
554
|
// Mark video as removed to cancel waiting loop(if video is removed
|
|
538
|
555
|
// before has started)
|
|
|
@@ -586,7 +603,6 @@ var VideoLayout = (function (my) {
|
|
586
|
603
|
*/
|
|
587
|
604
|
function setDisplayName(videoSpanId, displayName) {
|
|
588
|
605
|
var nameSpan = $('#' + videoSpanId + '>span.displayname');
|
|
589
|
|
- var defaultLocalDisplayName = "Me";
|
|
590
|
606
|
|
|
591
|
607
|
// If we already have a display name for this video.
|
|
592
|
608
|
if (nameSpan.length > 0) {
|
|
|
@@ -1339,7 +1355,7 @@ var VideoLayout = (function (my) {
|
|
1339
|
1355
|
// Update the large video if the video source is already available,
|
|
1340
|
1356
|
// otherwise wait for the "videoactive.jingle" event.
|
|
1341
|
1357
|
if (video.length && video[0].currentTime > 0)
|
|
1342
|
|
- VideoLayout.updateLargeVideo(video[0].src);
|
|
|
1358
|
+ VideoLayout.updateLargeVideo(RTC.getVideoSrc(video[0]), resourceJid);
|
|
1343
|
1359
|
}
|
|
1344
|
1360
|
});
|
|
1345
|
1361
|
|
|
|
@@ -1392,7 +1408,7 @@ var VideoLayout = (function (my) {
|
|
1392
|
1408
|
waitForRemoteVideo(
|
|
1393
|
1409
|
sel,
|
|
1394
|
1410
|
mediaStream.ssrc,
|
|
1395
|
|
- mediaStream.stream);
|
|
|
1411
|
+ mediaStream.stream, resourceJid);
|
|
1396
|
1412
|
return true;
|
|
1397
|
1413
|
}
|
|
1398
|
1414
|
});
|
|
|
@@ -1421,7 +1437,7 @@ var VideoLayout = (function (my) {
|
|
1421
|
1437
|
|| (parentResourceJid
|
|
1422
|
1438
|
&& VideoLayout.getDominantSpeakerResourceJid()
|
|
1423
|
1439
|
=== parentResourceJid)) {
|
|
1424
|
|
- VideoLayout.updateLargeVideo(videoelem.attr('src'), 1);
|
|
|
1440
|
+ VideoLayout.updateLargeVideo(RTC.getVideoSrc(videoelem[0]), 1, parentResourceJid);
|
|
1425
|
1441
|
}
|
|
1426
|
1442
|
|
|
1427
|
1443
|
VideoLayout.showFocusIndicator();
|
|
|
@@ -1443,10 +1459,8 @@ var VideoLayout = (function (my) {
|
|
1443
|
1459
|
console.info([esl, primarySSRC, msid, session, electedStream]);
|
|
1444
|
1460
|
|
|
1445
|
1461
|
var msidParts = msid.split(' ');
|
|
1446
|
|
- var selRemoteVideo = $(['#', 'remoteVideo_', session.sid, '_', msidParts[0]].join(''));
|
|
1447
|
1462
|
|
|
1448
|
|
- var preload = (ssrc2jid[videoSrcToSsrc[selRemoteVideo.attr('src')]]
|
|
1449
|
|
- == ssrc2jid[videoSrcToSsrc[largeVideoState.newSrc]]);
|
|
|
1463
|
+ var preload = (Strophe.getResourceFromJid(ssrc2jid[primarySSRC]) == largeVideoState.userJid);
|
|
1450
|
1464
|
|
|
1451
|
1465
|
if (preload) {
|
|
1452
|
1466
|
if (largeVideoState.preload)
|
|
|
@@ -1458,9 +1472,7 @@ var VideoLayout = (function (my) {
|
|
1458
|
1472
|
// ssrcs are unique in an rtp session
|
|
1459
|
1473
|
largeVideoState.preload_ssrc = primarySSRC;
|
|
1460
|
1474
|
|
|
1461
|
|
- var electedStreamUrl = webkitURL.createObjectURL(electedStream);
|
|
1462
|
|
- largeVideoState.preload
|
|
1463
|
|
- .attr('src', electedStreamUrl);
|
|
|
1475
|
+ RTC.attachMediaStream(largeVideoState.preload, electedStream)
|
|
1464
|
1476
|
}
|
|
1465
|
1477
|
|
|
1466
|
1478
|
} else {
|
|
|
@@ -1491,14 +1503,15 @@ var VideoLayout = (function (my) {
|
|
1491
|
1503
|
var msidParts = msid.split(' ');
|
|
1492
|
1504
|
var selRemoteVideo = $(['#', 'remoteVideo_', session.sid, '_', msidParts[0]].join(''));
|
|
1493
|
1505
|
|
|
1494
|
|
- var updateLargeVideo = (ssrc2jid[videoSrcToSsrc[selRemoteVideo.attr('src')]]
|
|
1495
|
|
- == ssrc2jid[videoSrcToSsrc[largeVideoState.newSrc]]);
|
|
1496
|
|
- var updateFocusedVideoSrc = (selRemoteVideo.attr('src') == focusedVideoSrc);
|
|
|
1506
|
+ var updateLargeVideo = (Strophe.getResourceFromJid(ssrc2jid[primarySSRC])
|
|
|
1507
|
+ == largeVideoState.userJid);
|
|
|
1508
|
+ var updateFocusedVideoSrc = (focusedVideoSrc &&
|
|
|
1509
|
+ (RTC.getVideoSrc(selRemoteVideo[0]) == focusedVideoSrc.src));
|
|
1497
|
1510
|
|
|
1498
|
1511
|
var electedStreamUrl;
|
|
1499
|
1512
|
if (largeVideoState.preload_ssrc == primarySSRC)
|
|
1500
|
1513
|
{
|
|
1501
|
|
- electedStreamUrl = $(largeVideoState.preload).attr('src');
|
|
|
1514
|
+ RTC.setVideoSrc(selRemoteVideo, RTC.getVideoSrc(largeVideoState.preload[0]));
|
|
1502
|
1515
|
}
|
|
1503
|
1516
|
else
|
|
1504
|
1517
|
{
|
|
|
@@ -1509,21 +1522,23 @@ var VideoLayout = (function (my) {
|
|
1509
|
1522
|
|
|
1510
|
1523
|
largeVideoState.preload_ssrc = 0;
|
|
1511
|
1524
|
|
|
1512
|
|
- electedStreamUrl = webkitURL.createObjectURL(electedStream);
|
|
|
1525
|
+ RTC.attachMediaStream(selRemoteVideo, electedStream);
|
|
1513
|
1526
|
}
|
|
1514
|
1527
|
|
|
1515
|
|
- selRemoteVideo.attr('src', electedStreamUrl);
|
|
1516
|
|
- videoSrcToSsrc[selRemoteVideo.attr('src')] = primarySSRC;
|
|
|
1528
|
+
|
|
|
1529
|
+ var jid = ssrc2jid[primarySSRC];
|
|
|
1530
|
+ jid2Ssrc[jid] = primarySSRC;
|
|
1517
|
1531
|
|
|
1518
|
1532
|
if (updateLargeVideo) {
|
|
1519
|
|
- VideoLayout.updateLargeVideo(electedStreamUrl);
|
|
|
1533
|
+ VideoLayout.updateLargeVideo(RTC.getVideoSrc(selRemoteVideo[0]), null,
|
|
|
1534
|
+ Strophe.getResourceFromJid(jid));
|
|
1520
|
1535
|
}
|
|
1521
|
1536
|
|
|
1522
|
1537
|
if (updateFocusedVideoSrc) {
|
|
1523
|
|
- focusedVideoSrc = electedStreamUrl;
|
|
|
1538
|
+ focusedVideoSrc.src = RTC.getVideoSrc(selRemoteVideo[0]);
|
|
1524
|
1539
|
}
|
|
1525
|
1540
|
|
|
1526
|
|
- var jid = ssrc2jid[primarySSRC];
|
|
|
1541
|
+
|
|
1527
|
1542
|
var videoId;
|
|
1528
|
1543
|
if(jid == connection.emuc.myroomjid)
|
|
1529
|
1544
|
{
|