SongGuess
    Preparing search index...

    Binding entrypoint for Cloudflare Stream.

    Usage:

    • Binding-level operations: await env.STREAM.videos.upload await env.STREAM.videos.createDirectUpload await env.STREAM.videos.* await env.STREAM.watermarks.*
    • Per-video operations: await env.STREAM.video(id).downloads.* await env.STREAM.video(id).captions.*

    Example usage:

    await env.STREAM.video(id).downloads.generate();

    const video = env.STREAM.video(id)
    const captions = video.captions.list();
    const videoDetails = video.details()
    interface StreamBinding {
        videos: StreamVideos;
        watermarks: StreamWatermarks;
        createDirectUpload(
            params: StreamDirectUploadCreateParams,
        ): Promise<StreamDirectUpload>;
        upload(url: string, params?: StreamUrlUploadParams): Promise<StreamVideo>;
        video(id: string): StreamVideoHandle;
    }
    Index

    Properties

    videos: StreamVideos
    watermarks: StreamWatermarks

    Methods

    • Creates a direct upload that allows video uploads without an API key.

      Parameters

      Returns Promise<StreamDirectUpload>

      The direct upload details.

      if the parameters are invalid

      if the server received too many requests

      if an unexpected error occurs

    • Uploads a new video from a provided URL.

      Parameters

      Returns Promise<StreamVideo>

      The uploaded video details.

      if the upload parameter is invalid or the URL is invalid

      if the account storage capacity is exceeded

      if the file size is too large

      if the server received too many requests

      if a video was already uploaded to this URL

      if an unexpected error occurs

    • Returns a handle scoped to a single video for per-video operations.

      Parameters

      • id: string

        The unique identifier for the video.

      Returns StreamVideoHandle

      A handle for per-video operations.