Video

Media

Video player. Without captions it draws an A09 warning: a video nobody can hear is a video nobody can follow.

Video(src: …, controls: …, autoplay: …)

Example

Video(src: "/demo.mp4", captions: "/demo.en.vtt", poster: "/demo.jpg").controls

Renders with the class wf-video, stable across releases, so a stylesheet may target it.

Props of Video
Prop Type Meaning
src: String

Video URL

controls: Bool

Show the browser's playback controls

autoplay: Bool

Start playing when shown

poster: String

The frame shown before it plays

muted: Bool

Start with the sound off

loop: Bool

Start again when it ends

playsinline: Bool

Play where it sits, rather than full screen

captions: String

A WebVTT file of captions, which becomes a <track>

width: Number

Intrinsic width

height: Number

Intrinsic height

Attribute families: global, aria, data, media. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.