diff --git a/src/components/player/atoms/Volume.tsx b/src/components/player/atoms/Volume.tsx index 35e9dff2..b2ea4cf4 100644 --- a/src/components/player/atoms/Volume.tsx +++ b/src/components/player/atoms/Volume.tsx @@ -47,8 +47,22 @@ export function Volume(props: Props) { if (dragging) percentage = makePercentage(dragPercentage); const percentageString = makePercentageString(percentage); + const handleWheel = useCallback( + (event: React.WheelEvent) => { + event.preventDefault(); + let newVolume = volume - event.deltaY / 1000; + newVolume = Math.max(0, Math.min(newVolume, 1)); + setVolume(newVolume); + }, + [volume, setVolume], + ); + return ( -
+
0 ? Icons.VOLUME : Icons.VOLUME_X} />