diff --git a/docs/packages/cli.mdx b/docs/packages/cli.mdx index fad6ea4bd28..092ea058ce5 100644 --- a/docs/packages/cli.mdx +++ b/docs/packages/cli.mdx @@ -363,7 +363,7 @@ thin with counts on it was cut short. | Flag | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `--output, -o` | Output directory. Default `./capture`, then `./capture-2/`, `./capture-3/`, … if that name is taken. | -| `--timeout` | Page load timeout in ms (default 120000) | +| `--timeout` | Page load timeout in ms, or a duration such as `30s` or `2m` (default 120000) | | `--capture-budget` | Budget in ms for everything after the page loads (default 120000). Cooperative — it stops new work, but cannot interrupt work already running. | | `--skip-assets` | Do not download images and SVGs | | `--skip-vision` | Do not run AI image captioning | @@ -1588,7 +1588,7 @@ npx hyperframes grade-compare --for frame.png --luts warm.cube,cool.cube | `--project` | Base directory for relative paths | | `--out` | Output PNG (default `/grade-compare.png`) | | `--baseline` / `--no-baseline` | Include the ungraded frame as an `original` cell (on) | -| `--timeout` | Render-ready timeout (default 5000 ms) | +| `--timeout` | Render-ready timeout in ms, or a duration such as `30s` (default 5000 ms) | | `--json` | Machine-readable results | ### Deprecated: `validate`, `inspect`, and `layout` diff --git a/docs/packages/player.mdx b/docs/packages/player.mdx index 5fdfa28926e..1d5e21b0c97 100644 --- a/docs/packages/player.mdx +++ b/docs/packages/player.mdx @@ -138,6 +138,41 @@ player.addEventListener("timeupdate", (event) => { | `error` | `{ message }` | Load or runtime error; a video adds its `MediaError` `code` | | `playbackerror` | `{ source, error }` | The browser blocked playback, for example unmuted autoplay | +## Custom icons and loading mark + +Put an element with a `slot` attribute inside the player to replace a control glyph or the loading mark. Anything you leave out keeps the default. + +| Slot | Shown when | Default size | +| ------------------- | ----------------------------------------------------------- | ------------ | +| `play-icon` | Paused | 24 px | +| `pause-icon` | Playing | 24 px | +| `volume-high-icon` | Unmuted, volume 0.5 or higher | 20 px | +| `volume-low-icon` | Unmuted, volume below 0.5 | 20 px | +| `volume-muted-icon` | Muted | 20 px | +| `loading-mark` | Preparing shader transitions, loading assets, and buffering | 78 px | + +```html title="index.html" + + + + + +``` + +Glyphs take the control bar's color through `currentColor`, and you set their size. Put `slot` on the `` or `` itself, as a direct child of the player; a wrapper element needs `display: contents` to keep the glyph centered. A custom mark replaces the HyperFrames light sweep and glow, so add your own CSS animation if you want motion. + +Until the element is defined, its children show as plain content. Hide them: + +```css title="styles.css" +hyperframes-player:not(:defined) > [slot] { + display: none; +} +``` + ## Advanced: iframe access The composition runs inside an `