Strands Agents Typescript SDK
    Preparing search index...

    Class VideoBlock

    Video content block.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    type: "videoBlock" = ...

    Discriminator for video content.

    format: VideoFormat

    Video format.

    source: VideoSource

    Video source.

    Methods

    • Serializes the VideoBlock to a JSON-compatible ContentBlockData object. Called automatically by JSON.stringify(). Uint8Array bytes are encoded as base64 string.

      Returns {
          video: {
              format: VideoFormat;
              source:
                  | { bytes: string }
                  | { s3Location: { uri: string; bucketOwner?: string } };
          };
      }

    • Creates a VideoBlock instance from its wrapped data format. Base64-encoded bytes are decoded back to Uint8Array.

      Parameters

      • data: {
            video: {
                format: VideoFormat;
                source:
                    | { bytes: string
                    | Uint8Array<ArrayBufferLike> }
                    | { s3Location: { uri: string; bucketOwner?: string } };
            };
        }

        Wrapped VideoBlockData to deserialize (accepts both string and Uint8Array for bytes)

      Returns VideoBlock

      VideoBlock instance