Dot Equalizer
Give it an audio or video element on the page, or a stream like the microphone. Bands are spaced the way we hear pitch, low on the left; each bar jumps up with the sound and sinks slowly, and a peak dot holds at the top for a moment before dropping. At rest the panel is its unlit dots, and it sleeps when nothing is playing or it's out of view. An element is still heard through the speakers; a microphone is only listened to.
Needs: None. Web Audio's analyser, in the browser.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| source | HTMLMediaElement | MediaStream | null | required | What to listen to: an audio or video element, or a stream such as the microphone. |
| bands | number | 24 | How many bands, low to high. |
| height | number | 96 | Height in px. It fills its container's width. |
| tone | string | – | The bars' colour. The page's accent by default. |
| pitch | number | 3 | Size of one dot in px. |
| label | string | "Sound levels" | What it's showing, for screen readers. |
| className | string | – | Class on the meter. |
| style | CSSProperties | – | Style on the meter. |