mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Sound.resume wouldn't properly restart looped sounds in Chrome after being paused. Phaser now specifically handles the Chrome 42 bug and later fix (thanks @nkovacs #1820)
This commit is contained in:
parent
c518fa32b7
commit
ab8c98676e
3 changed files with 18 additions and 2 deletions
|
@ -383,7 +383,7 @@ Version 2.4 - "Katar" - in dev
|
|||
* Tween.to and Tween.from can now accept `null` as the ease parameter value. If `null` it will use the default tween, as per the documentation (thanks @nkovacs #1817)
|
||||
* TilemapParser.parseTiledJSON would ignore 'falsey' properties set on Objects in Tiled JSON tilemaps, such as `x: 0` or `visible: false`. These properties are now accurately copied over to the destination map data (thanks @MaksJS #1818)
|
||||
* Removed un-necessary PIXI.TextureCache pollution in Phaser.LoaderParser.bitmapFont.
|
||||
*
|
||||
* Sound.resume wouldn't properly restart looped sounds in Chrome after being paused. Phaser now specifically handles the Chrome 42 bug and later fix (thanks @nkovacs #1820)
|
||||
|
||||
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).
|
||||
|
||||
|
|
|
@ -804,7 +804,22 @@ Phaser.Sound.prototype = {
|
|||
}
|
||||
else
|
||||
{
|
||||
this._sound.start(0, p, duration);
|
||||
if (this.loop && this.game.device.chrome)
|
||||
{
|
||||
// Handle chrome bug: https://code.google.com/p/chromium/issues/detail?id=457099
|
||||
if (this.game.device.chromeVersion === 42)
|
||||
{
|
||||
this._sound.start(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
this._sound.start(0, p);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this._sound.start(0, p, duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
1
typescript/phaser.d.ts
vendored
1
typescript/phaser.d.ts
vendored
|
@ -654,6 +654,7 @@ declare module Phaser {
|
|||
canvas: boolean;
|
||||
chrome: boolean;
|
||||
chromeOS: boolean;
|
||||
chromeVersion: number;
|
||||
cocoonJS: boolean;
|
||||
cocoonJSApp: boolean;
|
||||
cordova: boolean;
|
||||
|
|
Loading…
Reference in a new issue