open-standards/wai/examples/video-room/README.md
Transaction Science e8c8327631 wai/examples: every template Apache-2.0, its LICENSE carried into the project
Each example holds the license's text as LICENSE (wai/LICENSE, byte for byte) and says so in
its README; wai create writes it with the rest of the template, from one copy in the binary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 04:52:31 -04:00

28 lines
1.2 KiB
Markdown

# A video room in one page
**What it shows.** Your own page (`index.html`) with a live room in it. The room client in the
frame makes a key in the tab, asks the room service for a grant for that key, and joins the
relay with it. Every object it receives is checked against its signed receipt before it is
decoded. The page's own script calls the room service's HTTP API to say who is here.
**Run it.**
```sh
wai create my-room --template video-room
cd my-room
wai dev
```
Open `http://127.0.0.1:8080/` in two tabs, or in two browsers, and press **Join** in each.
**What you see.** Each tab shows the other's camera and plays its sound. The line above the
frame counts the people present. Leave in one tab, and the other lays the room out again.
**Make it yours.** Edit `index.html`. The room is at `/room/?service=/room-api` on the same
origin; the API is described at https://wai.transaction.science/docs/api/.
**With a coding assistant.** Run `wai setup-agent` in this directory: it writes the
instructions an assistant reads and connects it to WAI's tools.
**License.** Apache-2.0: the text is in `LICENSE`, and a project `wai create` makes from this
example carries it.