mirror of
https://github.com/photonstorm/phaser
synced 2024-11-29 16:10:56 +00:00
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)
This commit is contained in:
parent
41f81d39b7
commit
a2d145a43d
3 changed files with 4 additions and 3 deletions
|
@ -378,6 +378,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
|
|||
* 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)
|
||||
* 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)
|
||||
* 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)
|
||||
* 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)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ var Phaser = Phaser || {
|
|||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
VERSION: '2.4.7 RC1',
|
||||
VERSION: '2.4.7 RC2',
|
||||
|
||||
/**
|
||||
* An array of Phaser game instances.
|
||||
|
|
|
@ -2276,9 +2276,9 @@ Phaser.Loader.prototype = {
|
|||
var playThroughEvent = function () {
|
||||
file.data.removeEventListener('canplaythrough', playThroughEvent, false);
|
||||
file.data.onerror = null;
|
||||
// Why does this cycle through games?
|
||||
Phaser.GAMES[_this.game.id].load.fileComplete(file);
|
||||
_this.fileComplete(file);
|
||||
};
|
||||
|
||||
file.data.onerror = function () {
|
||||
file.data.removeEventListener('canplaythrough', playThroughEvent, false);
|
||||
file.data.onerror = null;
|
||||
|
|
Loading…
Reference in a new issue