mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Merge pull request #3313 from samme/feature/playCatchPromise
Warn if HTML5AudioSound#audio fails to play
This commit is contained in:
commit
acf88f5aa5
1 changed files with 4 additions and 1 deletions
|
@ -341,7 +341,10 @@ var HTML5AudioSound = new Class({
|
||||||
if (playPromise)
|
if (playPromise)
|
||||||
{
|
{
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
playPromise.catch(function (reason) { });
|
playPromise.catch(function (reason)
|
||||||
|
{
|
||||||
|
console.warn(reason);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue