|
@@ -431,7 +431,8 @@ var VideoLayout = (function (my) {
|
431
|
431
|
stream.onended = function () {
|
432
|
432
|
console.log('stream ended', this);
|
433
|
433
|
|
434
|
|
- VideoLayout.removeRemoteStreamElement(stream, container);
|
|
434
|
+ VideoLayout.removeRemoteStreamElement(
|
|
435
|
+ stream, isVideo, container);
|
435
|
436
|
|
436
|
437
|
if (peerJid)
|
437
|
438
|
ContactList.removeContact(peerJid);
|
|
@@ -481,15 +482,16 @@ var VideoLayout = (function (my) {
|
481
|
482
|
* parent container.
|
482
|
483
|
*
|
483
|
484
|
* @param stream the stream
|
|
485
|
+ * @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
|
484
|
486
|
* @param container
|
485
|
487
|
*/
|
486
|
|
- my.removeRemoteStreamElement = function (stream, container) {
|
|
488
|
+ my.removeRemoteStreamElement = function (stream, isVideo, container) {
|
487
|
489
|
if (!container)
|
488
|
490
|
return;
|
489
|
491
|
|
490
|
492
|
var select = null;
|
491
|
493
|
var removedVideoSrc = null;
|
492
|
|
- if (stream.getVideoTracks().length > 0) {
|
|
494
|
+ if (isVideo) {
|
493
|
495
|
select = $('#' + container.id + '>video');
|
494
|
496
|
removedVideoSrc = select.get(0).src;
|
495
|
497
|
}
|