VideoFrame
A GUI object that renders a rectangle, like a Frame does, with a moving video image.
Memory category | Gui |
---|
Member index 20
Removed member index 1
History | Member | |
---|---|---|
438 | GetInfo(): Dictionary |
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.
History 56
- 645 Change ValueType of Video from Content to ContentId
- 607 Add SetStudioPreview
- 573 Change ReturnType of Play from void to null
- 573 Change ReturnType of Pause from void to null
- 553 Add
- 553 Add
- 553 Change Default of Volume from to 1
- 553 Add
- 553 Change Default of TimePosition from to 0
- 553 Change Default of TimeLength from to 0
- 553 Change Default of Resolution from to Vector2(0, 0)
- 553 Add
- 553 Change Default of Playing from to false
- 553 Change Default of Looped from to false
- 553 Change Default of IsLoaded from to false
- 486 Change ThreadSafety of Volume from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Video from ReadOnly to ReadSafe
- 486 Change ThreadSafety of TimePosition from ReadOnly to ReadSafe
- 486 Change ThreadSafety of TimeLength from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Resolution from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Playing from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Looped from ReadOnly to ReadSafe
- 486 Change ThreadSafety of IsLoaded from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Played from to Unsafe
- 462 Change ThreadSafety of Paused from to Unsafe
- 462 Change ThreadSafety of Loaded from to Unsafe
- 462 Change ThreadSafety of Ended from to Unsafe
- 462 Change ThreadSafety of DidLoop from to Unsafe
- 462 Change ThreadSafety of Play from to Unsafe
- 462 Change ThreadSafety of Pause from to Unsafe
- 462 Change ThreadSafety of Volume from to ReadOnly
- 462 Change ThreadSafety of Video from to ReadOnly
- 462 Change ThreadSafety of TimePosition from to ReadOnly
- 462 Change ThreadSafety of TimeLength from to ReadOnly
- 462 Change ThreadSafety of Resolution from to ReadOnly
- 462 Change ThreadSafety of Playing from to ReadOnly
- 462 Change ThreadSafety of Looped from to ReadOnly
- 462 Change ThreadSafety of IsLoaded from to ReadOnly
- 438 Remove GetInfo
- 431 Add Resolution
- 422 Add GetInfo
- 414 Add Played
- 414 Add Paused
- 414 Add Loaded
- 414 Add Ended
- 414 Add DidLoop
- 414 Add Play
- 414 Add Pause
- 414 Add Volume
- 414 Add Video
- 414 Add TimePosition
- 414 Add TimeLength
- 414 Add Playing
- 414 Add Looped
- 414 Add IsLoaded
- 414 Add VideoFrame
Members 20
DidLoop
Parameters (1) | |
---|---|
video | string |
An event that fires whenever the VideoFrame.Video loops. Returns the content ID of the video.
Thread safety | Unsafe |
---|
Ended
Parameters (1) | |
---|---|
video | string |
This event fires when the VideoFrame.Video has completed playback and stopped.
Thread safety | Unsafe |
---|
IsLoaded
Type | Default | |
---|---|---|
bool | false |
This property will be true when the VideoFrame.Video has loaded from Roblox servers and is ready to play.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | false |
Loaded
Parameters (1) | |
---|---|
video | string |
This event fires when the VideoFrame.Video is loaded.
Thread safety | Unsafe |
---|
Looped
Type | Default | |
---|---|---|
bool | false |
This property sets whether or not the VideoFrame.Video repeats once it has finished when it is playing.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | true |
Pause
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Sets VideoFrame.Playing to false, pausing playback if the VideoFrame.Video is playing.
As VideoFrame.TimePosition is not reset, when the video is resumed it will continue from its previous position.
Thread safety | Unsafe |
---|
Paused
Parameters (1) | |
---|---|
video | string |
This event fires whenever the VideoFrame.Video is paused using VideoFrame:Pause() or by setting VideoFrame.Playing to false.
Thread safety | Unsafe |
---|
Play
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Sets VideoFrame.Playing to true, This plays the VideoFrame.Video, continuing from the current VideoFrame.TimePosition.
Thread safety | Unsafe |
---|
Played
Parameters (1) | |
---|---|
video | string |
This event fires whenever the VideoFrame.Video is played using the VideoFrame:Play() function or by setting VideoFrame.Playing to true.
Thread safety | Unsafe |
---|
Playing
Type | Default | |
---|---|---|
bool | false |
This property indicates whether the VideoFrame.Video is currently playing. It can be set to start or pause playback as an alternative to the VideoFrame:Play() and VideoFrame:Pause() functions.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | true |
Resolution
Type | Default | |
---|---|---|
Vector2 | 0, 0 |
This property gets the original source resolution of the VideoFrame.Video file.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | false |
History 4
- 553 Change Default of Resolution from to Vector2(0, 0)
- 486 Change ThreadSafety of Resolution from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Resolution from to ReadOnly
- 431 Add Resolution
SetStudioPreview
Parameters (1) | ||
---|---|---|
isPreview | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 607 Add SetStudioPreview
TimeLength
Type | Default | |
---|---|---|
double | 0 |
This property indicates the length of the VideoFrame.Video in seconds. If the video is not loaded, this value will be 0.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | false |
History 4
- 553 Change Default of TimeLength from to 0
- 486 Change ThreadSafety of TimeLength from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TimeLength from to ReadOnly
- 414 Add TimeLength
TimePosition
Type | Default | |
---|---|---|
double | 0 |
This property indicates the progress in seconds of the VideoFrame.Video. It can be changed to move the playback position of the video both before and during playback.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | true |
History 4
- 553 Change Default of TimePosition from to 0
- 486 Change ThreadSafety of TimePosition from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TimePosition from to ReadOnly
- 414 Add TimePosition
Video
Type | Default | |
---|---|---|
ContentId |
The content ID of the video file a VideoFrame object is associated with.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | true |
Volume
Type | Default | |
---|---|---|
float | 1 |
This property determines how loud the VideoFrame.Video plays back. It can be set to a number between 0 and 100.
Thread safety | ReadSafe |
---|---|
Category | Video |
Loaded/Saved | true |
Removed members 1
GetInfo
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Dictionary |