Usage notes
The result combines keyframe lists, viewport geometry, visible geometry, and mutation commands. Use it for keyframe inspectors, custom DOM overlays, property editors, and toolbar actions. For pointer-driven dragging, combine it with useTimelineKeyframeDrag; for Bezier easing handles, combine it with useTimelineKeyframeTangentDrag.
Signature
Interface UseTimelineKeyframesResultType parameters
| Name | Constraint | Default | Description |
|---|---|---|---|
TrackKind | None | string | App-defined track kind values carried by returned track entries. |
Properties
| Name | Signature | Description |
|---|---|---|
clearKeyframeSelection | (): TimelineCommandResult | Clears keyframe selection. |
getPropertyValueAtTime | (clipId: string, property: string, time?: RationalTime): number | undefined | Evaluates a keyframed property at a timeline time. |
keyframeRects | keyframeRects: TimelineKeyframeRect<TrackKind>[] | Viewport-space keyframe geometry in track order. |
keyframes | keyframes: TimelineKeyframe[] | Clip-scoped keyframes for `clipId`, or all keyframes from visible rects when no clip is scoped. |
removeKeyframe | (clipId: string, keyframeId: string, options?: TimelineKeyframeMutationOptions): TimelineCommandResult<TimelineKeyframe> | Removes one keyframe from a clip. |
selectKeyframe | (clipId: string | null, keyframeId: string | null): TimelineCommandResult | Selects one keyframe, or clears keyframe selection when ids are null. |
setKeyframe | (input: TimelineSetClipKeyframeOptions, options?: TimelineKeyframeMutationOptions): TimelineCommandResult<TimelineKeyframe> | Adds or updates one keyframe by clip, property, and exact timeline time. |
updateKeyframe | (input: TimelineUpdateClipKeyframeOptions, options?: TimelineKeyframeMutationOptions): TimelineCommandResult<TimelineKeyframe> | Updates one existing keyframe. |
visibleKeyframes | visibleKeyframes: VisibleTimelineKeyframe<TrackKind>[] | Viewport-intersecting keyframe geometry in track order. |