Skip to main content
Version: 0.0.1

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
playlistOmit<VideoPlaylistItem, "id">[]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
strokestringNoStroke 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