Merge pull request #5161 from samme/fix/stopAndReleaseAudioTag

Fix error stopping HTML5AudioSound after page blur
This commit is contained in:
Richard Davey 2020-07-13 12:31:28 +01:00 committed by GitHub
commit f0cbfba8e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -382,11 +382,15 @@ var HTML5AudioSound = new Class({
*/
stopAndReleaseAudioTag: function ()
{
this.audio.pause();
this.audio.dataset.used = 'false';
this.audio = null;
this.startTime = 0;
this.previousTime = 0;
if (this.audio)
{
this.audio.pause();
this.audio.dataset.used = 'false';
this.audio = null;
}
},
/**