Merge pull request #3313 from samme/feature/playCatchPromise

Warn if HTML5AudioSound#audio fails to play
This commit is contained in:
Richard Davey 2018-03-05 21:58:16 +00:00 committed by GitHub
commit acf88f5aa5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -341,7 +341,10 @@ var HTML5AudioSound = new Class({
if (playPromise)
{
// eslint-disable-next-line no-unused-vars
playPromise.catch(function (reason) { });
playPromise.catch(function (reason)
{
console.warn(reason);
});
}
},