Plan
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

NameTypeDefaultRequiredDescription
srcStringYesVideo file URL
posterStringNoPoster/thumbnail image URL
captionsStringNoWebVTT captions file URL
subtitlesStringNoWebVTT subtitles file URL
aspectString'16:9'NoAspect ratio: 16:9, 4:3, 1:1, 9:16 (vertical)
autoplayBooleanfalseNoAutoplay (muted)
loopBooleanfalseNoLoop playback
titleStringNoVideo title
durationStringNoISO 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

  1. Create schema in runes/media/src/tags/video.ts
  2. Add RuneConfig entry in runes/media/src/config.ts
  3. Write CSS in packages/lumina/styles/runes/video.css
  4. Import CSS in packages/lumina/index.css
  5. Implement web component (rf-video) for play controls, caption track loading, responsive sizing — follows Diagram/Sandbox/Map pattern
  6. Add SEO extractor for VideoObject
  7. Write tests in runes/media/test/tags/video.test.ts
  8. Create inspector fixture

Dependencies

None — standalone web component.