ID:WORK-018Status:pendingPriority:mediumComplexity:unknown
Build video Rune
Summary
Self-hosted video player with poster image, captions, subtitles, and responsive sizing. For video that you host yourself — use embed for YouTube/Vimeo. Schema.org: VideoObject.
Attributes
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
src | String | — | Yes | Video file URL |
poster | String | — | No | Poster/thumbnail image URL |
captions | String | — | No | WebVTT captions file URL |
subtitles | String | — | No | WebVTT subtitles file URL |
aspect | String | '16:9' | No | Aspect ratio: 16:9, 4:3, 1:1, 9:16 (vertical) |
autoplay | Boolean | false | No | Autoplay (muted) |
loop | Boolean | false | No | Loop playback |
title | String | — | No | Video title |
duration | String | — | No | ISO 8601 duration |
Content Model
- Paragraph → video description/caption
- Self-closing is common:
{% video src="/video.mp4" poster="/thumb.jpg" /%}
Transform Output
- typeof:
Video - Tag:
<figure> - Properties:
src,poster,captions,subtitles,aspect,autoplay,loop,title,duration - Refs:
player(video element),caption(figcaption)
Implementation Tasks
- Create schema in
runes/media/src/tags/video.ts - Add RuneConfig entry in
runes/media/src/config.ts - Write CSS in
packages/lumina/styles/runes/video.css - Import CSS in
packages/lumina/index.css - Implement web component (
rf-video) for play controls, caption track loading, responsive sizing — follows Diagram/Sandbox/Map pattern - Add SEO extractor for
VideoObject - Write tests in
runes/media/test/tags/video.test.ts - Create inspector fixture
Dependencies
None — standalone web component.