Interface

UseTimelineClipsResult

Result returned by `useTimelineClips`.

Signature

Type Definition
Interface UseTimelineClipsResult

Type parameters

NameConstraintDefaultDescription
TrackKindNonestringNo type parameter summary yet.

Properties

NameSignatureDescription
canMoveClip(clipId: string): booleanWhether a clip can be moved by headless edit controls.
canSlideClip(clipId: string): booleanWhether a clip can be slid by headless edit controls.
canSlipClip(clipId: string): booleanWhether a clip can be slipped by headless edit controls.
canTrimClip(clipId: string): booleanWhether a clip can be trimmed by headless edit controls.
clipsclips: TimelineClipEntry<TrackKind>[]Flattened timeline clips in track order.
deleteClip(clipId: string): TimelineCommandResultDeletes a clip from its containing track.
getClip(clipId: string): { clip: Clip; clipIndex: number; track: Track; trackIndex: number } | undefinedReturns a clip lookup from the engine, including containing track and indexes.
getClipAtPoint(input: ClipHitTestInput): ClipHitTestResult | nullHit-tests timeline clips in viewport coordinates.
getClipRect(clipId: string, geometry: TimelineInteractionGeometry = {}): ClipViewportRect | nullReturns the current viewport rectangle for a clip.
getClipSourceRange(clipIdOrClip: string | Clip): ClipSourceRange | undefinedComputes the source-media range covered by a clip.
getClipSyncKey(clipIdOrClip: string | Clip): string | undefinedReturns a stable sync key for timing-affecting clip fields.
moveClip(options: TimelineClipMoveOptions): TimelineCommandResult<TimelineClipMoveResult>Moves a clip to an absolute timeline start time and optional destination track.
selectClip(clipId: string | null): TimelineCommandResultSelects a clip by id, or clears clip selection when passed null.
selectedClipselectedClip: Clip | nullCurrently selected clip, or null when no clip is selected.
selectedClipIdselectedClipId: string | nullID of the currently selected clip, or null when no clip is selected.
selectedClipTrackIdselectedClipTrackId: string | nullID of the track containing the selected clip, or null when no clip is selected.
slideClip(clipId: string, deltaTime: RationalTime): TimelineCommandResultMoves the clip on the timeline by a relative delta.
slipClip(clipId: string, deltaTime: RationalTime): TimelineCommandResultMoves the visible source range without changing the timeline range.
sourceTimeToTimelineTime(clipIdOrClip: string | Clip, sourceTime: RationalTime): RationalTime | undefinedMaps a source-media timestamp within a clip back to timeline time.
splitClip(clipId: string, time?: RationalTime): TimelineCommandResultSplits a clip at a timeline time, defaulting to the current playhead.
timelineTimeToSourceTime(clipIdOrClip: string | Clip, timelineTime: RationalTime = ...): RationalTime | undefinedMaps a timeline timestamp within a clip to matching source-media time.
trimClip(clipId: string, edge: "start" | "end", newTime: RationalTime): TimelineCommandResultTrims one clip edge to an absolute timeline time.
updateClip(clipId: string, properties: TimelineClipUpdate): TimelineCommandResultUpdates editable clip presentation fields.