Interface

UseTimelineTrackResult

Result returned by `useTimelineTrack`.

Usage notes

The result is scoped to one track row and includes both state flags and row-level commands. It also includes `rect`, which is aligned with canvas track geometry for DOM overlays, resize handles, and track header layouts.

Signature

Type Definition
Interface UseTimelineTrackResult

Properties

NameSignatureDescription
collapsedcollapsed: booleanWhether the track row is collapsed.
existsexists: booleanWhether the requested track exists.
groupIdgroupId: string | undefinedOptional track group id.
heightheight: numberExpanded row height in pixels, matching canvas geometry.
kindkind: string | nullApp-defined track kind, or null when the track is missing.
lockedlocked: booleanWhether the track is locked for editing.
moveTrack(toIndex: number): TimelineCommandResultMoves this track to a final zero-based row index.
mutedmuted: booleanWhether the track is muted.
namename: string | undefinedUser-facing track name, when set.
rectrect: Readonly<TimelineTrackRect> | nullViewport row rectangle matching canvas track geometry.
renameTrack(name: string | undefined): TimelineCommandResultRenames this track, or clears its app-defined name.
selectedselected: booleanWhether the track itself is selected.
selectTrack(): TimelineCommandResultSelects this track.
setCollapsed(collapsed: boolean): TimelineCommandResultSets this row's collapsed state.
setLocked(locked: boolean): TimelineCommandResultSets this track's locked state.
setMuted(muted: boolean): TimelineCommandResultSets this track's muted state.
setTrackGroup(groupId: string | undefined): TimelineCommandResultAssigns this track to a group, or clears its group.
setTrackHeight(height: number): TimelineCommandResultSets this track's expanded display height in pixels.
setTrackTarget(targeted: boolean): TimelineCommandResultSets this track's edit-targeted state.
setVisible(visible: boolean): TimelineCommandResultSets this track's output visibility.
targetedtargeted: booleanWhether the track is targeted for edit operations.
toggleCollapse(): TimelineCommandResultToggles this row's collapsed state.
toggleLock(): TimelineCommandResultToggles this track's locked state.
toggleMute(): TimelineCommandResultToggles this track's muted state.
toggleTrackTarget(): TimelineCommandResultToggles this track's edit-targeted state.
toggleVisibility(): TimelineCommandResultToggles this track's output visibility.
tracktrack: object | nullCurrent track, or null when the id is missing.
trackIdtrackId: stringRequested track id.
trackIndextrackIndex: numberZero-based track index, or -1 when the track is missing.
visiblevisible: booleanWhether the track participates in active layer and media lookup.