createFromVod

suspend fun createFromVod(editorId: String, broadcasterId: String, vodId: String, vodOffset: Int, title: String, duration: Double? = null): CreatedClip

Twitch API: Create Clip From VOD

Creates a clip from a broadcaster's VOD on behalf of the broadcaster or an editor of the channel. Since a live stream is actively creating a VOD, this endpoint can also be used to create a clip from earlier in the current stream.

vod_offset indicates where the clip will end. The clip will start at (vodOffset - duration) and end at vodOffset. This means that vodOffset must be greater than or equal to duration.

Return

the created clip info containing the clip ID and edit URL.

Parameters

editorId

the user ID of the editor for the channel. If using the broadcaster's auth token, this is the same as broadcasterId. Must match the user_id in the access token.

broadcasterId

the user ID for the channel you want to create a clip for.

vodId

the ID of the VOD to clip.

vodOffset

the offset in the VOD (in seconds) where the clip ends.

title

the title of the clip.

duration

the length of the clip in seconds. Precision is 0.1. Defaults to 30. Min: 5 seconds, Max: 60 seconds.