@vpmedia/phaser 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/phaser.cjs +1 -1
- package/dist/phaser.cjs.LICENSE.txt +1 -1
- package/dist/phaser.cjs.map +1 -1
- package/dist/phaser.js +1 -1
- package/dist/phaser.js.LICENSE.txt +1 -1
- package/dist/phaser.js.map +1 -1
- package/package.json +1 -1
- package/src/phaser/core/game.js +2 -0
- package/src/phaser/core/sound.js +3 -1
- package/src/phaser/core/sound_manager.js +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2",
|
|
5
5
|
"author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
|
|
6
6
|
"license": "MIT",
|
package/src/phaser/core/game.js
CHANGED
|
@@ -211,6 +211,8 @@ export default class {
|
|
|
211
211
|
this.parseConfigElement(config, 'clearBeforeRender', true);
|
|
212
212
|
// The Renderer this game will use. Either PowerGamer.Const.RENDER_AUTO, PowerGamer.Const.RENDER_CANVAS, PowerGamer.Const.RENDER_WEBGL, or PowerGamer.Const.RENDER_HEADLESS.
|
|
213
213
|
this.parseConfigElement(config, 'renderType', RENDER_AUTO);
|
|
214
|
+
// Force audio disabled
|
|
215
|
+
this.parseConfigElement(config, 'isForceDisabledAudio', false);
|
|
214
216
|
if (config.renderer) {
|
|
215
217
|
this.config.renderType = config.renderer;
|
|
216
218
|
}
|
package/src/phaser/core/sound.js
CHANGED
|
@@ -200,6 +200,7 @@ export default class {
|
|
|
200
200
|
this._sound.stop(0);
|
|
201
201
|
} catch (e) {
|
|
202
202
|
// pass
|
|
203
|
+
this.game.exceptionHandler(e);
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
206
|
if (this.externalNode) {
|
|
@@ -385,7 +386,8 @@ export default class {
|
|
|
385
386
|
try {
|
|
386
387
|
this._sound.stop(0);
|
|
387
388
|
} catch (e) {
|
|
388
|
-
//
|
|
389
|
+
// pass
|
|
390
|
+
this.game.exceptionHandler(e);
|
|
389
391
|
}
|
|
390
392
|
}
|
|
391
393
|
if (this.externalNode) {
|
|
@@ -33,6 +33,10 @@ export default class {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
boot() {
|
|
36
|
+
if (this.game.config.isForceDisabledAudio) {
|
|
37
|
+
this.noAudio = true;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
36
40
|
if (window.PhaserRegistry && window.PhaserRegistry.audioContext) {
|
|
37
41
|
this.context = window.PhaserRegistry.audioContext;
|
|
38
42
|
} else if (window.AudioContext) {
|
|
@@ -42,6 +46,7 @@ export default class {
|
|
|
42
46
|
this.context = null;
|
|
43
47
|
this.noAudio = true;
|
|
44
48
|
this.touchLocked = false;
|
|
49
|
+
this.game.exceptionHandler(e);
|
|
45
50
|
}
|
|
46
51
|
} else if (window.webkitAudioContext) {
|
|
47
52
|
try {
|
|
@@ -50,6 +55,7 @@ export default class {
|
|
|
50
55
|
this.context = null;
|
|
51
56
|
this.noAudio = true;
|
|
52
57
|
this.touchLocked = false;
|
|
58
|
+
this.game.exceptionHandler(e);
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
if (this.context === null || (this.context && this.context.createGain === undefined && this.context.createGainNode === undefined)) {
|
|
@@ -159,7 +165,7 @@ export default class {
|
|
|
159
165
|
}
|
|
160
166
|
});
|
|
161
167
|
} catch (e) {
|
|
162
|
-
|
|
168
|
+
scope.game.exceptionHandler(e);
|
|
163
169
|
}
|
|
164
170
|
}
|
|
165
171
|
}
|