From 0157cf68eb50ea40073c654610c38145e4fc16d6 Mon Sep 17 00:00:00 2001 From: Satont Date: Fri, 25 Aug 2023 22:07:45 +0300 Subject: [PATCH] fix(dashboard): correctly use localstorage sr player volume --- frontend/dashboard/src/components/songRequests/player.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/dashboard/src/components/songRequests/player.vue b/frontend/dashboard/src/components/songRequests/player.vue index e6e3bcb80..b6dff1c39 100644 --- a/frontend/dashboard/src/components/songRequests/player.vue +++ b/frontend/dashboard/src/components/songRequests/player.vue @@ -59,6 +59,7 @@ const playNext = () => { const isPlaying = ref(false); const sliderTime = ref(0); +const volume = useLocalStorage('twirPlayerVolume', 10); onMounted(() => { if (!player.value) return; @@ -72,6 +73,7 @@ onMounted(() => { plyr.value.on('play', () => { isPlaying.value = true; + plyr.value!.volume = volume.value / 100; emits('playing'); }); @@ -127,7 +129,7 @@ onUnmounted(() => { const playerDisplay = useLocalStorage('twirPlayerIsHidden', 'block'); const isMuted = useLocalStorage('twirPlayerIsMuted', false); -const volume = useLocalStorage('twirPlayerVolume', 10); + watch(volume, (value) => { if (!plyr.value) return;