
Documentation
Generated by Codox
Tolgraven 0.1.0-SNAPSHOT
website.components.video
Helpers for serving modern video formats (VP9, AV1) with automatic fallbacks
<media-as-bg>
(<media-as-bg> {:keys [src poster class], :as attrs})Generate video element optimized for use as background media. Adds common background styling attributes and uses poster optimization.
<video-with-picture-poster>
(<video-with-picture-poster> video-attrs {:keys [poster alt], :as poster-attrs})Generate a video with an optimized poster image using modern formats.
The poster is rendered as an overlay using
The poster image is hidden once the video starts playing.
Generates sibling elements in the caller’s containing block: - An optimized
Keeps the native poster as a fallback and hides the overlay on playback.
<video>
(<video> & argv__44932__auto__)Generate a
Usage: video {:src ‘media/clip.mp4’ :loop true :muted true} video {:src ‘media/clip.mp4’ :poster ‘img/poster.jpg’ :controls true}
Generates:
Note: The :poster attribute uses the original image path. For optimized posters with WebP/AVIF support, use video-with-picture-poster instead.
Browsers automatically select the first format they support.