open-standards/wai/wai-web/compose/index.html
Transaction Science bf7c9fcfee
All checks were successful
WAI operation catalogue / does this change touch it (push) Successful in 17s
wai-fleet service / does this change touch it (push) Successful in 16s
joule-moq-web browser client / joule-moq-web · does this change touch it (push) Successful in 25s
wai-app and Create / wai-app · does this change touch it (push) Successful in 23s
wai-ledger service / does this change touch it (push) Successful in 19s
wai-sink-swift native sink package / does this change touch it (push) Successful in 22s
joule-moq-room room service / joule-moq-room · does this change touch it (push) Successful in 53s
WAI Studio / does this change touch it (push) Successful in 18s
wai-quantum for JavaScript / does this change touch it (push) Successful in 54s
wai-audit collector and player integration / does this change touch it (push) Successful in 57s
joule-moq-remote host agent / joule-moq-remote · does this change touch it (push) Successful in 1m7s
wai-key-proxy / does this change touch it (push) Successful in 57s
wai-quantum studio and desktop / does this change touch it (push) Successful in 55s
wai-sink-android native sink library / does this change touch it (push) Successful in 55s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (push) Successful in 2m46s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 5m2s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Successful in 5m5s
joule-moq-room room service / joule-moq-room, every target (push) Successful in 6m41s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 16s
wai-quantum energy-landscape jobs / does this change touch it (push) Successful in 15s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (push) Successful in 1m2s
wai-fleet service / service · linux (push) Successful in 3m16s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Successful in 1m14s
wai-ledger service / service · linux (push) Successful in 4m28s
wai-audit collector and player integration / collector · linux (push) Successful in 5m1s
WAI operation catalogue / the catalogue and every door · linux (push) Successful in 8m15s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Successful in 1m28s
wai-quantum studio and desktop / studio · browser (push) Successful in 5m18s
wai-key-proxy / proxy · linux (push) Successful in 3m1s
wai-quantum studio and desktop / desktop app · windows (push) Successful in 10m1s
wai-quantum for JavaScript / javascript · linux (push) Successful in 7m14s
wai-quantum energy-landscape jobs / the same bits · linux-arm64 (push) Successful in 12m23s
wai-fleet service / service · macos (push) Successful in 38s
wai-quantum energy-landscape jobs / native against WebAssembly, over many seeds (push) Successful in 7m35s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Successful in 9m15s
wai-quantum energy-landscape jobs / reader, kernels, answers and the stated result · linux, release (push) Successful in 9m29s
wai-quantum studio and desktop / desktop app · linux (push) Successful in 12m24s
WAI Studio / Studio in WebKit · linux (push) Successful in 20m25s
wai-ledger service / service · macos (push) Successful in 1m28s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (push) Successful in 7m54s
wai-quantum energy-landscape jobs / the module under wasm32-wasip2 (wasmtime) (push) Successful in 20m38s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (push) Successful in 15m54s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Successful in 2m9s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (push) Successful in 49s
WAI Studio / Studio in Chromium and Firefox · macos (push) Successful in 10m34s
wai-quantum studio and desktop / desktop app · macos (push) Successful in 4m34s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Successful in 15m59s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Successful in 6m42s
wai-quantum energy-landscape jobs / the same bits · macos (push) Successful in 7m0s
The browser sink presents a graphics component's text floor, with captions as graphics-vector §6.4 has them
browser-sink §14.9: where a device has no decoder of wai.graphics.vector, a composing
page presents each graphics piece's floor (graphics-vector §6.3), the piece's transcript
as wai.text.zstd, as text: the blocks active at the clock's tick, in block order, each
with its language, direction and writing mode. A piece presents its overlay or its
floor, never both.

Before presenting, the page holds the floor object to its piece: its derived_from names
the piece's base (floor_base), its payload is the raw frame and no other Zstandard
frame (floor_frame), its target states the transcript's length and a timebase
(floor_target), and its content is a transcript in graphics-vector §5.4's one encoding
(floor_transcript).

A caption or a subtitle block is never presented from the floor (caption_track): the
text component of its language carries it, and the text layer presents it or not as the
viewer set it. A forced_narrative block is presented from the floor unless the text
layer shows a cue of its language with its string at that millisecond (forced_in_cue),
so the words are on the page once. The text layer presents one text component of a
package, or none.

wai-rs browser_sink::floor is the reference (read, present), which wai-web's compose
bundle calls as TextFloor. Corpus live-conformance/browser-floor/ (49 floors, 25
presentations), written by wai_browser_floor_vectors and regenerating byte for byte on
x86_64 and aarch64; tests/browser_floor.rs also reads the floors wai-pack wrote for
pack-conformance/multi/multi-captions-01, and wai-web's compose::floor_tests holds them
to wai-vector's transcripts. browser_floor_verify.py, the second implementation,
refuses 72 mutated floors each with its defect's reason, fails 23 mutated copies of the
corpus, and each of its 32 checks, dropped, is caught. compose/run.mjs gains case 10.

