API:VideoPlayerIsPlaying
From RoR Wiki
UI Lua API · Interface functions
Version: WAR 1.4.8
Returns whether the client's video player is currently active.
playing = VideoPlayerIsPlaying()
Arguments
None.
Returns
- playing
boolean–trueif the video player currently has a video.
Details
- The client reports whether its video player object holds a video at the moment of the call.
- The stock video window follows the
SystemData.Events.VIDEO_PLAYER_STARTandSystemData.Events.VIDEO_PLAYER_STOPevents, and callsVideoPlayerIsPlayingonce when it is created to catch a video that is already playing. - Arguments are not checked; anything passed is ignored.
Errors
None.
Example
From ea_videoplayer/source/videoplayer.lua:
function EA_Window_VideoPlayer.Initialize()
WindowRegisterEventHandler( "EA_Window_VideoPlayer", SystemData.Events.VIDEO_PLAYER_START, "EA_Window_VideoPlayer.OnVideoBegin" )
WindowRegisterEventHandler( "EA_Window_VideoPlayer", SystemData.Events.VIDEO_PLAYER_STOP, "EA_Window_VideoPlayer.OnVideoEnd" )
if( VideoPlayerIsPlaying() )
then
EA_Window_VideoPlayer.OnVideoBegin()
end
end
