Options
All
  • Public
  • Public/Protected
  • All
Menu

Allows accessing a media resource related with certain EngineEvents.

Hierarchy

  • IEngineEventMediaResource

Index

Methods

createUrl

  • createUrl(): Promise<string>
  • Creates a URL to the resource that can used to render the resource in the browser using an Element appropriate for the resource, like for example an or

    Regardless, clients MUST call revokeUrl() with the url returned by this method to avoid memory leakage.

    Returns Promise<string>

    Resolved with a URL to the resource.

getMediaTypeCategory

  • Returns what kind of media this resource is, i.e. image, video or audio.

    Returns MediaTypeCategory

getResourceUrl

  • getResourceUrl(): string
  • Returns the URL of the resource. Note that this URL might not be usable by the browser directly. Use createUrl() to get an URL that can be used with the browser.

    Returns string

isDataUrl

  • isDataUrl(): boolean
  • Returns true if the resource URL is a data URL.

    Returns boolean

isRemoteUrl

  • isRemoteUrl(): boolean
  • Returns true if the resource URL is a remote http or https URL.

    Returns boolean

revokeUrl

  • revokeUrl(url: string): void
  • Revokes a URL previously created with createUrl(), allowing any underlying resources to be released.

    Parameters

    • url: string

      The URL to revoke.

    Returns void

toJSON

Generated using TypeDoc