Not here: a base that is routed and then refused when loaded still refuses the package,
and the overlay path does not yet leave out caption items (graphics-vector §5.7).

Co-Authored-By: Claude <[email protected]>
2026-11-10 22:36:11 -05:00

95 lines
5.8 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>WAI composing sink</title>
<style>
:root {
--bg: #fbfbfa; --fg: #1b1c1e; --muted: #5d6168; --line: #d9dadc; --panel: #ffffff;
--ok: #1d6b3a; --bad: #a3261b; --accent: #2b59c3;
}
@media (prefers-color-scheme: dark) {
:root { --bg: #141518; --fg: #e8e9eb; --muted: #a0a4ab; --line: #34363b; --panel: #1c1d21;
--ok: #6fcf8f; --bad: #ff8a7a; --accent: #8fb0ff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 1.35rem; margin: 0 0 4px; }
h2 { font-size: 1.05rem; margin: 28px 0 8px; }
p.lede { color: var(--muted); margin: 0 0 16px; max-width: 70ch; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 12px 0; }
button, select { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); }
button:disabled { opacity: .5; }
#status { color: var(--muted); }
#status.bad { color: var(--bad); font-weight: 600; }
.stage-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 720px) { .stage-row { grid-template-columns: 1fr; } }
.stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#video { image-rendering: pixelated; }
#text { position: absolute; inset: 0; pointer-events: none; padding: 3% 4%; display: flex; flex-direction: column; }
.cue { background: rgba(0, 0, 0, .72); color: #fff; padding: .2em .6em; border-radius: 3px; font-size: clamp(12px, 2.4vw, 22px); max-width: 90%; }
.cue.top { align-self: center; order: 0; }
.cue.bottom { align-self: center; margin-top: auto; }
.cue.align-left { align-self: flex-start; } .cue.align-right { align-self: flex-end; }
#floor { position: absolute; inset: 0; pointer-events: none; padding: 3% 4%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em; }
.floor-block { background: rgba(0, 0, 0, .72); color: #fff; padding: .2em .6em; border-radius: 3px; font-size: clamp(12px, 2.4vw, 22px); max-width: 90%; white-space: pre-line; margin: 0; font-weight: 400; }
.floor-block[data-purpose="1"] { font-size: clamp(14px, 3.2vw, 30px); font-weight: 600; }
#floor-announce { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
#state table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#state td { padding: 2px 4px; border-bottom: 1px solid var(--line); }
.meta { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th, table.grid td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid th { color: var(--muted); font-weight: 600; }
.scroll { overflow-x: auto; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
code { font-size: .85em; overflow-wrap: anywhere; }
</style>
</head>
<body>
<main>
<h1>Composing sink</h1>
<p class="lede">A WAI package of several components, each carried in the capability that suits it. This page checks the
package's signed receipt and every object it is about to present, dispatches each component to a decoder this
device can run, and composes them on one timeline with the video as its clock. Titles this device cannot draw
are presented as text, from the transcript the package carries for them. A field, or a picture with layers,
is computed here stage by stage, and each stage is presented once it holds its signed digest.</p>
<div class="controls">
<button id="play" disabled>Play</button>
<label>Device profile
<select id="profile">
<option value="">this device</option>
<option value="wai.video.int_motion,wai.image.png">without the integer video rung</option>
<option value="wai.video.av1">without the AV1 decoder</option>
<option value="wai.graphics.vector">without the vector overlay</option>
<option value="wai.audio.score">without the score</option>
<option value="wai.splat.int_codec">without the splat decoder</option>
<option value="wai.image.int_cond_refine,wai.field.int_refine">without layers</option>
</select>
</label>
<span id="status" role="status">Opening the package…</span>
</div>
<div class="stage-row">
<div class="stage" aria-label="the composed picture">
<canvas id="video" width="64" height="36"></canvas>
<canvas id="overlay" width="1280" height="720"></canvas>
<div id="floor" role="group" aria-label="titles, as text"></div>
<div id="text" aria-live="polite"></div>
<div id="floor-announce" aria-live="polite"></div>
</div>
<div class="panel" id="state" aria-label="feed state"><div class="meta">Feed state appears here.</div></div>
</div>
<p class="meta" id="clock"></p>
<h2>What this device dispatched, and why</h2>
<div class="scroll"><table class="grid" id="dispatch"><thead><tr><th>Component</th><th>Piece</th><th>Presented</th><th>Route</th><th>Why</th></tr></thead><tbody></tbody></table></div>
<h2>Checks before presenting</h2>
<div class="scroll"><table class="grid" id="checks"><thead><tr><th></th><th>Check</th><th>Detail</th></tr></thead><tbody></tbody></table></div>
<p class="meta" id="device"></p>
</main>
<script type="module" src="page.js"></script>
</body>
</html>