Actions5
- Draft Actions
Draft → Add Video
AI-generatedSummary
Add a video clip to an existing Jianying draft by specifying the draft ID and video URL along with optional parameters to control positioning, timing, scaling, opacity, transition, and other visual properties.
Inputs
- draftId (required) — The ID of the draft to which the video will be added.
- videoUrl (required) — The URL address of the video file to add.
- canvasWidth — The width of the canvas for the video layer.
- canvasHeight — The height of the canvas for the video layer.
- start — The starting time offset (in seconds) from which to trim the video clip.
- end — The ending time offset (in seconds) for the video clip; 0 means till the end of the source.
- volume — The volume level of the video's audio track (0 to 1).
- speed — Playback speed multiplier; greater than 1 speeds up, less than 1 slows down.
- targetStart — The starting position (in seconds) of the clip on the draft's timeline.
- trackName — The name of the track to which the video is added, for organizing different tracks.
- scaleX — Scaling factor on the X axis.
- scaleY — Scaling factor on the Y axis.
- transformX — Horizontal position offset on the canvas.
- transformY — Vertical position offset on the canvas.
- transition — Type of transition effect to apply (e.g., cloud, fade).
- transitionDuration — Duration of the transition effect in seconds.
- maskType — Type of mask to apply to the video (e.g., circle, rectangle).
- alpha — Opacity level of the video (0 fully transparent to 1 fully opaque).
- jsonParameters — Optional JSON string to pass all parameters directly, overriding the individual fields.
Output shape
a single JSON object representing the updated draft with the added video or an error message
If JSON parameters are provided, they override individual input fields. The response includes details from the Jianying API about the modified draft state.