VideoFrame¶
A GUI object that renders a rectangle, like a Frame does, with a moving video image.
Not implemented yet
No video backend.
Description¶
A VideoFrame renders a rectangle, like a Frame does, with a moving video image. The video must be from a file uploaded to the Roblox website.
The video is scaled to fit the entirety of the rectangle, but looks best when displayed at its native resolution.
2D and 3D Sound¶
A VideoFrame placed underneath SurfaceGui on a BasePart will emit its sound from that part's BasePart.Position.
A VideoFrame exhibits the Doppler effect, meaning its frequency and pitch varies with the relative motion of whatever part it is attached to.
The volume of the VideoFrame will be determined by the distance between the client's sound listener (by default the Camera position) and the position of the VideoFrame's part.
A VideoFrame is considered "global" if it is not placed underneath SurfaceGui on a BasePart. In this case, the sound will play at the same volume throughout the entire place.
Inheritance¶
Object → Instance → GuiBase → GuiBase2d → GuiObject → VideoFrame
Properties¶
| Member | Signature | Summary |
|---|---|---|
InternalVideoUsage |
InternalVideoUsage: InternalVideoUsage |
— |
IsLoaded |
IsLoaded: bool |
Indicates when the VideoFrame.Video has loaded from Roblox servers and is ready to play. |
Looped |
Looped: bool |
Sets whether or not the VideoFrame.Video repeats once it has finished when it is playing. |
MaximumResolution |
MaximumResolution: VideoSampleSize |
Internal-only. Caps the resolution the video is allowed to stream at, expressed as an VideoSampleSize. |
Playing |
Playing: bool |
Indicates whether the VideoFrame.Video is currently playing. It can be set to start or pause playback. |
PlayingReplicating |
PlayingReplicating: bool |
— |
Resolution |
Resolution: Vector2 |
Gets the original source resolution of the VideoFrame.Video file. |
RollOffMaxDistance |
RollOffMaxDistance: float |
The maximum distance, in studs, a listener can be from the video's part and still hear its audio. |
RollOffMinDistance |
RollOffMinDistance: float |
The minimum distance, in studs, at which the video's audio starts to attenuate. |
RollOffMode |
RollOffMode: RollOffMode |
Controls how the video's audio volume attenuates with distance. |
TimeLength |
TimeLength: double |
Indicates the length of the VideoFrame.Video in seconds. |
TimePosition |
TimePosition: double |
Indicates the progress in seconds of the VideoFrame.Video. |
TimePositionReplicating |
TimePositionReplicating: double |
— |
Video |
Video: ContentId |
The content ID of the video file a VideoFrame object is associated with. |
VideoContent |
VideoContent: Content |
The video content a VideoFrame is associated with, as either an asset content ID (same value as Video) or a direct reference to a… |
Volume |
Volume: float |
Indicates how loud the VideoFrame.Video is currently playing back. |
Methods¶
| Member | Signature | Summary |
|---|---|---|
Pause |
VideoFrame:Pause(): null |
Sets VideoFrame.Playing to false, pausing playback if the VideoFrame.Video is playing. |
Play |
VideoFrame:Play(): null |
Sets VideoFrame.Playing to true, playing the VideoFrame.Video from the current [VideoFrame.TimePosition](VideoFrame.md#… |
SetStudioPreview |
VideoFrame:SetStudioPreview(isPreview: bool): null |
— |
Events¶
| Member | Signature | Summary |
|---|---|---|
DidLoop |
DidLoop(video: string) |
Fires whenever the VideoFrame.Video loops. |
Ended |
Ended(video: string) |
Fires when the VideoFrame.Video has completed playback and stopped. |
Loaded |
Loaded(video: string) |
Fires when the VideoFrame.Video is loaded. |
Paused |
Paused(video: string) |
This event fires whenever the VideoFrame.Video is paused using VideoFrame.Pause() or by setting [VideoFrame.Playing](VideoF… |
Played |
Played(video: string) |
Fires whenever the VideoFrame.Video is played using the VideoFrame.Play() function or by setting [VideoFrame.Playing](VideoF… |
PlayingUpdatedFromServer |
PlayingUpdatedFromServer(value: bool) |
— |
TimePositionUpdatedFromServer |
TimePositionUpdatedFromServer(value: double) |
— |
Roblox reference: VideoFrame
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.