@vpmedia/phaser 1.73.0 → 1.74.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @vpmedia/phaser
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/js/@vpmedia%2Fphaser)
|
|
4
4
|
[](https://github.com/vpmedia/phaser/actions/workflows/ci.yml)
|
|
5
5
|
|
|
6
6
|
@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.74.0",
|
|
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",
|
|
@@ -199,7 +199,7 @@ export const checkAudio = (device) => {
|
|
|
199
199
|
}
|
|
200
200
|
if (Object.keys(device.supportedAudioFormats).length === 0) {
|
|
201
201
|
logger.warn('No audio format support detected');
|
|
202
|
-
device.
|
|
202
|
+
device.noAudioFormat = true;
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
|
|
@@ -352,7 +352,7 @@ export class Loader {
|
|
|
352
352
|
* @returns {Loader} TBD.
|
|
353
353
|
*/
|
|
354
354
|
audio(key, urls, autoDecode = true) {
|
|
355
|
-
if (this.game.sound.noAudio) {
|
|
355
|
+
if (this.game.sound.noAudio || this.game.device.noAudioFormat) {
|
|
356
356
|
return this;
|
|
357
357
|
}
|
|
358
358
|
if (typeof urls === 'string') {
|
|
@@ -371,7 +371,7 @@ export class Loader {
|
|
|
371
371
|
* @returns {Loader} TBD.
|
|
372
372
|
*/
|
|
373
373
|
audioSprite(key, urls, jsonURL, jsonData, autoDecode = true) {
|
|
374
|
-
if (this.game.sound.noAudio) {
|
|
374
|
+
if (this.game.sound.noAudio || this.game.device.noAudioFormat) {
|
|
375
375
|
return this;
|
|
376
376
|
}
|
|
377
377
|
this.audio(key, urls, autoDecode);
|
|
@@ -757,6 +757,8 @@ export class Loader {
|
|
|
757
757
|
this.xhrLoad(file, this.transformUrl(file.url, file), 'arraybuffer', this.fileComplete);
|
|
758
758
|
} else if (this.game.sound.noAudio) {
|
|
759
759
|
this.fileError(file, null, 'Device does not have audio playback support');
|
|
760
|
+
} else if (this.game.device.noAudioFormat) {
|
|
761
|
+
this.fileError(file, null, 'Device does not have audio format support');
|
|
760
762
|
} else {
|
|
761
763
|
this.fileError(file, null, 'No supported audio URL specified');
|
|
762
764
|
}
|
|
@@ -895,7 +897,7 @@ export class Loader {
|
|
|
895
897
|
* @returns {string} TBD.
|
|
896
898
|
*/
|
|
897
899
|
getAudioURL(urls) {
|
|
898
|
-
if (this.game.sound.noAudio) {
|
|
900
|
+
if (this.game.sound.noAudio || this.game.device.noAudioFormat) {
|
|
899
901
|
return null;
|
|
900
902
|
}
|
|
901
903
|
for (let i = 0; i < urls.length; i += 1) {
|