LogoObsidian

Video

Videos embed Roblox VideoFrame content with playback controls.

Playground

Video 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 IdxArgument DescriptionTypeDefault
1Index/ID of the video elementstringnil
2Video configuration tabletablenil

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 IdxArgument DescriptionTypeDefault
1Video asset ID or URLstringnil

SetLooped

Changes whether the video loops.

Video:SetLooped(looped)
Arg IdxArgument DescriptionTypeDefault
1Whether the video should loopbooleannil

SetPlaying

Starts or pauses playback.

Video:SetPlaying(playing)
Arg IdxArgument DescriptionTypeDefault
1Whether the video should be playingbooleannil

SetVolume

Adjusts the playback volume.

Video:SetVolume(volume)
Arg IdxArgument DescriptionTypeDefault
1Volumenumbernil

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 IdxArgument DescriptionTypeDefault
1Frame height in pixelsnumbernil

SetVisible

Shows or hides the video element.

Video:SetVisible(visible)
Arg IdxArgument DescriptionTypeDefault
1Visibility togglebooleannil

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()

On this page