open-standards/wai/examples/video-room/index.html
Transaction Science 632f8cf394 wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples
wai-rs gains the feature floor (the mandatory floor of SPEC 5: PNG, FLAC and
zstd, decoded with no system codec library) and quickstart (the floor, and the
receipt checks hello and verify run). The wai command line gains four verbs,
one module each, named in one table (dx::VERBS):

- hello: name, dispatch, rebuild and receipt on a picture made here, the
  receipt laid out as http-delivery 8 lays receipts beside an object;
- create: a new project from one of the examples, whose files the binary
  holds; tests/cli_dx.rs holds them to wai/examples/ byte for byte;
- dev: the relay, the room service and the room page on one loopback origin,
  as a production front serves them; --check checks each piece through it;
- verify: the receipt indexes under a directory, checked offline.

The project file a template writes, wai.json, is read in one place
(dx/project.rs). wai/examples/ holds video-room, watch-together, messaging,
encoder-ingest, package-and-deliver, verify-receipts, apple-app, android-app
and remote-desktop, each with a README and a test that runs it through
wai create and wai dev. wai/quickstart/ builds the room client and the
archive that holds wai, the relay, the room service, the remote host and the
packager.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 22:58:39 -04:00

38 lines
1.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My room</title>
<style>
body { font: 15px/1.5 system-ui, sans-serif; margin: 0; padding: 16px; background: #0f1115; color: #e8eaf0; }
h1 { font-size: 20px; margin: 0 0 8px; }
#who { color: #a8afc0; margin: 0 0 12px; }
iframe { width: 100%; height: 80vh; border: 1px solid #2a2f3a; border-radius: 8px; background: #000; }
</style>
</head>
<body>
<h1>My room</h1>
<p id="who" aria-live="polite">Asking the room service who is here…</p>
<!-- The reference room client, served by `wai dev` on this page's own origin. It makes a key
in this tab, asks the room service for a grant for it, and joins the relay with it. -->
<iframe id="room" title="The room" src="/room/?service=/room-api" allow="camera; microphone; autoplay"></iframe>
<script type="module">
// Your own code, calling the room service's HTTP API: GET /room-api/room is the signed
// room, with how many people are present and how many hold a publisher's place.
const who = document.getElementById("who");
async function poll() {
try {
const r = await fetch("/room-api/room", { cache: "no-store" });
const room = await r.json();
who.textContent = `Room ${room.room.slice(0, 12)}…: ${room.present} present, ${room.publishers} of ${room.max_publishers} places taken.`;
who.dataset.present = String(room.present);
} catch (e) {
who.textContent = `The room service did not answer (${e.message}). Is \`wai dev\` running?`;
}
}
poll();
setInterval(poll, 2000);
</script>
</body>
</html>