Skip to main content
Video(props: VideoProps): Component;

Parameters

props
VideoProps
Video configuration object.

Support

Usage

Video from URL

Video({ url: "https://example.com/video.mp4" })

Video with custom settings

Video({
    url: "https://example.com/demo.mp4",
    autoplay: true,
    muted: true,
    loop: true,
    controls: false
})

Local video file

Video({ video: "intro.mp4" })

Video with fit content mode

Video({
    url: "https://example.com/video.mp4",
    contentMode: "fit"
})
.frame({ width: 400, height: 300 })

Video with fill content mode

Video({
    url: "https://example.com/video.mp4",
    contentMode: "fill"
})
.frame({ width: 400, height: 300 })
.cornerRadius(12)

Using with Properties

Video from Property

When using an asset property type:
const properties = () => {
  asset: PropertyAsset({
    title: "Asset"
  })
}
The asset prop will contain a video key when a video is selected. Pass it directly to the Video component:
Video(props.asset?.video)