Options
All
  • Public
  • Public/Protected
  • All
Menu

Resource type for HTMLVideoElement.

memberof

PIXI

Hierarchy

Index

Constructors

constructor

Properties

Protected _autoUpdate

_autoUpdate: boolean

Protected _height

_height: number

Protected _isConnectedToTicker

_isConnectedToTicker: boolean

Private _isSourcePlaying

_isSourcePlaying: any

Returns true if the underlying source is playing.

returns

True if playing.

Private _isSourceReady

_isSourceReady: any

Returns true if the underlying source is ready for playing.

returns

True if ready.

Private _load

_load: any

Protected _msToNextUpdate

_msToNextUpdate: number

Private _onCanPlay

_onCanPlay: any

Fired when the video is loaded and ready to play

Private _onError

_onError: any

Handle video error events.

Private _onPlayStart

_onPlayStart: any

Runs the update loop when the video is ready to play

Private _onPlayStop

_onPlayStop: any

Fired when a pause event is triggered, stops the update loop

Private _resolve

_resolve: any

Protected _updateFPS

_updateFPS: number

Protected _width

_width: number

Protected autoPlay

autoPlay: boolean

destroyed

destroyed: boolean

internal

internal: boolean

noSubImage

noSubImage: boolean

Protected onError

onError: Runner

Protected onResize

onResize: Runner

Protected onUpdate

onUpdate: Runner

source

source: ImageSource

Static MIME_TYPES

MIME_TYPES: Dict<string>

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

constant
member

{object}

static
readonly

Static TYPES

TYPES: string[]

List of common video file extensions supported by VideoResource.

constant
member

{Array}

static
readonly

Accessors

autoUpdate

  • get autoUpdate(): boolean
  • set autoUpdate(value: boolean): void
  • Should the base texture automatically update itself, set to true by default

    member

    {boolean}

    Returns boolean

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

    Parameters

    • value: boolean

    Returns void

height

  • get height(): number
  • The height of the resource.

    member

    {number}

    readonly

    Returns number

updateFPS

  • get updateFPS(): number
  • set updateFPS(value: number): void
  • How many times a second to update the texture from the video. Leave at 0 to update at every render. A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.

    member

    {number}

    Returns number

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

    Parameters

    • value: number

    Returns void

valid

  • get valid(): boolean
  • Has been validated

    readonly
    member

    {boolean}

    Returns boolean

width

  • get width(): number
  • The width of the resource.

    member

    {number}

    readonly

    Returns number

Methods

bind

destroy

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

    Returns void

dispose

  • dispose(): void
  • Destroys this texture

    override

    Returns void

Protected load

  • Start preloading the video resource.

    Returns Promise<VideoResource>

    Handle the validate event

resize

  • resize(width: number, height: number): void
  • Trigger a resize event

    Parameters

    • width: number

      X dimension

    • height: number

      Y dimension

    Returns void

style

unbind

update

  • update(_deltaTime?: number): void
  • Trigger updating of the texture

    Parameters

    • Optional _deltaTime: number

    Returns void

upload

Static Protected crossOrigin

  • crossOrigin(element: HTMLImageElement | HTMLVideoElement, url: string, crossorigin?: string | boolean): void
  • Set cross origin based detecting the url and the crossorigin

    Parameters

    • element: HTMLImageElement | HTMLVideoElement

      Element to apply crossOrigin

    • url: string

      URL to check

    • Optional crossorigin: string | boolean

    Returns void

Static test

  • test(source: unknown, extension?: string): source is HTMLVideoElement
  • Used to auto-detect the type of resource.

    static

    Parameters

    • source: unknown

      The source object

    • Optional extension: string

      The extension of source, if set

    Returns source is HTMLVideoElement

    true if video source

Generated using TypeDoc