Members
defaultOptions VideoSourceOptions static
The default options for video sources.
Properties:
Name | Type | Default | Description |
---|---|---|---|
autoLoad |
boolean |
true
|
If true, the video will start loading immediately. |
autoPlay |
boolean |
true
|
If true, the video will start playing as soon as it is loaded. |
crossorigin |
boolean |
true
|
If true, the video will be loaded with the |
loop |
boolean |
false
|
If true, the video will loop when it ends. |
muted |
boolean |
true
|
If true, the video will be muted. |
playsinline |
boolean |
true
|
If true, the video will play inline. |
preload |
boolean |
false
|
If true, the video will be preloaded. |
updateFPS |
number |
0
|
The number of times a second to update the texture from the video. Leave at 0 to update at every render. |
Map of video MIME types that can't be directly derived from file extensions.
Should the base texture automatically update itself, set to true by default.
Whether or not the video is ready to play.
- Default Value:
- false
Checks if the resource has valid dimensions.
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.
The upload method for this texture.
- Default Value:
- "video"
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
Methods
Cleans up resources and event listeners associated with this texture.
Start preloading the video resource.
Returns:
Type | Description |
---|---|
Promise<this> | Handle the validate event |
Update the video frame if the source is not destroyed and meets certain conditions.