Video
The Video class extends the Item class to manage video playback within an engine environment, facilitating precise control over video content. This class is particularly useful for applications requiring interactive video manipulation, such as media players or a game cutscene.
Inherits from
Usage
To use this class, add the following require at the top of your script:
Reference
create
Create a new video
Parameters
selfattributes(table): list of attributes. without, the video will be created with default values
Returns
Video: of the created video
Properties
You can access these properties directly on the object or through :get("propertyName") or :set("propertyName", value) methods.
| Property | Type | Default | Description |
|---|---|---|---|
| encoding | Enum | Linear | Options: Linear, sRGB |
play
Play the video
pause
Pause the video
setTimeAbsolute
Set absolute video time in milliseconds
Parameters
time
setTimeRelative
Set relative video time (between 0 and 1).
Parameters
time