Video
Videos embed Roblox VideoFrame content with playback controls.
Playground
Unavailable
Restart automatically when finished.
Start playback immediately.
Usage
You can create a Video element by calling AddVideo on a Groupbox.
Arguments
Groupbox:AddVideo("Trailer", {
Video = "rbxassetid://1234567890",
})| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Index/ID of the video element | string | nil |
| 2 | Video configuration table | table | nil |
Configuration Table
Prop
Type
Methods
You can use the following methods to interact with the video element:
SetVideo
Updates the video source.
Video:SetVideo(assetId)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Video asset ID or URL | string | nil |
SetLooped
Changes whether the video loops.
Video:SetLooped(looped)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Whether the video should loop | boolean | nil |
SetPlaying
Starts or pauses playback.
Video:SetPlaying(playing)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Whether the video should be playing | boolean | nil |
SetVolume
Adjusts the playback volume.
Video:SetVolume(volume)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Volume | number | nil |
Play
Convenience wrapper that starts playback.
Video:Play()Pause
Convenience wrapper that pauses playback.
Video:Pause()SetHeight
Adjusts the frame height.
Video:SetHeight(height)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Frame height in pixels | number | nil |
SetVisible
Shows or hides the video element.
Video:SetVisible(visible)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Visibility toggle | boolean | nil |
Example
local Trailer = Groupbox:AddVideo("Trailer", {
Video = "rbxassetid://1234567890",
Looped = true,
Playing = true,
Volume = 0.4,
Height = 240,
})
Trailer:SetVolume(0.6)
Trailer:Pause()
Trailer:Play()