An object that can play video.
You can create a video player with World.create_video_player(). After creating a video player, you can use it in a Gui with the Gui.video() function.
Note: The video playback system is under development. It only works on Win32 and the interfaces must be considered temporary.
Constructors and accessors
Other related reference items
stingray.Gui.update_video() stingray.Gui.update_video_3d() stingray.Gui.video() stingray.Gui.video_3d() stingray.World.create_video_player() stingray.World.destroy_video_player() | |
2D UI |
current_frame ( ) : integerReturns the number of frames that has been showed.
|
This function does not accept any parameters. |
integer |
Returns the number of frames that has been showed. |
This is zero before the first frame is shown and number_of_frames after the entire video is shown. If the video is set to loop, this value is reset to 0 for the next frame in the loop. Use VideoPlayer.times_looped() to determine how many times this has occurred.
has_audio ( ) : booleanReturns true if the video contains audio and the VideoPlayer supports it.
|
This function does not accept any parameters. |
boolean |
Returns true if the video contains audio and the VideoPlayer supports it. |
number_of_frames ( ) : integerReturns the total number of frames in the video.
|
This function does not accept any parameters. |
integer |
Returns the total number of frames. |
set_loop ( loop )Specifies whether the video must loop or freeze on the last frame when it reaches the end.
|
loop : | boolean | Specifies whether the video must loop (true or false). |
This function does not return any values. |
set_playback_speed ( video_player, speed )Sets the speed at which the video must be played.
|
video_player : | Reference to the VideoPlayer. | |
speed : | number | The speed at which the video must be played. |
This function does not return any values. |
A speed of zero pauses the video. The speed must be positive because the video cannot be played backwards.
Note: Videos use the wall timer rather than the timer of the world in which they live. This is because videos must synch with sounds that are always played in "real time". If you pause the world that the video lives in, the video still continues to play unless you explicitly pause it using set_playback_speed().
set_sound_stream_enabled ( enabled )Enables/Disables filling of the sound stream buffer by the Video Player.
|
enabled : | boolean | Specifies whether the video player's sound stream should be filled during playback. |
This function does not return any values. |
By default the sound stream is not filled by data during video playback. Using the Timpani system to trigger a video event will automatically enable the sound stream buffer and audio playback via Timpani. To use an alternate system, such as Wwise, to play the video audio, the sound stream must be enabled and retrieved via stingray.VideoPlayer.sound_stream_source to be fed to the other system.
sound_stream_source ( ) : stingray.SoundStreamSourceReturns the audio stream source associated with this Video, or nil if the video has no stream source.
|
This function does not accept any parameters. |
The audio stream source associated with this Video. |
times_looped ( ) : integerReturns the number of times the video has looped back to the beginning when it is playing with the looping enabled.
|
This function does not accept any parameters. |
integer |
Returns the number of times the video has looped back. |
If the looping is not enabled, this returns false.
Other related reference items