# VideoFrame

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [GuiObject](https://rapi.sleaze.dev/classes/GuiObject.md), [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md), [GuiBase](https://rapi.sleaze.dev/classes/GuiBase.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Gui
- HTML page: https://rapi.sleaze.dev/classes/VideoFrame/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/VideoFrame

A GUI object that renders a rectangle, like a [`Frame`](https://rapi.sleaze.dev/classes/Frame.md) does, with a moving video image.

## Properties

### InternalVideoUsage

```luau
VideoFrame.InternalVideoUsage: Enum.InternalVideoUsage = Enum.InternalVideoUsage.Default
```

- Tags: Hidden, Read capabilities: Audio + InternalTest + UI, Write capabilities: InternalTest

### IsLoaded

```luau
VideoFrame.IsLoaded: boolean = false
```

- Tags: Read only, Read capabilities: Audio + UI

Indicates when the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) has loaded from Roblox servers and is ready to play.

### Looped

```luau
VideoFrame.Looped: boolean = false
```

- Tags: Read capabilities: Audio + UI

Sets whether or not the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) repeats once it has finished when it is playing.

### MaximumResolution

```luau
VideoFrame.MaximumResolution: Enum.VideoSampleSize = Enum.VideoSampleSize.Full
```

- Tags: Hidden, Read capabilities: Audio + InternalTest + UI, Write capabilities: InternalTest

Internal-only. Caps the resolution the video is allowed to stream at, expressed as an `VideoSampleSize`.

### Playing

```luau
VideoFrame.Playing: boolean = false
```

- Tags: Not replicated, Read capabilities: Audio + UI

Indicates whether the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) is currently playing. It can be set to start or pause playback.

### PlayingReplicating

```luau
VideoFrame.PlayingReplicating: boolean = false
```

- Tags: Hidden, Not scriptable, Read capabilities: Audio + UI

### Resolution

```luau
VideoFrame.Resolution: Vector2 = Vector2.zero
```

- Tags: Read only, Read capabilities: Audio + UI

Gets the original source resolution of the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) file.

### RollOffMaxDistance

```luau
VideoFrame.RollOffMaxDistance: number = 10000
```

- Tags: Capabilities: Audio + UI

The maximum distance, in studs, a listener can be from the video's part and still hear its audio.

### RollOffMinDistance

```luau
VideoFrame.RollOffMinDistance: number = 1
```

- Tags: Capabilities: Audio + UI

The minimum distance, in studs, at which the video's audio starts to attenuate.

### RollOffMode

```luau
VideoFrame.RollOffMode: Enum.RollOffMode = Enum.RollOffMode.Inverse
```

- Tags: Capabilities: Audio + UI

Controls how the video's audio volume attenuates with distance.

### TimeLength

```luau
VideoFrame.TimeLength: number = 0
```

- Tags: Read only, Read capabilities: Audio + UI

Indicates the length of the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) in seconds.

### TimePosition

```luau
VideoFrame.TimePosition: number = 0
```

- Tags: Not replicated, Read capabilities: Audio + UI

Indicates the progress in seconds of the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md).

### TimePositionReplicating

```luau
VideoFrame.TimePositionReplicating: number = 0
```

- Tags: Hidden, Not scriptable, Read capabilities: Audio + UI

### Video

```luau
VideoFrame.Video: string = ""
```

- Tags: Read capabilities: Audio + UI

The content ID of the video file a [`VideoFrame`](https://rapi.sleaze.dev/classes/VideoFrame.md) object is associated with.

### VideoContent

```luau
VideoFrame.VideoContent: Content
```

- Tags: Read capabilities: Audio + UI

The video content a [`VideoFrame`](https://rapi.sleaze.dev/classes/VideoFrame.md) is associated with, as either an asset content ID (same value as [`Video`](https://rapi.sleaze.dev/classes/VideoFrame.md)) or a direct reference to a [`VideoCapture`](https://rapi.sleaze.dev/classes/VideoCapture.md) object for local screen recordings.

### Volume

```luau
VideoFrame.Volume: number = 1
```

- Tags: Read capabilities: Audio + UI

Indicates how loud the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) is currently playing back.

## Methods

### Pause

```luau
VideoFrame:Pause()
```

- Tags: Capabilities: Audio + UI

Sets [`VideoFrame.Playing`](https://rapi.sleaze.dev/classes/VideoFrame.md) to `false`, pausing playback if the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) is playing.

### Play

```luau
VideoFrame:Play()
```

- Tags: Capabilities: Audio + UI

Sets [`VideoFrame.Playing`](https://rapi.sleaze.dev/classes/VideoFrame.md) to `true`, playing the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) from the current [`VideoFrame.TimePosition`](https://rapi.sleaze.dev/classes/VideoFrame.md).

### SetStudioPreview

```luau
VideoFrame:SetStudioPreview(isPreview: boolean)
```

- Tags: Roblox script security, Capabilities: Audio + UI

## Events

### DidLoop

```luau
VideoFrame.DidLoop: RBXScriptSignal<(video: string)>
```

- Tags: Capabilities: Audio + UI

Fires whenever the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) loops.

### Ended

```luau
VideoFrame.Ended: RBXScriptSignal<(video: string)>
```

- Tags: Capabilities: Audio + UI

Fires when the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) has completed playback and stopped.

### Loaded

```luau
VideoFrame.Loaded: RBXScriptSignal<(video: string)>
```

- Tags: Capabilities: Audio + UI

Fires when the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) is loaded.

