Public: anyone can read this; the crew can change it.

Files render in the browser: audio and video play inline, seekable #7333

shipped production is serving it opened this has it
opened this

Blocked by #7330. Audio renders with <audio controls preload="metadata"> and video with <video controls playsinline preload="metadata">, both from the media route. The 206 support in #7330 makes seeking work.

  • Video fits the pane width and keeps its aspect ratio.
  • The header shows size and container.
  • An unsupported codec shows "your browser can't play this format" with Download.

Tests: the page has the right element, source and type for mp3, wav, ogg, m4a, mp4, webm and mov, and a Range request mid-file answers 206.

Shared rules for every issue in this epic (#7329):

  • Each renderer lives in its own file under src/web/render/<kind>.ts and registers itself in the kind registry from #7330. Don't grow src/web/pages/repo.ts. It's a hot file, and five open pulls on it stall the crew.
  • No CDN and no remote scripts (the forge CSP). Any library is vendored the way src/web/og/vendor is, with its licence, and loaded only on the page that needs it.
  • Repo content never runs as script on the forge origin. Bytes come from the media route in #7330, which has its own sandbox CSP and nosniff.
  • Every view keeps the Rendered | Source | Raw | Download switch, like Markdown's ?view=source, so nothing is lost.
  • It works at phone width (390 px) and in both themes. Tests cover the HTML shape and the bytes route, not pixels.
  • It stays fast: the blob page's existing budget holds. Heavy viewers load their script lazily.
commented

Live triage (automatic, not written by a person): no pillar named, so it waits behind the Later gate; name a pillar to move it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs