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 |
|---|---|---|---|
playlist | VideoPlaylistItemInput[] | Yes | Video clips, each with an optional 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 | null | No | Stroke color |
strokeWidth | number | No | Stroke width in pixels |
shadowOptions | object | No | Full shadow configuration |
shadowColor | string | null | 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 |
addPlaylistItem(params)
Adds a clip to an existing video. Added in SDK 0.0.9.
| Property | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | Video ID |
playlistItem | VideoPlaylistItemInput | Yes | Clip source and playback settings |
playlistItemId | string | No | ID for the new clip |
previousPlaylistItemId | string | No | ID of the clip before the new clip |
nextPlaylistItemId | string | No | ID 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.
| Property | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | Video ID |
playlistItemId | string | Yes | Clip ID |
previousPlaylistItemId | string | No | ID of the clip before the moved clip |
nextPlaylistItemId | string | No | ID of the clip after the moved clip |
See ReorderVideoPlaylistItemParams. Both playlist methods return SDK results containing the updated video.