Skip to main content

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
srcstringYesVideo source URL or 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
shadowColorstringNoShortcut 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