diff --git a/src/SoundPlayer.js b/src/SoundPlayer.js index a26de1a..2afa3c0 100644 --- a/src/SoundPlayer.js +++ b/src/SoundPlayer.js @@ -79,7 +79,7 @@ SoundPlayer.prototype.finished = function () { storedContext.bufferSource.onended = function () { this.isPlaying = false; resolve(); - }; + }.bind(storedContext); }); };