Skip to content

Media Streaming (Video)

Play HTTP video streams on your UI. Video renders to a texture; audio is spatialized from the screen position.

lua
ui:element({
    id = "player", type = "media",
    rect = { unit = "px", x = 0, y = 0, w = 480, h = 272 },
    props = {
        url = "https://example.com/video.mp4",
        playing = "true",
        volume = "0.8",
        loop = "true",
    },
})
  • Audio responds to atmosphere — muffled in vacuum, normal in pressurized rooms
  • Players adjust per-screen volume with Ctrl+Alt+MouseWheel
  • Global mute toggle in client config
PropDescription
urlHTTP/HTTPS URL to a video file
playing"true" / "false"
volume"0" to "1" (default 1)
loop"true" / "false"
timeSeek to specific time in seconds

Server Config

SettingDefaultDescription
EnableExperimentalVideofalseMust be enabled on server
AllowMediaPlaybacktrueMaster switch for all media
AllowedMediaTypesRestrict file extensions
MaxResolutionWidth/HeightLimit resource usage

Client Config

SettingDefaultDescription
EnableMediaLocallytrueOpt out of all media locally
ClientMasterVolume0.5Scale all media audio

⚠️ This documentation was AI-generated and may contain inaccuracies. Please submit pull requests with corrections as needed.