Merge pull request #60 from LLK/bugfix/safari-stop

Safely stop sounds in safari
This commit is contained in:
Eric Rosenbaum 2017-08-22 14:13:36 -04:00 committed by GitHub
commit 3cad765e76

View file

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