0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Show the browser's built-in play, seek and volume controls on audio and video, or hand the job to VB's video-player and audio-player components.
Overview
The controlsattribute tells the browser to draw its own media controls: play and pause, a seek bar, a time display, volume and (for video) fullscreen. Without it, a <video> shows only its frame or poster, and an <audio> element is not rendered at all.
It is a boolean attribute. Its presence turns the controls on. controls="false" still shows them; remove the attribute to hide them.
Applies to:<audio>, <video>. The HTML standard has also added controls to <img> for pausing animated images; only Safari 27 has a partial, experimental implementation (November 2026).
Native controls
123456789
<videocontrolspreload="metadata"width="960"height="540"poster="poster.jpg"><sourcesrc="sample.mp4"type="video/mp4"><p><ahref="sample.mp4"download>Download the video</a></p></video><audiocontrolspreload="metadata"><sourcesrc="track.mp3"type="audio/mpeg"><p><ahref="track.mp3"download>Download the track</a></p></audio>
Values
State
Meaning
controls (present, any value)
The browser draws its native controls.
(absent, the default)
No controls. Video shows its frame or poster; audio is not rendered. Playback is only possible from script, autoplay or the browser's context menu.
The HTMLMediaElement.controls property reflects the attribute, so video.controls = false removes it.
Examples
Video without controls
Decorative, muted background loops are the one case for leaving controls off. Give the user a way to pause anything that moves for more than five seconds (WCAG 2.2.2).
The non-standard controlslistattribute removes individual buttons from the native controls. It takes a space-separated list of tokens. Only Chromium browsers support it (Chrome 58); Firefox and Safari ignore it.
Two standard attributes do similar jobs on <video>: disablepictureinpicture hides the picture-in-picture button (Chrome 69, Safari 13.1; Firefox partial) and disableremoteplayback turns off casting and AirPlay (Chrome 121, Safari 13.1; not Firefox).
Native styling.src/native-elements/audio/styles.css makes <audio> full-width and block-level with rounded corners, accent-color: var(--color-primary) and color-scheme: light dark, so the native controls follow the theme where the browser allows. src/native-elements/video/styles.css sets max-inline-size: 100% and block-size: auto on every <video>, so you never need an inline style to make a video responsive.
<video-player> wraps a light-DOM <video controls>. On upgrade it removes controls and draws its own themed controls in shadow DOM; if the component is removed, it puts controls back (src/web-components/video-player/logic.js). Without JavaScript, the native controls stay. The component also reflects a controlsattribute on its host while its overlay is showing; that is internal state, not something to author.
<audio-player> does the same for <audio controls>, with playlist support (src/web-components/audio-player/logic.js).
data-chapter-list on a <track kind="chapters"> renders a chapter list below a native video. See <video>.
Always write controls on the inner media element, even inside a player component. It is the no-JavaScript fallback.
Keyboard
Native control keys are defined by each browser and differ between them. Focus usually has to be on the media element or one of its controls, and some browsers handle only Space and the arrow keys. If you need a known set of shortcuts, use <video-player>. With focus on the player (not inside one of its buttons or sliders), it handles:
Key
<video-player> action
Space / K
Play / pause
← / →
Seek back / forward 10 seconds (5 seconds on the seek slider)
↑ / ↓
Volume up / down
M
Mute
F
Fullscreen
C
Captions
<audio-player> handles Space, ← / → (10 seconds) and M.
Accessibility
Media with neither controls nor a custom player cannot be played, paused or muted from the keyboard. If you leave controls off, supply a keyboard-operable alternative.
Native controls are keyboard-reachable and labelled in current browsers, but the quality of their screen-reader support varies by browser and assistive technology. Test with the combinations your audience uses.
Audio that plays automatically for more than three seconds needs a way to pause or mute it (WCAG 1.4.2), and moving video that lasts more than five seconds needs a way to pause it (WCAG 2.2.2).
An <audio> element without controls is not rendered, so screen-reader users get no hint it exists.
Captions come from <track kind="captions">, not from controls; the native captions button appears only when a text track exists.
Gotchas
controls="false" shows controls. Remove the attribute instead.
Native controls cannot be styled beyond accent-color and color-scheme. Vendor pseudo-elements such as ::-webkit-media-controls-panel are non-standard and change between versions.
controlslist="nodownload" hides a menu item. It does not stop anyone downloading the file.
iPhone Safari plays video fullscreen with its own controls unless the video has playsinline.
Native controls — one clip on a content page, where the browser's look and keys are fine. No JavaScript, smallest cost.
<video-player> / <audio-player> — themed controls that match your design tokens, the same keyboard map in every browser, playlists, speed and captions toggles. Keep controls on the inner element as the fallback.
<youtube-player> — YouTube-hosted video, with a lightweight facade until the user presses play.