fix repeat play?
This commit is contained in:
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user