fix repeat play?

This commit is contained in:
Brandon Thomas committed 2022-03-06 10:35:28 -05:00
1 parent 6d8ffb55ad
commit e0df74093b
1 file changed
+6 -2
@@ -104,15 +104,19 @@ class WebSocketProtocol {
const sound = new Howl({
src: [maybePlayableAudio.getUrl()],
autoplay: false,
loop: false,
onend: function(soundId: number) {
that.currentSound = undefined;
that.playNextAvailableAudio(); // eagerly play the next one.
}
},
});
this.currentSound = sound;
sound.play();
sound.once('load', function() {
sound.play();
});
}
}