import React, {Dispatch, SetStateAction} from 'react'; import {View, GestureResponderHandlers} from 'react-native'; import {styles} from './styles'; import {formatTime} from '../../utils'; import {Text} from 'react-native'; interface SeekbarProps { seekerFillWidth: number; seekerPosition: number; seekColor: string; cachedPosition: number; seekerPanHandlers: GestureResponderHandlers; setSeekerWidth: Dispatch>; time?: number; duration: number; showDuration: boolean; showTimeRemaining: boolean; showHours: boolean; // ── NEW ─────────────────────────────────────────────────────────────── // Pass the same `seeking` boolean VideoPlayer already tracks through // your BottomControls component to Seekbar to get a VLC-style bubble // above the handle showing the exact second you're scrubbing to. // Optional and defaults to false, so this is safe to leave unwired — // nothing changes until you pass it. seeking?: boolean; } export const Seekbar = ({ seekColor, seekerFillWidth, seekerPosition, cachedPosition, seekerPanHandlers, setSeekerWidth, showDuration, showHours, showTimeRemaining, time, duration, seeking = false, }: SeekbarProps) => { return ( {formatTime({ duration, time, showDuration, showHours, showTimeRemaining, })} setSeekerWidth(event.nativeEvent.layout.width)} pointerEvents={'none'}> {seeking && ( {formatTime({ duration, time, showDuration: false, showHours, showTimeRemaining: false, })} )} {formatTime({ duration, time: duration, showDuration, showHours, showTimeRemaining, })} ); };