Class l2df.class.component.video
Video component.
Inherited from l2df.class.Component class.
Info:
- Copyright: Atom-TM 2019
- Author: Kasai
Functions
Video:added(obj, kwargs) | Component was added to Entity event. |
Video:removed(obj) | Component was removed from Entity event. |
Video:setState(obj, state) | Method to control video playback. |
Video:isPlaying(obj) | Check video's playing state. |
Video:postupdate(obj) | Component post-update event handler. |
Fields
Video.data.resource | Resource used to play the video. |
Video.data.looped | True when video's playback is looped. |
Video.data.hidding | True if the video is hidding when it's paused or stopped. |
Video.data.color | Blending color. |
Functions
Methods- Video:added(obj, kwargs)
-
Component was added to Entity event.
Adds
"video"
key to the Entity.C table.Parameters:
- obj l2df.class.entity Entity's instance.
-
kwargs
table
Keyword arguments.
- resource string Path to the video file. The only supported format is Ogg Theora.
- autoplay boolean Autoplay video as soon as the component becomes active. (default false)
- loop boolean True if component should loop the video. False otherwise. (default false)
- hiding boolean Hide the video when it's paused or stopped. (default false)
-
color
{0..255,0..255,0..255,0..255}
RGBA color used for blending. Defaults to
{255, 255, 255, 255}
(white). (optional)
- Video:removed(obj)
-
Component was removed from Entity event.
Removes
"video"
key from Entity.C table.Parameters:
- obj l2df.class.entity Entity's instance.
- Video:setState(obj, state)
-
Method to control video playback.
Parameters:
- obj l2df.class.entity Entity's instance.
- state string Action to do. One of: "play", "pause", "stop" or "toggle".
- Video:isPlaying(obj)
-
Check video's playing state.
Parameters:
- obj l2df.class.entity Entity's instance.
Returns:
-
boolean
True if the video is playing. False otherwise.
- Video:postupdate(obj)
-
Component post-update event handler.
Parameters:
- obj l2df.class.entity Entity's instance.
Fields
- Video.data.resource love.graphics.Video
- Resource used to play the video. To access use Video:data() function.
- Video.data.looped boolean
- True when video's playback is looped. False otherwise. To access use Video:data() function.
- Video.data.hidding boolean
- True if the video is hidding when it's paused or stopped. False otherwise. To access use Video:data() function.
- Video.data.color {0..1,0..1,0..1,0..1}
- Blending color. To access use Video:data() function.