gameforge - v0.1.12
    Preparing search index...

    Class VideoResource

    Resource type for HTMLVideoElement.

    PIXI

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _autoUpdate: boolean

    true to use Ticker.shared to auto update the base texture.

    true
    
    _height: number

    Internal height of the resource.

    _isConnectedToTicker: boolean

    true if the instance is currently connected to PIXI.Ticker.shared to auto update the base texture.

    false
    
    _msToNextUpdate: number
    _updateFPS: number
    _width: number

    Internal width of the resource.

    autoPlay: boolean

    When set to true will automatically play videos used by this texture once they are loaded. If false, it will not modify the playing state.

    true
    
    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

    • Bind to a parent BaseTexture

      Parameters

      Returns void

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

      Returns void

    • Destroys this texture.

      Returns void

    • Trigger a resize event

      Parameters

      • width: number

        X dimension

      • height: number

        Y dimension

      Returns void

    • Set the style, optional to override

      Parameters

      Returns boolean

      • true is success
    • Unbind to a parent BaseTexture

      Parameters

      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