diff --git a/page/src/components/player/PlayerBar.tsx b/page/src/components/player/PlayerBar.tsx index 99f3cdd..fdec872 100644 --- a/page/src/components/player/PlayerBar.tsx +++ b/page/src/components/player/PlayerBar.tsx @@ -23,6 +23,8 @@ export default function PlayerBar({ selectedServer }: PlayerBarProps) { const [duration, setDuration] = useState(0); const isDragging = useRef(false); // 재생바를 드래그 중인지 여부 // 진행바 계산 기준점: 이 시점(at)에 위치가 pos였다 → 현재위치 = pos + (now - at) + // useRef 초기값은 최초 렌더 1회만 평가되므로 Date.now() 호출이 안전(리렌더마다 재실행 안 됨). + // eslint-disable-next-line react-hooks/purity const anchorRef = useRef<{ pos: number; at: number }>({ pos: 0, at: Date.now() }); const prevVolumeRef = useRef(50); // 드래그 시작 시점 볼륨(실패 시 롤백용) // 👇 [추가할 부분] 볼륨 바를 잡고 있는지 여부 추적