Skip to content

Commit acf88f5

Browse files
authored
Merge pull request phaserjs#3313 from samme/feature/playCatchPromise
Warn if HTML5AudioSound#audio fails to play
2 parents 9ad7aee + 983772a commit acf88f5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/sound/html5/HTML5AudioSound.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,10 @@ var HTML5AudioSound = new Class({
341341
if (playPromise)
342342
{
343343
// eslint-disable-next-line no-unused-vars
344-
playPromise.catch(function (reason) { });
344+
playPromise.catch(function (reason)
345+
{
346+
console.warn(reason);
347+
});
345348
}
346349
},
347350

0 commit comments

Comments
 (0)