this._url keeps sources after _initImage VideoOverlay

This commit is contained in:
Unknown 2017-12-09 11:36:20 +02:00
parent 575ced6e2c
commit cd910249d1

View File

@ -50,7 +50,13 @@ export var VideoOverlay = ImageOverlay.extend({
vid.onloadeddata = Util.bind(this.fire, this, 'load');
if (wasElementSupplied) {
this._url = vid.src;
var sourceElements = vid.getElementsByTagName('source');
var sources = [];
for (var j = 0; j < sourceElements.length; j++) {
sources.push(sourceElements[j].src);
}
this._url = (sourceElements.length > 0) ? sources : [vid.src];
return;
}