|
@@ -31,12 +31,14 @@ var BABYLON;
|
|
|
_this._texture = scene.getEngine().createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, generateMipMaps, samplingMode, false);
|
|
|
_this._texture.isReady = true;
|
|
|
});
|
|
|
- urls.forEach(function (url) {
|
|
|
- //Backwards-compatibility for typescript 1. from 1.3 it should say "SOURCE". see here - https://github.com/Microsoft/TypeScript/issues/1850
|
|
|
- var source = document.createElement("source");
|
|
|
- source.src = url;
|
|
|
- _this.video.appendChild(source);
|
|
|
- });
|
|
|
+ if (urls) {
|
|
|
+ urls.forEach(function (url) {
|
|
|
+ //Backwards-compatibility for typescript 1. from 1.3 it should say "SOURCE". see here - https://github.com/Microsoft/TypeScript/issues/1850
|
|
|
+ var source = document.createElement("source");
|
|
|
+ source.src = url;
|
|
|
+ _this.video.appendChild(source);
|
|
|
+ });
|
|
|
+ }
|
|
|
this._lastUpdate = BABYLON.Tools.Now;
|
|
|
}
|
|
|
VideoTexture.prototype.update = function () {
|