Merge branch 'bug/large-video-on-safari' of git://github.com/isymchych/jitsi-meet

This commit is contained in:
hristoterezov 2015-11-20 11:06:40 -06:00
commit 2e7e7d2dd8
1 changed files with 20 additions and 3 deletions

View File

@ -320,9 +320,26 @@ SmallVideo.prototype.selectVideoElement = function () {
if (!RTCBrowserType.isTemasysPluginUsed()) {
return $('#' + this.videoSpanId).find(videoElem);
} else {
return $('#' + this.videoSpanId +
(this.isLocal ? '>>' : '>') +
videoElem + '>param[value="video"]').parent();
var matching = $('#' + this.videoSpanId +
(this.isLocal ? '>>' : '>') +
videoElem + '>param[value="video"]');
if (matching.length < 2) {
return matching.parent();
}
// there are 2 video objects from FF
// object with id which ends with '_default' (like 'remoteVideo_default')
// doesn't contain video, so we ignore it
for (var i = 0; i < matching.length; i += 1) {
var el = matching[i].parentNode;
// check id suffix
if (el.id.substr(-8) !== '_default') {
return $(el);
}
}
return $([]);
}
};