Skip to content

Commit 7f89a3d

Browse files
committed
Fixed video event.
1 parent d14d9f4 commit 7f89a3d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/gameobjects/Video.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Phaser.Video.prototype = {
266266

267267
_this.video.src = window.URL.createObjectURL(stream);
268268

269-
_this.video.addEventListener('loadeddata', function (event) { _this.updateTexture(width, height); }, true);
269+
_this.video.addEventListener('loadeddata', function (event) { _this.updateTexture(event, width, height); }, true);
270270

271271
_this.onAccess.dispatch(_this);
272272

@@ -308,10 +308,11 @@ Phaser.Video.prototype = {
308308
* Then dispatches the onChangeSource signal.
309309
*
310310
* @method Phaser.Video#updateTexture
311+
* @param {object} [event] - The event which triggered the texture update.
311312
* @param {integer} [width] - The new width of the video. If undefined `video.videoWidth` is used.
312313
* @param {integer} [height] - The new height of the video. If undefined `video.videoHeight` is used.
313314
*/
314-
updateTexture: function (width, height) {
315+
updateTexture: function (event, width, height) {
315316

316317
var change = false;
317318

0 commit comments

Comments
 (0)