@rendley/sdk - v1.12.6
    Preparing search index...

    Class VideoResource

    Resource type for HTMLVideoElement.

    PIXI

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    destroyed: boolean

    If resource has been destroyed.

    false
    
    internal: boolean

    true if resource is created by BaseTexture useful for doing cleanup with BaseTexture destroy and not cleaning up resources that were created externally.

    source: HTMLVideoElement

    Override the source to be the video element.

    src: string

    The url of the resource

    MIME_TYPES: Dict<string>

    Map of video MIME types that can't be directly derived from file extensions.

    TYPES: string[]

    List of common video file extensions supported by VideoResource.

    Accessors

    • get autoUpdate(): boolean

      Should the base texture automatically update itself, set to true by default.

      Returns boolean

    • set autoUpdate(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get height(): number

      The height of the resource.

      Returns number

    • get updateFPS(): number

      How many times a second to update the texture from the video. If 0, requestVideoFrameCallback is used to update the texture. If requestVideoFrameCallback is not available, the texture is updated every render. A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.

      Returns number

    • set updateFPS(value: number): void

      Parameters

      • value: number

      Returns void

    • get valid(): boolean

      Has been validated

      Returns boolean

    • get width(): number

      The width of the resource.

      Returns number

    Methods

    • Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.

      Returns void

    • Start preloading the video resource.

      Returns Promise<VideoResource>

      Handle the validate event

    • Trigger a resize event

      Parameters

      • width: number

        X dimension

      • height: number

        Y dimension

      Returns void

    • Trigger updating of the texture.

      Parameters

      • Optional_deltaTime: number

        time delta since last tick

      Returns void

    • Set cross origin based detecting the url and the crossorigin

      Parameters

      • element: HTMLImageElement | HTMLVideoElement

        Element to apply crossOrigin

      • url: string

        URL to check

      • Optionalcrossorigin: string | boolean

        Cross origin value to use

      Returns void

    • Used to auto-detect the type of resource.

      Parameters

      • source: unknown

        The source object

      • Optionalextension: string

        The extension of source, if set

      Returns source is HTMLVideoElement

      true if video source