Document waveform visualizer types
This commit is contained in:
1 parent
5d3dff0144
commit
cb466780d7
1 file changed
+16
-4
@@ -118,11 +118,23 @@ counter, since seeking a live stream isn't meaningful.
|
||||
|
||||
### Waveform visualizer
|
||||
|
||||
`WAVEFORM_ENABLED=true` shows a real-time scrolling waveform that builds out as
|
||||
the stream plays (it appears only after the listener presses play). It uses the
|
||||
`WAVEFORM_ENABLED=true` shows a real-time visualizer that builds out as the
|
||||
stream plays (it appears only after the listener presses play). It uses the
|
||||
Web Audio API — an `AnalyserNode` fed by the `<audio>` element — and paints
|
||||
peaks onto a `<canvas>` themed with your accent color. Tunable via
|
||||
`WAVEFORM_HEIGHT`, `WAVEFORM_COLOR`, and `WAVEFORM_WINDOW_SECONDS`.
|
||||
onto a `<canvas>` themed with your accent color. Tunable via `WAVEFORM_HEIGHT`,
|
||||
`WAVEFORM_COLOR`, and `WAVEFORM_WINDOW_SECONDS`.
|
||||
|
||||
There are several render styles: `bars` (default, scrolling peak history),
|
||||
`line` (oscilloscope), `vu` (single level meter), `spectrum` /
|
||||
`spectrum-mirror` (frequency bars), `blob` (smoothed filled area) — these six
|
||||
render below the art and are mutually exclusive — plus `circular` (a ring
|
||||
around the art) and `glow` (the art pulses with loudness), which are
|
||||
independent toggles that can combine with a below-art style and with each
|
||||
other. Set `WAVEFORM_TYPES` (comma-separated) to expose more than one; a
|
||||
small picker then appears letting each visitor choose their own combination,
|
||||
remembered in their browser. `WAVEFORM_DEFAULT` sets what's active before a
|
||||
visitor picks anything. Leaving both unset behaves exactly like before this
|
||||
setting existed: `bars` only, no picker.
|
||||
|
||||
Two important caveats:
|
||||
|
||||
|
||||
Reference in new issue
Block a user