From b16c0d97b02d531cfb548ba31aa87f81cd4e34c5 Mon Sep 17 00:00:00 2001 From: Digital Date: Thu, 16 May 2024 14:46:30 -0400 Subject: [PATCH] removed repeat emit and isPlaying set --- v2/src/components/VNewPersistentPlayer.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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() } }