sdk.videoapi.addvideo
Home > @kittl/sdk > VideoAPI > addVideo
VideoAPI.addVideo() method
Creates a new video element within the design
A video contains a list of video clips called a playlist. For now we only support one clip.
The video will be created with the dimensions of the first clip in the playlist (if available) You can also create a video with a generation ID and generating state, which will show a loading state until the video is updated with an object name and the generation is complete.
It supports both absolute and relative positioning as well as custom sizing.
Signature:
addVideo(params: AddVideoParams, opts?: DesignApiOptions): Promise<NormalizedVideoObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
params | Configuration parameters for video creation | |
opts | (Optional) Optional design API configuration options |
Returns:
Promise<NormalizedVideoObject>
The newly created video object with all computed properties
Exceptions
When the video configuration is invalid or incomplete
When the specified artboard ID doesn't exist