@twilio/flex-sdk
    Preparing search index...

    Represents a media information for a message in a conversation.

    Index

    Constructors

    • Internal

      Parameters

      • data: MediaState | Media
      • services: MediaServices

      Returns Media

    Accessors

    • get category(): MediaCategory

      Media category, can be one of the MediaCategory values.

      Returns MediaCategory

    • get contentType(): string

      Content type of the media.

      Returns string

    • get filename(): null | string

      File name. Null if absent.

      Returns null | string

    • get sid(): string

      Server-assigned unique identifier for the media.

      Returns string

    • get size(): number

      Size of the media in bytes.

      Returns number

    Methods

    • Internal

      Returns MediaState

    • Returns the direct content URL for the media.

      This URL is impermanent, it will expire in several minutes and cannot be cached. If the URL becomes expired, you need to request a new one. Each call to this function produces a new temporary URL.

      Returns CancellablePromise<null | string>