Video

An embedded video from a URL. It supports popular video services (e.g., YouTube and Vimeo) and direct links to video file types commonly supported by browsers.

Properties

Available properties for Video with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.

NameTypeDescriptioncurrentTimeStampnumber

The current playback position of the video.

durationnumber

The total duration, in seconds.

hiddenboolean

Whether the component is visible.

hideControlsboolean

Whether to hide video playback controls. Some video sources and browsers may not support this.

loopboolean

Whether to replay the video automatically.

maintainSpaceWhenHiddenboolean

Whether the component takes up space on the canvas if hidden is true.

marginstring

The amount of margin to render outside of the component.

playbackRatenumber

The playback speed, expressed in increments of 1. Default is 1 for 1x speed. Negative values are not supported. Some video sources and browsers may clamp the speed range.

playingboolean

Whether the video is currently playing. If set to true, the video autoplays on page load.

showInEditorboolean

Whether the component remains visible in the editor if hidden is true.

srcstring

The source URL.

tooltipTextstring

The text to display in a tooltip on hover or focus.

volumenumber

The audio volume, between 0 and 1.

Events

Events are triggered by user interactions with Video. Use event handling to trigger queries or other actions in response to events.

NameDescriptionPlay

Video playback starts or resumes.

Pause

Video playback is paused.

Load

Video is loaded.

Ended

Video playback is stopped.

Methods

Methods for interacting with Video. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.

NameDescriptionscrollIntoView(options: any)

Scrolls the canvas or parent container so that the selected component appears in the visible area.

setHidden(hidden: boolean)

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

play()

Play the video.

pause()

Pause the video.

seekTo(time: number)

Seek to a specific playback time.

Related components