| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| source | HTMLVideoElement | object | string | Array.<(string|object)> | Video element to use. | ||||||||||||||||||||
| options | object | optional Options to use 
 | 
Extends
Members
- 
    
    Map of video MIME types that can't be directly derived from file extensions. 
- 
    
    List of common video file extensions supported by VideoResource. 
- 
    _height number protected inherited
- 
    
    Internal height of the resource 
- 
    _width number protected inherited
- 
    
    Internal width of the resource 
- 
    
    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. - Default Value:
- true
 
 
- 
    
    Should the base texture automatically update itself, set to true by default 
- 
    destroyed boolean readonly inherited
- 
    
    If resource has been destroyed - Default Value:
- false
 
 
- 
    height number readonly inherited
- 
    
    The height of the resource. 
- 
    internal boolean protected inherited
- 
    
    trueif resource is created by BaseTexture useful for doing cleanup with BaseTexture destroy and not cleaning up resources that were created externally.
- 
    source HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement readonly inherited
- 
    
    The source element 
- 
    
    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. 
- 
    valid boolean readonly inherited
- 
    
    Has been validated 
- 
    width number readonly inherited
- 
    
    The width of the resource. 
Methods
- 
    
    
    Used to auto-detect the type of resource. Name Type Description source* The source object extensionstring The extension of source, if set Returns:Type Description boolean trueif video source
- 
    bind (baseTexture) inherited
- 
    
    
    Bind to a parent BaseTexture Name Type Description baseTexturePIXI.BaseTexture Parent texture 
- 
    destroy () inherited
- 
    
    
    Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally. 
- 
    
    
    Clean up anything, this happens when destroying is ready. 
- 
    load ()Promise.<void> protected overrides
- 
    
    
    Start preloading the video resource. Returns:Type Description Promise.<void> Handle the validate event 
- 
    resize (width, height) inherited
- 
    
    
    Trigger a resize event Name Type Description widthnumber X dimension heightnumber Y dimension 
- 
    style (renderer, baseTexture, glTexture)boolean inherited
- 
    
    
    Set the style, optional to override Name Type Description rendererPIXI.Renderer yeah, renderer! baseTexturePIXI.BaseTexture the texture glTexturePIXI.GLTexture texture instance for this webgl context Returns:Type Description boolean trueis success
- 
    unbind (baseTexture) inherited
- 
    
    
    Unbind to a parent BaseTexture Name Type Description baseTexturePIXI.BaseTexture Parent texture 
- 
    update (deltaTime) overrides
- 
    
    
    Trigger updating of the texture Name Type Default Description deltaTimenumber 0 optional time delta since last tick 
- 
    upload (renderer, baseTexture, glTexture, source)boolean inherited
- 
    
    
    Upload the texture to the GPU. Name Type Description rendererPIXI.Renderer Upload to the renderer baseTexturePIXI.BaseTexture Reference to parent texture glTexturePIXI.GLTexture sourceHTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement optional (optional) Returns:Type Description boolean true is success