Skip to content

Commit 7cbf384

Browse files
committed
SceneManager.loadComplete will no longer try to unlock the Sound Manager, preventing AudioContext was not allowed to start console warnings after each Scene finishes loading.
1 parent 612cd8c commit 7cbf384

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/scene/SceneManager.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var Systems = require('./Systems');
2020
*
2121
* The Scene Manager is a Game level system, responsible for creating, processing and updating all of the
2222
* Scenes in a Game instance.
23-
ó *
23+
*
2424
*
2525
* @class SceneManager
2626
* @memberof Phaser.Scenes
@@ -49,7 +49,7 @@ var SceneManager = new Class({
4949
* An object that maps the keys to the scene so we can quickly get a scene from a key without iteration.
5050
*
5151
* @name Phaser.Scenes.SceneManager#keys
52-
* @type {object}
52+
* @type {Record<string, Phaser.Scene>}
5353
* @since 3.0.0
5454
*/
5555
this.keys = {};
@@ -58,7 +58,7 @@ var SceneManager = new Class({
5858
* The array in which all of the scenes are kept.
5959
*
6060
* @name Phaser.Scenes.SceneManager#scenes
61-
* @type {array}
61+
* @type {Phaser.Scene[]}
6262
* @since 3.0.0
6363
*/
6464
this.scenes = [];
@@ -514,16 +514,7 @@ var SceneManager = new Class({
514514
*/
515515
loadComplete: function (loader)
516516
{
517-
var scene = loader.scene;
518-
519-
// TODO - Remove. This should *not* be handled here
520-
// Try to unlock HTML5 sounds every time any loader completes
521-
if (this.game.sound && this.game.sound.onBlurPausedSounds)
522-
{
523-
this.game.sound.unlock();
524-
}
525-
526-
this.create(scene);
517+
this.create(loader.scene);
527518
},
528519

529520
/**

0 commit comments

Comments
 (0)