Skip to content

docs: design for Ariadne media (images from URLs, backgrounds, video, audio, card) - #929

Merged
transfix merged 2 commits into
masterfrom
docs/ariadne-media-design
Oct 31, 2026
Merged

transfix merged 2 commits into
masterfrom
docs/ariadne-media-design

Conversation

@transfix

Copy link
Copy Markdown
Owner

Design note for generic media in Ariadne (docs/roadmap/ARIADNE_MEDIA.md). It covers what social-style documents need (profiles with banners and avatars, feed cards with image/video/audio attachments), in every host: arigl, ari with FTXUI and tvision, and the arigl-web and ari.html pages.

  • M1 image: from URLs. src:/bind: take a URI. Fetches go through the host's net policy, with optional auth: NAME (the token never reaches state, errors or cache keys). Decoding (stb, libwebp) and fit (contain|cover|fill, shape: circle) run off the frame. Placeholder and error rasters keep the layout fixed. Terminals honour transparency.
  • M2 background: on window/overlay/group. ImGui draws it behind the content. Terminals draw dimmed half-blocks behind the text, or terminal: banner puts the image as a row above the content.
  • M3 a generic card component in the component library.
  • M4 a GL-free cvc_media library: SDL3 audio moves out of cvcGL (cvcGL keeps an alias). A separate ari-media package (bin/ari-media) links SDL3 audio and FFmpeg (ffmpeg-lgpl, shared). The lean ari stays lean.
  • M5 video:/audio: widgets: core-drawn controls, a state machine bound to state, and an FFmpeg + SDL3 player. Over SSH, players default to remote, with an "Open" action through open-url (Ariadne: sign in with any OpenID Connect provider (oidc-sign-in, open-url; nicotina L7, L9) #916); --media-play forces local playback.
  • M6 browser players: hidden HTMLMediaElements fed from cvc::net (so policy and auth: hold). Frames are copied into the raster, so both pages and every widget path behave alike. The doc records the tradeoff against a <video> overlay.

Docs only.

Joe Rivera added 2 commits October 30, 2026 21:40
… audio, card)

Images by URL through the host's network policy and credentials, decoded off
the frame; background images on windows and groups; video and audio widgets
with FFmpeg + SDL3 natively and the browser's decoders in the wasm pages; an
ari-media variant that links SDL3 audio without GL; a generic card component.
Splits the work into PRs M1-M6.
@transfix
transfix merged commit dbaf048 into master Oct 31, 2026
27 checks passed
@transfix
transfix deleted the docs/ariadne-media-design branch October 31, 2026 17:43
transfix added a commit that referenced this pull request Nov 2, 2026
Media M1 from the design in #929 (docs/roadmap/ARIADNE_MEDIA.md): an
`image:` names a picture by URI (http(s)://, file://, cvc://, state://) in
every host, with fit (contain/cover/fill), shape (rect/circle), an optional
`auth:` credential that never reaches state, and a loading/ready/failed
status. A per-Runtime media::ImageCache fetches through the host's network,
decodes (cvc::decode_image: stb, libwebp, ImageMagick by magic bytes, size
caps checked from the header), downscales and fits off the frame, and the
backends free pictures through Backend::drop_image. Snapshots and `ari test`
wait for the pictures a frame drew.

The media tests read their encoded fixture back before removing it, since
Windows won't delete a file that is still open.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant