Safely stop sounds in safari

This commit is contained in:
Eric Rosenbaum 2017-08-22 11:33:18 -04:00
parent e57484c2f5
commit 283049e514

View file

@ -48,7 +48,7 @@ class SoundPlayer {
* Stop the sound * Stop the sound
*/ */
stop () { stop () {
if (this.bufferSource) { if (this.bufferSource && this.isPlaying) {
this.bufferSource.stop(); this.bufferSource.stop();
} }
this.isPlaying = false; this.isPlaying = false;