diff --git a/components/video-player/controls/Controls.tv.tsx b/components/video-player/controls/Controls.tv.tsx index d1d47604..a5a25a55 100644 --- a/components/video-player/controls/Controls.tv.tsx +++ b/components/video-player/controls/Controls.tv.tsx @@ -114,6 +114,25 @@ export const Controls: FC = ({ setShowControls(!showControls); }, [showControls, setShowControls]); + // Long press seek handlers for continuous seeking + const handleSeekForward = useCallback( + (seconds: number) => { + const newPosition = Math.min(max.value, progress.value + seconds * 1000); + progress.value = newPosition; + seek(newPosition); + }, + [progress, max, seek], + ); + + const handleSeekBackward = useCallback( + (seconds: number) => { + const newPosition = Math.max(min.value, progress.value - seconds * 1000); + progress.value = newPosition; + seek(newPosition); + }, + [progress, min, seek], + ); + // Remote control hook for TV navigation const { remoteScrubProgress, @@ -132,8 +151,8 @@ export const Controls: FC = ({ togglePlay, toggleControls, calculateTrickplayUrl, - handleSeekForward: () => {}, - handleSeekBackward: () => {}, + handleSeekForward, + handleSeekBackward, }); // Slider hook diff --git a/components/video-player/controls/constants.ts b/components/video-player/controls/constants.ts index dc735cf9..812df333 100644 --- a/components/video-player/controls/constants.ts +++ b/components/video-player/controls/constants.ts @@ -1,6 +1,6 @@ export const CONTROLS_CONSTANTS = { TIMEOUT: 4000, - SCRUB_INTERVAL_MS: 10 * 1000, // 10 seconds in ms + SCRUB_INTERVAL_MS: 30 * 1000, // 30 seconds in ms SCRUB_INTERVAL_TICKS: 10 * 10000000, // 10 seconds in ticks TILE_WIDTH: 150, PROGRESS_UNIT_MS: 1000, // 1 second in ms