new PIXI.VideoBaseTexture(source, scaleMode)
| Name | Type | Default | Description |
|---|---|---|---|
source |
HTMLVideoElement |
Video source |
|
scaleMode |
number | PIXI.settings.SCALE_MODE |
optional
See PIXI.SCALE_MODES for possible values |
Extends
Members
-
autoPlayboolean
-
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
-
autoUpdateboolean
-
Should the base texture automatically update itself, set to true by default
Methods
-
staticPIXI.VideoBaseTexture.fromUrl(videoSrc, scaleMode){PIXI.VideoBaseTexture}
-
Helper function that creates a new BaseTexture based on the given video element. This BaseTexture can then be used to create a texture
Name Type Description videoSrcstring | object | Array.<string> | Array.<object> The URL(s) for the video.
Name Type Description srcstring optional One of the source urls for the video
mimestring optional The mimetype of the video (e.g. 'video/mp4'). If not specified the url's extension will be used as the second part of the mime type.
scaleModenumber See PIXI.SCALE_MODES for possible values
Returns:
Type Description PIXI.VideoBaseTexture Newly created VideoBaseTexture -
staticPIXI.VideoBaseTexture.fromVideo(video, scaleMode){PIXI.VideoBaseTexture}
-
Mimic Pixi BaseTexture.from.... method.
Name Type Default Description videoHTMLVideoElement Video to create texture from
scaleModenumber PIXI.settings.SCALE_MODE optional See PIXI.SCALE_MODES for possible values
Returns:
Type Description PIXI.VideoBaseTexture Newly created VideoBaseTexture -
destroy()
-
Destroys this texture
Events
-
Fired when BaseTexture is destroyed.
Name Type Description baseTexturePIXI.BaseTexture Instance of texture being destroyed.
-
Fired when a not-immediately-available source fails to load.
Name Type Description baseTexturePIXI.BaseTexture Resource errored.
-
Fired when a not-immediately-available source finishes loading.
Name Type Description baseTexturePIXI.BaseTexture Resource loaded.
-
Fired when BaseTexture is updated.
Name Type Description baseTexturePIXI.BaseTexture Instance of texture being updated.