fixed switching to large video from FF on safari

This commit is contained in:
isymchych 2015-11-19 14:32:07 +02:00
parent 236c4bb37c
commit 1d59283518
1 changed files with 20 additions and 3 deletions

View File

@ -320,9 +320,26 @@ SmallVideo.prototype.selectVideoElement = function () {
if (!RTCBrowserType.isTemasysPluginUsed()) { if (!RTCBrowserType.isTemasysPluginUsed()) {
return $('#' + this.videoSpanId).find(videoElem); return $('#' + this.videoSpanId).find(videoElem);
} else { } else {
return $('#' + this.videoSpanId + var matching = $('#' + this.videoSpanId +
(this.isLocal ? '>>' : '>') + (this.isLocal ? '>>' : '>') +
videoElem + '>param[value="video"]').parent(); 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 $([]);
} }
}; };