Skip to content

Commit

Permalink
fix(dashboard): correctly use localstorage sr player volume
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed Aug 25, 2023
1 parent ba00f78 commit 0157cf6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/dashboard/src/components/songRequests/player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const playNext = () => {
const isPlaying = ref(false);
const sliderTime = ref(0);
const volume = useLocalStorage('twirPlayerVolume', 10);
onMounted(() => {
if (!player.value) return;
Expand All @@ -72,6 +73,7 @@ onMounted(() => {
plyr.value.on('play', () => {
isPlaying.value = true;
plyr.value!.volume = volume.value / 100;
emits('playing');
});
Expand Down Expand Up @@ -127,7 +129,7 @@ onUnmounted(() => {
const playerDisplay = useLocalStorage<string>('twirPlayerIsHidden', 'block');
const isMuted = useLocalStorage('twirPlayerIsMuted', false);
const volume = useLocalStorage('twirPlayerVolume', 10);
watch(volume, (value) => {
if (!plyr.value) return;
Expand Down

0 comments on commit 0157cf6

Please sign in to comment.