diff --git a/v2/src/components/VNewPersistentPlayer.vue b/v2/src/components/VNewPersistentPlayer.vue index 960550b..fdaa7e0 100644 --- a/v2/src/components/VNewPersistentPlayer.vue +++ b/v2/src/components/VNewPersistentPlayer.vue @@ -447,12 +447,8 @@ const togglePlay = () => { // Play or pause the sound. if ($mediaPlayerRef.value && isPlayable.value) { if (isPlaying.value) { - emit("toggle-play", false) - isPlaying.value = false $mediaPlayerRef.value.pause() } else { - isPlaying.value = true - emit("toggle-play", true) $mediaPlayerRef.value.play() } } @@ -460,12 +456,14 @@ const togglePlay = () => { // exposed method to handle the play const play = () => { if ($mediaPlayerRef.value && isPlayable.value) { + isPlaying.value = true $mediaPlayerRef.value.play() } } // exposed method to handle the pause const pause = () => { if ($mediaPlayerRef.value && isPlayable.value) { + isPlaying.value = false $mediaPlayerRef.value.pause() } }