From eac02c68da86516c043782b41473b1017b72b78d Mon Sep 17 00:00:00 2001 From: Andrew Kurniawan Date: Sat, 28 Sep 2024 23:18:00 +1000 Subject: [PATCH] fix fileComplete reference error in Loader.loadVideoTag The game.load reference in the videoLoadEvent callback gets nulled when the game is destroyed. This uses the local reference for fileComplete instead. --- src/loader/Loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/Loader.js b/src/loader/Loader.js index a140efac2..cac07499b 100644 --- a/src/loader/Loader.js +++ b/src/loader/Loader.js @@ -2640,7 +2640,7 @@ Phaser.Loader.prototype = { file.data.removeEventListener(file.loadEvent, videoLoadEvent, false); file.data.onerror = null; file.data.canplay = true; - _this.game.load.fileComplete(file); + _this.fileComplete(file); }; file.data.onerror = function ()