MCPcopy Create free account
hub / github.com/CapSoftware/Cap / getTimelineDisplayDuration

Function getTimelineDisplayDuration

apps/web/lib/video-edits.ts:454–461  ·  view source on GitHub ↗
(state: VideoTimelineState)

Source from the content-addressed store, hash-verified

452}
453
454export function getTimelineDisplayDuration(state: VideoTimelineState) {
455 const duration = normalizeDuration(state.duration);
456 const deletedDuration = getDisplayDeletedRanges({
457 ...state,
458 duration,
459 }).reduce((total, range) => total + Math.max(0, range.end - range.start), 0);
460 return roundEditTime(Math.max(0, duration - deletedDuration));
461}
462
463export function mapTimelineSourceTimeToDisplayTime(
464 state: VideoTimelineState,

Callers 4

EditVideoClientFunction · 0.90

Calls 3

normalizeDurationFunction · 0.85
getDisplayDeletedRangesFunction · 0.85
roundEditTimeFunction · 0.85

Tested by

no test coverage detected