Component reference
Files components

Video component

8min

Description

Video allows you to add video playback to your scene, displayed on a 2D plane or projected onto geometry. Videos can be configured with various settings to control playback, appearance, and audio behavior.

When you add the Video component to an entity, it includes two components:

  • Video: Manages how the video is displayed on the entity.
  • Media: Configures the media source file and playback options.
Document image



Video component

The Video component controls the visual aspects of the video playback within the scene. It determines how the video is rendered on the entity, which acts as a screen or surface for the video.

Properties

Property

Description

Media Source

Allows you to reference another Video component's media source. This enables multiple video screens to share the same video stream, optimizing performance by streaming a single video source.

Canvas Size

Defines the dimensions of the video display surface. Adjusting the X and Y values changes the width and height of the video plane.

Side

Determines which sides of the video plane are visible. Options include:

  • Double: Both sides are visible.
  • Front: Visible from the front only.
  • Back: Visible from the back only.

UV Offset

Offsets the video texture on the U (horizontal) and V (vertical) axes. Useful for adjusting the position of the video within the display area.

UV Scale

Scales the video texture on the U and V axes. Values less than 1 enlarge the video, while values greater than 1 shrink it.

Wrap S/T

Determines the texture wrapping mode on the S (horizontal) and T (vertical) axes. Options include:

  • Clamp: Prevents tiling by clamping texture coordinates.
  • Repeat: Tiles the texture across the surface.
  • Mirrored Repeat: Tiles the texture with a mirroring effect.

Use Alpha

Enables alpha transparency based on the video's luminance. Darker areas become transparent, allowing for effects like masked videos.

Alpha Threshold

Adjusts the threshold for the alpha transparency when Use alpha is enabled. Higher values make more of the video transparent.

Use Alpha UV Transform

Allows for advanced offset and scaling options for the alpha transparency. Keep disabled for basic alpha threshold functionality.

Projection

Determines how the video is projected onto geometry. Options include:

  • Flat: Projects the video onto a flat plane.
  • Equirectangular 360: Projects the video onto a sphere for 360-degree videos, suitable for immersive experiences. It is only recommended when working with 360 videos.

Video Fit

Controls how the video fits within the canvas.

Usage notes

  • Multiple screens: Use the Media Source property to reference another Video component's media source. This allows you to display the same video on multiple entities without loading the video multiple times, optimizing performance.
  • Alpha transparency: Enable Use Alpha and adjust Alpha Threshold to make parts of the video transparent based on luminance, useful for creating effects like holograms or masked videos.


Media component

When you add a Video component, it automatically includes a Media component. The Media component manages the video source file, playback options, and synchronization settings. It is shared with the Audio component component and provides consistent media playback functionality.

Properties

Property

Description

Volume

Sets the playback volume of the video's audio track, ranging from 0 (silent) to 1 (full volume).

Start Time

The time (in minutes) from which the video should start playing. Useful for resuming playback from a specific point or synchronizing with other events.

Is Music

When enabled, the video's audio plays uniformly throughout the scene, ignoring positional audio settings. The sound is not spatialized and is heard equally everywhere. This is useful for background music or narration.

Controls

Displays playback controls (e.g., play, pause, stop) in the scene, allowing users to interact with the video. These controls are visible to end-users and can be interacted with in the scene.

Autoplay

When enabled, the video starts playing automatically when the scene loads, without requiring user interaction.

Synchronize

Synchronizes video playback across all users in the scene. All users see the video at the same playback position, ensuring a shared viewing experience.

Source Paths

Specifies the video file(s) to play. You can provide a single file or a list of files, depending on the Play mode. Options include:

  • Single: Plays a single specified video file.
  • Random: Randomly selects and plays a video file from your source paths.
  • Sequential: Plays multiple video files from your source paths in a specified order.

Usage notes

  • Automatic playback: Use Autoplay to start the video automatically when the scene loads. Be cautious with autoplay as some users may prefer to initiate playback themselves.
  • Shared experience: Enable Synchronize to ensure all users see the video simultaneously, which is essential for events, presentations, or collaborative experiences.

Important details

  • Aspect ratio: For optimal display, match the Canvas size to the video's aspect ratio to avoid distortion or unintended cropping.
  • 360-degree videos: Using the Equirectangular 360 projection in the Video component is ideal for immersive backgrounds or skyboxes.
  • Performance optimization: The Media Source property in the Video component allows multiple screens to share the same video stream, reducing bandwidth and processing load.
  • Testing: Always test video playback on target devices and browsers to ensure compatibility and performance meet expectations.