Skip to main content

Overview

Video elements display and play videos. Video elements are customizable with properties like looping, autoplay, and content mode.

Properties

In addition to the properties below, glass effect containers also have access to general object properties in the Expression Editor.

Video

Select the video asset. Upload a video from the Assets Panel, drag and drop it into the canvas, or use a stock video from Play’s Pexel library. Custom video upload is only available on our paid plans.
Video.video
Type: string
Can get or set the value.
Want a shortcut? You can jump right to the Video property by double-clicking/tapping on an image element on your page.

Content Mode

Set how the video is positioned within the element:
  • Aspect Fill: The video will scale up to fill the element’s bounds, preserving the aspect ratio but potentially cropping the video.
  • Aspect Fit: The video will scale down to fill the element’s bounds, preserving the aspect ratio but potentially leaving some of the element’s area unfilled.
  • Fill: The video will stretch to fill the element’s bounds on both axes, changing the aspect ratio if necessary.

Native Controls

Choose to add native playback controls, like play, pause, skip, full screen, and progress bar.

Auto Play

Choose to play the video automatically when a user enters the page.

Loop

Choose to restart the video when it finishes playing.

Rate

Set the video playback rate.
Video.rate
Type: number
Values: 0.5 - 4
Can get or set the value.

Mute

Choose to remove the video’s audio.
Video.mute
Type: boolean
Values:
true = muted
false = not muted (audio plays)
Can get or set the value.

Expression Editor Properties

Current Time

Current timestamp of the video, in seconds.
Video.currentTime
Type: number
Can get or set the value.

Current Percent

Current percent completion of the video compared to the full video length.
Video.currentPercent
Type: number
Value: 0-1
Can get or set the value.

Is Playing

Boolean for if the video is currently playing (true) or paused (false).
Video.isPlaying
Type: boolean
Values:
true = playing
false = not playing
Can get or set the value.

Total Time

Total seconds in the video.
Video.totalTime
Type: number
Can get the value.

Resources

Related Triggers & Actions Projects

Video Controls

I