Skip to content

Commit a2d145a

Browse files
committed
When the Loader loads audio via the Audio tag, instead of Web Audio, it used to use Phaser.GAMES[_this.game.id].load as the callback handler, which would stop it from working if you had multiple Loaders set-up within Phaser. It now uses a local reference to _this instead (thanks @SBCGames phaserjs#2435)
1 parent 41f81d3 commit a2d145a

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
378378
* Emitter.start when used with a false `explode` parameter would cumulatively add particles to the current total. With quantity 10 the first call would emit 10 particles, the next 20, and so on. Calls to start will now reset the quantity each time. This is a behavior change from earlier versions, so if you relied on the old way please account for it in your code (thanks @BdR76 #2187)
379379
* You can now pass in your own Canvas element to Phaser and it will use that instead of creating one itself. To do so you must pass a Game Configuration object to Phaser when you instantiate it, and set the `canvas` property of the config object to be the DOM element you wish to use, i.e.: `{ canvas: document.getElementById('yourCanvas') }` (thanks @Friksel #2311)
380380
* When loading Video with the `asBlob` argument set it now uses a 'blob' type for the XHR loader, and doesn't cast the resulting file as a Blob upon load. This fixes loading videos as blobs on Chrome for Android (thanks @JuCarr #2433)
381+
* When the Loader loads audio via the Audio tag, instead of Web Audio, it used to use `Phaser.GAMES[_this.game.id].load` as the callback handler, which would stop it from working if you had multiple Loaders set-up within Phaser. It now uses a local reference to `_this` instead (thanks @SBCGames #2435)
381382

382383
### Bug Fixes
383384

src/Phaser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var Phaser = Phaser || {
1515
* @constant
1616
* @type {string}
1717
*/
18-
VERSION: '2.4.7 RC1',
18+
VERSION: '2.4.7 RC2',
1919

2020
/**
2121
* An array of Phaser game instances.

src/loader/Loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,9 +2276,9 @@ Phaser.Loader.prototype = {
22762276
var playThroughEvent = function () {
22772277
file.data.removeEventListener('canplaythrough', playThroughEvent, false);
22782278
file.data.onerror = null;
2279-
// Why does this cycle through games?
2280-
Phaser.GAMES[_this.game.id].load.fileComplete(file);
2279+
_this.fileComplete(file);
22812280
};
2281+
22822282
file.data.onerror = function () {
22832283
file.data.removeEventListener('canplaythrough', playThroughEvent, false);
22842284
file.data.onerror = null;

0 commit comments

Comments
 (0)