Section media and licensed fonts
Self-hosted videos, responsive pictures, safe controls and owner-attested font uploads.
Controls and self-hosted media
Section templates may author <button type="button" class="…" aria-label="…"> controls. Sanitization forces type="button" and keeps class, supported ARIA and bounded inert data/editability markers; form submission attributes and handlers are dropped. Merchant custom HTML blocks continue to refuse buttons. Bind controls through a section behavior's UI bridge.
Section templates support <video>, <picture> and void <source> elements. Video URLs and picture source sets use this store's /media/products/<uuid> paths. Upload MP4/WebM with POST /api/section-media?storeId=… using multipart file or JSON { "dataBase64": "…", "contentType": "video/mp4" | "video/webm" }, up to 50 MB; or use the upload_section_video MCP tool with the same base64 fields. The MIME type is checked against the file signature, and uploads go to the selected environment's own media library. list_media discovers uploaded objects. Licensed WOFF2 uploads stay on the signed-in owner's Fonts and video screen, with licence attestation.
<video src="/media/products/UUID.mp4" poster="/media/products/UUID.png" muted loop autoplay playsinline></video>
<picture><source srcset="/media/products/UUID.webp 600w, /media/products/UUID.webp 1200w" media="(min-width:600px)"><img src="/media/products/UUID.png" alt="Your product"></picture>
Autoplay requires muted, loop and a media-library poster. The platform starts playback only when reduced motion is off; reduced motion or no JavaScript leaves the poster visible. Controls are available for manual playback. Supported preload values are none and metadata. No remote player JSON or Lottie is supported.
Licensed fonts
The signed-in store owner can upload WOFF2 (5 MB maximum) in the same dashboard panel after confirming that the licence permits web embedding on this store. The multipart field licenseAttestation must be true. Tokens cannot attest a licence. The store records who confirmed the licence and when alongside the file in its media library.
The upload returns fontValue: "upload:<uuid>". Use that value in a section font setting, or a custom brand pairing's headingFamily / bodyFamily. list_media returns fontValue on licensed fonts for agent discovery. Paste it into the section font picker and select Use uploaded font. Rendering writes a local @font-face with font-display:swap; font setting CSS variables work as usual. Each upload is one face; use a separate upload for an italic face. Upload paths do not change and belong to this store, and fonts count toward media usage.