We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b645b27 commit c461c26Copy full SHA for c461c26
1 file changed
src/pixi/textures/VideoTexture.js
@@ -47,6 +47,7 @@ PIXI.VideoTexture = function(source, scaleMode)
47
}
48
49
this.onPlay = new Phaser.Signal();
50
+ this.onUpdate = new Phaser.Signal();
51
this.onComplete = new Phaser.Signal();
52
53
};
@@ -60,6 +61,13 @@ PIXI.VideoTexture.prototype.play = function()
60
61
this.onPlay.dispatch();
62
63
64
+PIXI.VideoTexture.prototype.changeSource = function(src)
65
+{
66
+ this.source.src = src;
67
+ this.source.play();
68
+ this.onPlay.dispatch();
69
+};
70
+
71
PIXI.VideoTexture.prototype.stop = function()
72
{
73
if (this.source && !this.source.paused)
@@ -81,6 +89,7 @@ PIXI.VideoTexture.prototype._onUpdate = function()
81
89
82
90
window.requestAnimationFrame(this.updateBound);
83
91
this.dirty();
92
+ this.onUpdate.dispatch(this);
84
93
85
94
86
95
0 commit comments