Video
Styled wrapper around native video with a custom control bar including play/pause, seek, volume, mute, and fullscreen.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
src | string | — | Video URL |
poster | string | — | Poster image URL |
autoplay | boolean | — | Start playing on load (implies muted in most browsers) |
loop | boolean | — | Loop playback |
muted | boolean | — | Start muted |
controls | boolean | — | Show browser native controls instead of the custom bar |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/video.js"></script> import "./pura/lib/video.js";