media is an AUP cross-device primitive, not a Web Device layout component and not a Web-only widget. It is one of the 18 names in AUP_PRIMITIVES and appears in every target's DeviceCaps.primitives map as native, webview, partial, or unsupported.
Contract
| Field | Value |
|---|---|
| Primitive name | media |
| Layer | AUP cross-device primitive (AUP_PRIMITIVES) |
| Public status | released |
| Document capability | native |
| Shared degradation chain | None (document reports native) |
| Author entry | AUP tree · generic Markdown directive ::media{…} · Markdown images (separate img path) |
| Document renderer / notes | renderer/primitives/media.ts |
| Showcase evidence | Markdown image path; Showcase media-heavy pages |
When to use
You need a semantic media node with type (image / video / audio / avatar) and optional caption.
When not to use
Do not treat unrestricted third-party embeds as trusted media. Same-site / whitelist rules for frames are separate (embed). Inline Markdown  is a different structure path (image).
Sample contract
| Field | Value |
|---|---|
| Purpose | Document-target media image with caption |
| Boundaries | No video/audio product promise on this page; trust/whitelist for arbitrary embeds is separate; missing src → placeholder |
| Author entry | Generic leaf directive ::media{…} (Markdown → AUP type: media) |
| Surface | Web Device document |
| Public status | released |
| Fallback / failure | Missing src → empty placeholder figure; unsupported type falls through to image rendering |
| Verification | Routes below · arc --version = 2.0.0-beta.28 |
Document sample (image)
This sample uses the generic Markdown → AUP path (::media → type: media). The asset is a static documentation image URL used elsewhere on this site. It is not evidence of video, audio, avatar, or unrestricted third-party embedding.
Source:
::media{id="docs-prim-media-img" type="image" src="https://media.arcblock.io/lib/2f/2f757138def2b3fc.w1600.webp" alt="Illustrative documentation asset" caption="Document-target media illustration"}Rendered:

Failure and limits
| Situation | Expected result |
|---|---|
Missing src | Empty aup-media placeholder (no broken remote load as the sample contract) |
Unknown type | Falls through to image rendering path |
| Expecting frame / iframe embed API | Wrong surface — use ::embed / frame rules |
Inline  | Separate MD structure path, not this AUP media node sample |
Source (missing src — placeholder only):
::media{id="docs-prim-media-empty" type="image" alt="Missing source becomes a placeholder"}Rendered:
Minimal AUP JSON shape (interactive / full-web authoring; same renderer keys):
{
"id": "hero-shot",
"type": "media",
"props": {
"type": "image",
"src": "/assets/example.png",
"alt": "Example",
"caption": "Caption"
}
}Verification evidence
| Item | Value |
|---|---|
| Baseline | 2026-08-09 · arc --version → 2.0.0-beta.28 |
| Capability row | docs/aup/capability-matrix.md (internal, non-routed) · media |
| Implementation | content-reader.ts (generic directive → type name); renderer/primitives/media.ts |
| Public routes | /en/docs/aup/primitives/media/ · /zh/docs/aup/primitives/media/ |
| Local run | arc service start --blocklet blocklets/arcblock --port 4900 · open routes; confirm figure + caption and empty placeholder |
| Accept | Image sample shows figure/caption; empty src is placeholder; page does not claim video/audio/frame |
Evidence anchors
| Item | Value |
|---|---|
| Registry | packages/aup/src/aup-types.ts · AUP_PRIMITIVES |
| Document caps | providers/runtime/web-device/src/device-caps.ts · DEVICE_CAPS_DOCUMENT |
| Degradation | packages/aup/src/degradation.ts · DEGRADATION_CHAINS |
| Internal matrix | docs/aup/capability-matrix.md (internal, non-routed) |
| Taxonomy hub | Primitive taxonomy and evidence |
| Sample contract rules | Live examples: scope and contract |