feat: Enable Playhead Dragging for Video Navigation

This commit is contained in:
Pulkit Garg
2025-06-24 10:28:58 +05:30
parent 4260d4be08
commit e664ea0271
4 changed files with 64 additions and 14 deletions

View File

@ -42,7 +42,7 @@ export function VideoPlayer({
if (!video) return;
const handleSeekEvent = (e: CustomEvent) => {
if (!isInClipRange) return;
// Always update video time, even if outside clip range
const timelineTime = e.detail.time;
const newVideoTime = Math.max(trimStart, Math.min(
clipDuration - trimEnd,
@ -52,7 +52,7 @@ export function VideoPlayer({
};
const handleUpdateEvent = (e: CustomEvent) => {
if (!isInClipRange) return;
// Always update video time, even if outside clip range
const timelineTime = e.detail.time;
const targetVideoTime = Math.max(trimStart, Math.min(
clipDuration - trimEnd,