### Paused

```luau
VideoFrame.Paused: RBXScriptSignal<(video: string)>
```

- Tags: Capabilities: Audio + UI

This event fires whenever the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) is paused using [`VideoFrame:Pause()`](https://rapi.sleaze.dev/classes/VideoFrame.md) or by setting [`VideoFrame.Playing`](https://rapi.sleaze.dev/classes/VideoFrame.md) to false.

### Played

```luau
VideoFrame.Played: RBXScriptSignal<(video: string)>
```

- Tags: Capabilities: Audio + UI

Fires whenever the [`VideoFrame.Video`](https://rapi.sleaze.dev/classes/VideoFrame.md) is played using the [`VideoFrame:Play()`](https://rapi.sleaze.dev/classes/VideoFrame.md) function or by setting [`VideoFrame.Playing`](https://rapi.sleaze.dev/classes/VideoFrame.md) to true.

### PlayingUpdatedFromServer

```luau
VideoFrame.PlayingUpdatedFromServer: RBXScriptSignal<(value: boolean)>
```

- Tags: Hidden, Roblox engine security, Capabilities: Audio + UI

### TimePositionUpdatedFromServer

```luau
VideoFrame.TimePositionUpdatedFromServer: RBXScriptSignal<(value: number)>
```

- Tags: Hidden, Roblox engine security, Capabilities: Audio + UI

## Inherited members

- From [GuiObject](https://rapi.sleaze.dev/classes/GuiObject.md): `SelectionImageObject`, `ClipsDescendants`, `Draggable`, `Active`, `AnchorPoint`, `AutomaticSize`, `BackgroundColor3`, `BackgroundTransparency`, `BorderColor3`, `BorderMode`, `BorderSizePixel`, `InputSink`, `Interactable`, `LayoutOrder`, `Position`, `Rotation`, `SelectionRect2D`, `Sink`, `Size`, `SizeConstraint`, `Visible`, `ZIndex`, `BackgroundColor`, `BorderColor`, `Transparency`, `DragBeginConnectionCount`, `DragStoppedConnectionCount`, `MouseEnterConnectionCount`, `MouseLeaveConnectionCount`, `MouseMovedConnectionCount`, `MouseWheelBackwardConnectionCount`, `MouseWheelForwardConnectionCount`, `NextSelectionDown`, `NextSelectionLeft`, `NextSelectionRight`, `NextSelectionUp`, `Selectable`, `SelectionOrder`, `GuiState`, `TweenPositionInternal`, `TweenSizeAndPositionInternal`, `TweenSizeInternal`, `TweenPosition`, `TweenSize`, `TweenSizeAndPosition`, `InputBegan`, `InputChanged`, `InputEnded`, `MouseEnter`, `MouseLeave`, `MouseMoved`, `MouseWheelBackward`, `MouseWheelForward`, `SelectionGained`, `SelectionLost`, `TouchLongPress`, `TouchPan`, `TouchPinch`, `TouchRotate`, `TouchSwipe`, `TouchTap`, `DragBegin`, `DragStopped`
- From [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md): `AbsolutePosition`, `AbsoluteRotation`, `AbsoluteSize`, `ActiveQueryNames`, `ReplicatedInsertionOrder`, `ClippedRect`, `IsNotOccluded`, `RawRect2D`, `TotalGroupScale`, `AutoLocalize`, `RootLocalizationTable`, `Localize`, `SelectionBehaviorDown`, `SelectionBehaviorLeft`, `SelectionBehaviorRight`, `SelectionBehaviorUp`, `SelectionGroup`, `SelectionChanged`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
