Videos class

The Videos service allows you to transcode video files into adaptive HLS and DASH streams.

Constructors

Videos(Client client)
Initializes a Videos service

Properties

client → Client
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

create({required String videoId, required String bucketId, required String fileId, String? name, List<String>? permissions}) → Future<Video>
Create a video resource from an existing file in a storage bucket. The source file must be a video or audio file, and the caller must be able to read that file. Creating a video stores the document and queues timeline generation. The worker downloads the source, probes metadata, extracts embedded captions once, and deletes its working copy when finished. Sources with a video track also get a thumbnail timeline. Call create-rendition to package a streaming output.
createCaption({required String videoId, required String bucketId, required String fileId, required String name, required String language, bool? xdefault}) → Future<VideoCaption>
Add a caption track to a video from a WebVTT or SubRip file in a storage bucket. The file is normalised to WebVTT and segmented in the background. Subscribe to videos.[videoId].captions.[captionId].update for started, ready, and error status changes instead of only polling the caption document.
delete({required String videoId}) → Future
Delete a video by its unique ID. This also removes every rendition, caption, preview and transcoded artifact derived from it. Fails with video_rendition_in_progress while a rendition is started or ended, unless that rendition has not been updated within the rendition retention window. Fails with video_timeline_in_progress while the video's timeline is being generated, unless the video has not been updated within the same window.
deleteCaption({required String videoId, required String captionId}) → Future
Delete a caption track by its unique ID, along with its packaged segments.
deleteRendition({required String videoId, required String renditionId}) → Future
Delete a rendition by its unique ID, along with its packaged segments and transcoded output. Fails with video_rendition_in_progress while the rendition is started or ended, unless it has not been updated within the rendition retention window.
get({required String videoId}) → Future<Video>
Get a video by its unique ID. This endpoint response returns a JSON object with the video metadata.
getCaptionManifest({required String videoId, required VideoOutput output, required String captionId}) → Future<Uint8List>
Get the playable caption resource for a video output: an HLS captions playlist, or the WebVTT file itself for DASH.
getCmafDashManifest({required String videoId}) → Future<Uint8List>
Get the top-level streaming manifest for a video output: an HLS master playlist (master.m3u8) or a DASH MPD (master.mpd). Hand this URL to a player to begin adaptive playback.
getCmafHlsManifest({required String videoId}) → Future<Uint8List>
Get the top-level streaming manifest for a video output: an HLS master playlist (master.m3u8) or a DASH MPD (master.mpd). Hand this URL to a player to begin adaptive playback.
getDashManifest({required String videoId}) → Future<Uint8List>
Get the top-level streaming manifest for a video output: an HLS master playlist (master.m3u8) or a DASH MPD (master.mpd). Hand this URL to a player to begin adaptive playback.
getHlsManifest({required String videoId}) → Future<Uint8List>
Get the top-level streaming manifest for a video output: an HLS master playlist (master.m3u8) or a DASH MPD (master.mpd). Hand this URL to a player to begin adaptive playback.
getRendition({required String videoId, required String renditionId}) → Future<VideoRendition>
Get a rendition by its unique ID, including its current transcoding status and progress.
getThumbnail({required String videoId, required String thumbnailId, int? width, int? height, ImageFormat? output}) → Future<Uint8List>
Get a single thumbnail sheet from a video's timeline as an image. You can resize the returned image and choose its output format.
getTimeline({required String videoId}) → Future<Uint8List>
Get the WebVTT thumbnail timeline for a video, used to render scrubbing thumbnails in a player. Timeline generation is queued when the video is created. Subscribe to videos.[videoId].timelines.update for probe and terminal updates, or poll this endpoint until it returns a WebVTT document. Audio-only sources produce no timeline and this endpoint returns video_timelines_not_found.
list({List<String>? queries, bool? total}) → Future<VideoList>
Get a list of videos in the current project. Sessions receive only videos they can read according to each video's $permissions. API keys and admins receive the full project catalog. Playback uses the same document read ACL plus the videos.play (or videos.read) scope: a guest can stream a video that grants read("any") or read("guests") even though guests lack videos.read and will not see it in this list.
listCaptions({required String videoId, List<String>? queries, bool? total}) → Future<VideoCaptionList>
Get a list of all the caption tracks attached to a video. You can use the query params to filter your results.
listCodecs() → Future<VideoCodecList>
Get a list of video encode codecs enabled on this instance. Each codec includes the output formats it may be packaged into.
listRenditions({required String videoId, List<String>? queries, bool? total}) → Future<VideoRenditionList>
Get a list of all the renditions of a video. You can use the query params to filter your results.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
update({required String videoId, String? name, List<String>? permissions}) → Future<Video>
Update a video's name, permissions, or both. Only the fields you pass are changed: omit name to keep the current name and permissions to keep the current ACL. The caller must hold update permission on the video document. The source file cannot be replaced; delete the video and create a new one to point at a different file.
updateCaption({required String videoId, required String captionId, String? bucketId, String? fileId, String? name, String? language, bool? xdefault}) → Future<VideoCaption>
Update a caption track by its unique ID. Pass only name, language, and/or default to retag an extracted track (for example und → heb for Hebrew) without replacing the file. Changing bucketId/fileId re-packages the track in the background.

Operators

operator ==(Object other) → bool
The equality operator.
inherited