Skip to content

Commit

Permalink
fix: volume slider triggers swipe gesture
Browse files Browse the repository at this point in the history
  • Loading branch information
nini22P committed Oct 29, 2024
1 parent 151647f commit bcdae35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/Player/Audio/Audio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ const Audio = ({ player }: { player: HTMLVideoElement | null }) => {
)

const bind = useDrag(({ down, movement: [, my], last, event }) => {
const element = event.target as HTMLElement

if (element.classList.contains('MuiSlider-thumb'))
return

if ('pointerType' in event && event.pointerType !== 'touch') {
return
}
Expand Down

0 comments on commit bcdae35

Please sign in to comment.