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.
| Property | Type | Required | Description |
|---|---|---|---|
src | string | Yes | Video source URL or objectName |
position | AbsolutePosition | RelativePosition | Yes | Placement on canvas |
size | { width, height } | No | Dimensions |
Returns: SdkResultAsync<NormalizedVideoObject>
updateVideo(params)
Updates properties of an existing video.
| Property | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | ID of the video to update |
position | AbsolutePosition | RelativePosition | No | New position |
size | { width, height } | No | New dimensions |
stroke | string | No | Stroke color |
strokeWidth | number | No | Stroke width in pixels |
shadowOptions | object | No | Full shadow configuration |
shadowColor | string | No | Shortcut to set just the shadow color |
updatePlaylistItem(params)
Replaces the content of a specific clip within a video's playlist.
| Property | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | ID of the video |
playlistItemId | string | Yes | ID of the playlist item to update |
playlistItem | { objectName?: string, meta?: object } | Yes | New playlist item data (without id) |
removePlaylistItem(params)
Removes a specific clip from a video's playlist.
| Property | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | ID of the video |
playlistItemId | string | Yes | ID of the playlist item to remove |