mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2025-01-03 11:35:49 -05:00
Safely stop sounds in safari
This commit is contained in:
parent
e57484c2f5
commit
283049e514
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue