Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:VideoPlayerIsPlaying

From RoR Wiki
Revision as of 19:51, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 – true if 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_START and SystemData.Events.VIDEO_PLAYER_STOP events, and calls VideoPlayerIsPlaying once 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

See also