Pārlūkot izejas kodu

onplay vs onplaying

sebastien 7 gadi atpakaļ
vecāks
revīzija
624db8476e

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 3538 - 3538
Playground/babylon.d.txt


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 3055 - 3055
dist/preview release/babylon.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/babylon.js


+ 4 - 4
dist/preview release/babylon.max.js

@@ -64748,12 +64748,12 @@ var BABYLON;
                 }
                 _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
                 if (!_this.video.autoplay) {
-                    var oldHandler_1 = _this.video.onplay;
-                    _this.video.onplay = function () {
-                        _this.video.pause();
-                        _this.video.onplay = oldHandler_1;
+                    var oldHandler_1 = _this.video.onplaying;
+                    _this.video.onplaying = function () {
+                        _this.video.onplaying = oldHandler_1;
                         _this._texture.isReady = true;
                         _this._updateInternalTexture();
+                        _this.video.pause();
                         if (_this._onLoadObservable && _this._onLoadObservable.hasObservers()) {
                             _this.onLoadObservable.notifyObservers(_this);
                         }

+ 4 - 4
dist/preview release/babylon.no-module.max.js

@@ -64715,12 +64715,12 @@ var BABYLON;
                 }
                 _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
                 if (!_this.video.autoplay) {
-                    var oldHandler_1 = _this.video.onplay;
-                    _this.video.onplay = function () {
-                        _this.video.pause();
-                        _this.video.onplay = oldHandler_1;
+                    var oldHandler_1 = _this.video.onplaying;
+                    _this.video.onplaying = function () {
+                        _this.video.onplaying = oldHandler_1;
                         _this._texture.isReady = true;
                         _this._updateInternalTexture();
+                        _this.video.pause();
                         if (_this._onLoadObservable && _this._onLoadObservable.hasObservers()) {
                             _this.onLoadObservable.notifyObservers(_this);
                         }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/babylon.worker.js


+ 4 - 4
dist/preview release/es6.js

@@ -64715,12 +64715,12 @@ var BABYLON;
                 }
                 _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
                 if (!_this.video.autoplay) {
-                    var oldHandler_1 = _this.video.onplay;
-                    _this.video.onplay = function () {
-                        _this.video.pause();
-                        _this.video.onplay = oldHandler_1;
+                    var oldHandler_1 = _this.video.onplaying;
+                    _this.video.onplaying = function () {
+                        _this.video.onplaying = oldHandler_1;
                         _this._texture.isReady = true;
                         _this._updateInternalTexture();
+                        _this.video.pause();
                         if (_this._onLoadObservable && _this._onLoadObservable.hasObservers()) {
                             _this.onLoadObservable.notifyObservers(_this);
                         }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


+ 4 - 4
dist/preview release/viewer/babylon.viewer.max.js

@@ -64836,12 +64836,12 @@ var BABYLON;
                 }
                 _this._texture = _this._engine.createDynamicTexture(_this.video.videoWidth, _this.video.videoHeight, _this._generateMipMaps, _this._samplingMode);
                 if (!_this.video.autoplay) {
-                    var oldHandler_1 = _this.video.onplay;
-                    _this.video.onplay = function () {
-                        _this.video.pause();
-                        _this.video.onplay = oldHandler_1;
+                    var oldHandler_1 = _this.video.onplaying;
+                    _this.video.onplaying = function () {
+                        _this.video.onplaying = oldHandler_1;
                         _this._texture.isReady = true;
                         _this._updateInternalTexture();
+                        _this.video.pause();
                         if (_this._onLoadObservable && _this._onLoadObservable.hasObservers()) {
                             _this.onLoadObservable.notifyObservers(_this);
                         }

+ 4 - 4
src/Materials/Textures/babylon.videoTexture.ts

@@ -142,12 +142,12 @@
             );
 
             if (!this.video.autoplay) {
-                let oldHandler = this.video.onplay;
-                this.video.onplay = () => {
-                    this.video.pause();
-                    this.video.onplay = oldHandler;
+                let oldHandler = this.video.onplaying;
+                this.video.onplaying = () => {
+                    this.video.onplaying = oldHandler;
                     this._texture!.isReady = true;
                     this._updateInternalTexture();
+                    this.video.pause();
                     if (this._onLoadObservable && this._onLoadObservable.hasObservers()) {
                         this.onLoadObservable.notifyObservers(this);
                     }