.do
ApiPlatform

Stream

A serverless video platform for uploading, storing, encoding, and delivering live and on-demand video content globally.

Note: Implemented using Cloudflare Stream with automatic encoding, global delivery, and analytics.

Stream

A serverless video platform for uploading, storing, encoding, and delivering live and on-demand video content globally.

Note: Implemented using Cloudflare Stream with automatic encoding, global delivery, and analytics.

Properties

  • id (string): Unique identifier for the video stream.
  • name (string): The name or title of the video.
  • owner ([[User]] ): [[Business]]
  • type (string): Stream type (on-demand, live, recording).
  • url ([[URL]]): Playback URL for the video stream.
  • uploadUrl ([[URL]]): One-time upload URL for direct user uploads.
  • thumbnail ([[URL]]): Video thumbnail image URL.
  • duration (number): Video duration in seconds (for on-demand content).
  • size (number): Video file size in bytes.
  • resolution (string): Video resolution (1080p, 720p, 480p, etc.).
  • encoding (string): Encoding status (queued, inprogress, ready, error).
  • format (string): Video format (mp4, hls, dash).
  • access (string): Access control (public, private, signed).
  • signedUrl ([[URL]]): Signed URL for restricted content access.
  • analytics (object): Viewing metrics (views, watch time, engagement).
  • captions (object[]): Subtitle/caption tracks for accessibility.
  • created (number): When the stream was created (Unix timestamp).
  • uploaded (number): When the video was uploaded (Unix timestamp).
  • metadata (object): Set of key-value pairs for storing additional information.

Actions

create

Create a new video stream.

Input: [[Stream]]
Output: [[Stream]]

upload

Upload video content to the stream.

Input: [[VideoUpload]]
Output: [[Stream]]

delete

Permanently remove the video stream.

Input: [[Stream]]
Output: [[Stream]]

getUploadUrl

Generate one-time upload URL for end users.

Input: [[Stream]]
Output: [[URL]]

getSignedUrl

Generate signed URL for restricted access.

Input: [[StreamSignedUrlRequest]]
Output: [[URL]]

updateAccess

Change access control settings.

Input: [[StreamAccess]]
Output: [[Stream]]

addCaptions

Add subtitle or caption track to video.

Input: [[StreamCaptions]]
Output: [[Stream]]

removeCaptions

Remove subtitle or caption track from video.

Input: [[StreamCaptions]]
Output: [[Stream]]

startLive

Begin live streaming session.

Input: [[Stream]]
Output: [[Stream]]

stopLive

End live streaming session.

Input: [[Stream]]
Output: [[Stream]]

getAnalytics

Retrieve viewing metrics and performance data.

Input: [[Stream]]
Output: object

getThumbnail

Get or generate video thumbnail.

Input: [[Stream]]
Output: [[URL]]

Events

  • created: Triggered when a new video stream is created.
  • uploaded: Triggered when video content is uploaded.
  • deleted: Triggered when video stream is removed.
  • Encoding.started: Triggered when video encoding begins.
  • Encoding.completed: Triggered when video encoding finishes.
  • Encoding.failed: Triggered when video encoding encounters error.
  • viewed: Triggered when video is played by a viewer.
  • Live.started: Triggered when live stream begins.
  • Live.stopped: Triggered when live stream ends.
  • Access.updated: Triggered when access control settings change.
  • Captions.added: Triggered when captions are added to video.