Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
source |
HTMLVideoElement | object | string | Array.<(string|object)> |
Video element to use. |
||||||||||||||||
options |
object |
optional
Options to use
|
Extends
Members
-
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.
-
onResize Runner inherited
-
Mini-runner for handling resize events
-
onUpdate Runner inherited
-
Mini-runner for handling update events
-
source HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement readonly inherited
-
The source element
-
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
extension
string The extension of source, if set
Returns:
Type Description boolean true
if video source -
bind (baseTexture) inherited
-
Bind to a parent BaseTexture
Name Type Description baseTexture
PIXI.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.
-
This can be overriden to start preloading a resource or do any other prepare step.
Returns:
Type Description Promise Handle the validate event -
resize () inherited
-
Trigger a resize event
-
style (renderer, baseTexture, glTexture)boolean inherited
-
Set the style, optional to override
Name Type Description renderer
PIXI.Renderer yeah, renderer!
baseTexture
PIXI.BaseTexture the texture
glTexture
PIXI.glCore.Texture texture instance for this webgl context
Returns:
Type Description boolean true
is success -
unbind (baseTexture) inherited
-
Unbind to a parent BaseTexture
Name Type Description baseTexture
PIXI.BaseTexture Parent texture
-
update () inherited
-
Has been updated trigger event
-
upload (renderer, baseTexture, glTexture, source) inherited
-
Upload the texture to the GPU.
Name Type Description renderer
PIXI.Renderer Upload to the renderer
baseTexture
PIXI.BaseTexture Reference to parent texture
glTexture
PIXI.glCore.GLTexture Reference
source
HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement (optional)