Skip to main content
Version: 0.0.9

Video API Reference

kittl.design.video — add and update video elements.

Scope: design:state:write

addVideo(params)​

Adds a new video element to the canvas.

PropertyTypeRequiredDescription
playlistVideoPlaylistItemInput[]YesVideo clips, each with an optional objectName
positionAbsolutePosition | RelativePositionYesPlacement on canvas
size{ width, height }NoDimensions

Returns: SdkResultAsync<NormalizedVideoObject>

updateVideo(params)​

Updates properties of an existing video.

PropertyTypeRequiredDescription
videoIdstringYesID of the video to update
positionAbsolutePosition | RelativePositionNoNew position
size{ width, height }NoNew dimensions
strokestring | nullNoStroke color
strokeWidthnumberNoStroke width in pixels
shadowOptionsobjectNoFull shadow configuration
shadowColorstring | nullNoShortcut to set just the shadow color

updatePlaylistItem(params)​

Replaces the content of a specific clip within a video's playlist.

PropertyTypeRequiredDescription
videoIdstringYesID of the video
playlistItemIdstringYesID of the playlist item to update
playlistItem{ objectName?: string, meta?: object }YesNew playlist item data (without id)

removePlaylistItem(params)​

Removes a specific clip from a video's playlist.

PropertyTypeRequiredDescription
videoIdstringYesID of the video
playlistItemIdstringYesID of the playlist item to remove

addPlaylistItem(params)​

Adds a clip to an existing video. Added in SDK 0.0.9.

PropertyTypeRequiredDescription
videoIdstringYesVideo ID
playlistItemVideoPlaylistItemInputYesClip source and playback settings
playlistItemIdstringNoID for the new clip
previousPlaylistItemIdstringNoID of the clip before the new clip
nextPlaylistItemIdstringNoID of the clip after the new clip
await kittl.design.video.addPlaylistItem({
videoId: 'video-id',
playlistItem: { objectName: 'new-video-source', playbackRate: 1, volume: 1 },
previousPlaylistItemId: 'previous-clip-id',
});

See VideoPlaylistItemInput and AddVideoPlaylistItemParams.

reorderPlaylistItem(params)​

Moves an existing clip within a video. Added in SDK 0.0.9.

PropertyTypeRequiredDescription
videoIdstringYesVideo ID
playlistItemIdstringYesClip ID
previousPlaylistItemIdstringNoID of the clip before the moved clip
nextPlaylistItemIdstringNoID of the clip after the moved clip

See ReorderVideoPlaylistItemParams. Both playlist methods return SDK results containing the updated video.