Skip to content

Commit

Permalink
allow sliding to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed May 16, 2024
1 parent 9b2b8d8 commit 3a9d629
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/media-player/PositionSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const [positionState, positionSend] = useMachine(
},
onValueChangeEnd(details) {
const [value] = details.value;
if (value) {
if (value !== undefined) {
currentPosition.value = (value / 100) * currentTrackDuration.value;
newPosition.value = null;
}
Expand Down
2 changes: 1 addition & 1 deletion components/media-player/VolumeSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const [volumeState, volumeSend] = useMachine(
value: [volume.value * 100],
onValueChange(details) {
const [value] = details.value;
if (value) volume.value = value / 100;
if (value !== undefined) volume.value = value / 100;
},
}),
);
Expand Down

0 comments on commit 3a9d629

Please sign in to comment.