Video
A video plays muted and inline as soon as its slide opens, started inside the click so phones allow it.
Its controls come from the <template data-dlb-overlay="video"> in the dialog, copied over each video so they move with it. data-dlb-noaudio disables the mute button for the second clip, which has no sound.
live · Video
<div id="clips" class="row">
<a href="/media/clip-1.mp4" data-dlb-type="video" data-dlb-width="720" data-dlb-height="1280">
<img src="/media/clip-1-480.jpg" alt="Turquoise and dark blue bands drifting" />
</a>
<a href="/media/clip-2.mp4" data-dlb-type="video" data-dlb-width="720" data-dlb-height="1280" data-dlb-noaudio>
<img src="/media/clip-2-480.jpg" alt="Purple, orange and yellow bands drifting" />
</a>
</div>/* A row of thumbnails, 7rem high */
.row {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.row img {
display: block;
width: auto;
height: 7rem;
}import { lightbox } from "dialog-lightbox";
lightbox({ gallery: document.querySelector("#clips"), dialog: document.querySelector("dialog.box") });
