Roblox UtilitiesDevlHub Roblox Documentation

Class

VideoDisplay

NotBrowsable
Inherits
GuiObject › GuiBase2d › GuiBase › Instance › Object
Memory category
Gui

A GUI object that displays video content from a connected VideoPlayer.

A VideoDisplay is a GUI object that displays video content from a VideoPlayer connected via a Wire. It functions similarly to a ImageLabel but is designed for video playback.

Properties 7#

ResampleModeResamplerModeSelects the texture resampling mode for the VideoDisplay.ReadSafe
ScaleTypeScaleTypeDetermines how a video will scale if displayed in a UI element whose aspect ratio differs from the source video.ReadSafe
TileSizeUDim2Sets the tiling size of the VideoDisplay.ReadSafe
VideoColor3Color3Determines how a rendered video will be colorized.ReadSafe
VideoRectOffsetVector2The offset in pixels of the sub-area of a video to be displayed.ReadSafe
VideoRectSizeVector2Determines the size in pixels of the sub-area of a video to be displayed.ReadSafe
VideoTransparencyfloatDetermines the transparency of the rendered video.ReadSafe

ResampleMode: ResamplerMode#

ReadSafe

Determines how the video looks when it is scaled. By default, the video smooths out texturing when displayed on the screen larger or smaller than its size in texture memory. When set to Enum.ResamplerMode.Pixelated, the video preserves the sharp edges of pixels.

ScaleType: ScaleType#

ReadSafe

Determines how a video texture is rendered when the UI element's aspect ratio differs from the source video's aspect ratio.

By default, this property is ScaleType.Stretch which will simply stretch/compact the video texture dimensions so it fits the UI element's space exactly.

TileSize: UDim2#

ReadSafe

This property sets the tiling size of the VideoDisplay with a default of Datatype.UDim2.new(1, 0, 1, 0). Tiling starts at the top-left corner of the video. This property is only active if the ScaleType for the VideoDisplay is set to ScaleType.Tile.

VideoColor3: Color3#

ReadSafe

Determines how a video is colorized. When set to white, no colorization occurs. This property is useful for reusing video assets.

VideoRectOffset: Vector2#

ReadSafe

Allows the partial display of a video in conjunction with VideoRectSize. This property determines the pixel offset (from the top-left) of the video area to be displayed.

VideoRectSize: Vector2#

ReadSafe

Allows the partial display of a video in conjunction with VideoRectOffset. This property determines the pixel size of the video area to be displayed. If either dimension is set to 0, the entire video is displayed instead.

VideoTransparency: float#

ReadSafe

Determines the alpha of a UI element's rendered video texture. A value of 0 is completely opaque, and a value of 1 is completely transparent (invisible).

Methods 3#

GetConnectedWiresReturns an array of Wires that are connected to the specified pin.
GetInputPinsGets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.
GetOutputPinsGets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.

GetConnectedWires(pin: string): List<Wire>#

Returns an array of Wires that are connected to the specified pin. VideoDisplay has one "Input" pin.

NameTypeDefaultDescription
pinstringAn input or output pin on this instance
Returns
  • List<Wire> — An array of Wires

GetInputPins(): Array#

Gets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.

For VideoDisplay, this is Input only.

Returns
  • Array — An array of strings representing valid pin names.

GetOutputPins(): Array#

Gets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.

For VideoDisplay, there are none.

Returns
  • Array — An array of strings representing valid pin names.

Events 1#

WiringChangedFires when another instance is connected to or disconnected from the VideoDisplay via a Wire.

WiringChanged(connected: boolean, pin: string, wire: Wire, instance: Instance)#

Fires after a Wire becomes connected or disconnected, and that Wire is now or was previously connected to a pin on the VideoDisplay and to some other wirable instance.

NameTypeDefaultDescription
connectedbooleanWhether the instance got connected or disconnected.
pinstringThe pin on the VideoDisplay that the Wire targets.
wireWireThe Wire between the VideoDisplay and the other instance.
instanceInstanceThe other instance that is or was connected through the Wire.

Inherited members#

Inherited from GuiObject 51
Inherited from GuiBase2d 12
Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed