mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
SoundManager.unlock checks for audio start
support and falls back to noteOn
if not found.
This commit is contained in:
parent
30ef362e59
commit
65f8820514
2 changed files with 10 additions and 2 deletions
|
@ -66,7 +66,7 @@ Version 2.3.0 - "Tarabon" - in dev
|
|||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
* SoundManager.unlock checks for audio `start` support and falls back to `noteOn` if not found.
|
||||
|
||||
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).
|
||||
|
||||
|
|
|
@ -236,7 +236,15 @@ Phaser.SoundManager.prototype = {
|
|||
this._unlockSource = this.context.createBufferSource();
|
||||
this._unlockSource.buffer = buffer;
|
||||
this._unlockSource.connect(this.context.destination);
|
||||
this._unlockSource.noteOn(0);
|
||||
|
||||
if (typeof this._unlockSource.start === 'undefined')
|
||||
{
|
||||
this._unlockSource.noteOn(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
this._unlockSource.start(0);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue