You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates a clip from a broadcaster's VOD on behalf of the broadcaster or an editor of the channel.
1312
+
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.
1313
+
1314
+
The duration of a clip can be from 5 seconds to 60 seconds in length, with a default of 30 seconds if not specified.
1315
+
1316
+
`vod_offset` indicates where the clip will end. In other words, the clip will start at (`vod_offset` - `duration`) and end at `vod_offset`.
1317
+
This means that the value of `vod_offset` must greater than or equal to the value of duration.
1318
+
1319
+
The URL in the response's `edit_url` field allows you to edit the clip's title, feature the clip, create a portrait version of the clip, download the clip media, and share the clip directly to social platforms.
1320
+
1321
+
.. note::
1322
+
Requires an app access token or user access token that includes the ``editor:manage:clips`` or ``channel:manage:clips`` scope.
1323
+
1324
+
Parameters
1325
+
----------
1326
+
editor_id: str | PartialUser,
1327
+
The user ID, or PartialUser, of the editor for the channel you want to create a clip for.
1328
+
This can be the broadcaster.
1329
+
vod_id: str,
1330
+
ID of the VOD the user wants to clip.
1331
+
vod_offset: int,
1332
+
Offset in the VOD to create the clip.
1333
+
The clip will start at (`vod_offset` - `duration`) and end at `vod_offset`.
1334
+
This means that the value of `vod_offset` must greater than or equal to the value of duration.
1335
+
title: str,
1336
+
The title of the clip.
1337
+
duration: float | None = None,
1338
+
The length of the clip, in seconds. Precision is 0.1. Defaults to 30. Min: 5 seconds, Max: 60 seconds.
1339
+
token_for: str | PartialUser | None
1340
+
An optional user token to use instead of the default app token.
1341
+
1342
+
Returns
1343
+
-------
1344
+
CreatedClip
1345
+
The CreatedClip object.
1346
+
Raises
1347
+
------
1348
+
ValueError
1349
+
Clip duration must be between 5 and 60, with precision of 0.1
1350
+
"""
1351
+
ifdurationisnotNoneandnot (5<=duration<=60):
1352
+
raiseValueError("Clip duration must be between 5 and 60, with precision of 0.1")
0 commit comments