Plus Lua API

Video callbacks

This page documents the Lua callbacks exposed by LuaVideo.hx and the internal variables that control video sprite playback, placement, and cleanup.

Presentation video

Video callbacks

  • playLuaVideoSprite(tag, path, x, y, front) creates and plays a video sprite.
  • pauseLuaVideo(tag) pauses the active video assigned to the tag.
  • resumeLuaVideo(tag) resumes the active video assigned to the tag.
  • removeLuaVideo(tag) requests a safe removal of the video sprite.
  • forceRemoveLuaVideo(tag) bypasses the delayed removal guard.
  • luaVideoExists(tag) checks whether the tagged video exists.
  • isLuaVideoPlaying(tag) returns the current playback state.
  • setLuaVideoVolume(tag, volume) adjusts the playback volume.
  • getLuaVideoDuration(tag) returns the full duration in seconds.
  • getLuaVideoTime(tag) returns the current playback position in seconds.

Video variables

tag

path

x

y

front

volume

activeVideos

allowDestroy

isDestroyed

Notes

  • VIDEOS_ALLOWED must be enabled at build time.
  • onVideoFinished(tag) fires when the video reaches the end.
  • forceRemoveLuaVideo(tag) is useful when cleanup must happen immediately.
  • This documentation is ready for more video examples later.