Coming soon toSteam
Modding docsAPI 1

Module · Engine client only

video

Play video files your mod ships with, on a panel or on an object in the world. Needs the "video" permission.

video.onElement(path: string, element: UiElement, options?: any): Video

client onlyneeds video

Plays a video on an interface element; it fills the element's background.

local screen = panel:addNew("VisualElement", { style = { width = "480px", height = "270px" } })
local intro = video.onElement("video/intro.mp4", screen, { loop = true })

video.onObject(path: string, target: Object, options?: any): Video

client onlyneeds video

Plays a video on one of your objects, replacing its surface picture.

local tv = world.shape("quad", { position = vec3(0, 2, 5), scale = vec3(3.2, 1.8, 1) })
video.onObject("video/loop.webm", tv, { loop = true })