|
@@ -64735,8 +64735,7 @@ var BABYLON;
|
|
|
_this._createInternalTexture = function () {
|
|
|
if (_this._texture != null) {
|
|
|
if (!_this._texture.isReady) {
|
|
|
- _this._texture.isReady = true;
|
|
|
- _this._updateInternalTexture();
|
|
|
+ _this._textureReady();
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
@@ -64751,12 +64750,8 @@ var BABYLON;
|
|
|
_this._generateMipMaps = false;
|
|
|
}
|
|
|
_this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
|
|
|
- if (_this.video.readyState >= _this.video.HAVE_CURRENT_DATA) {
|
|
|
- _this._texture.isReady = true;
|
|
|
- _this._updateInternalTexture();
|
|
|
- }
|
|
|
- if (_this._onLoadObservable && _this._onLoadObservable.hasObservers()) {
|
|
|
- _this.onLoadObservable.notifyObservers(_this);
|
|
|
+ if (_this.video.readyState >= _this.video.HAVE_FUTURE_DATA) {
|
|
|
+ _this._textureReady();
|
|
|
}
|
|
|
};
|
|
|
_this.reset = function () {
|
|
@@ -64828,6 +64823,15 @@ var BABYLON;
|
|
|
return video;
|
|
|
};
|
|
|
;
|
|
|
+ VideoTexture.prototype._textureReady = function () {
|
|
|
+ if (this._texture) {
|
|
|
+ this._texture.isReady = true;
|
|
|
+ this._updateInternalTexture();
|
|
|
+ if (this._onLoadObservable && this._onLoadObservable.hasObservers()) {
|
|
|
+ this.onLoadObservable.notifyObservers(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
/**
|
|
|
* Internal method to initiate `update`.
|
|
|
*/
|