demo · v144 · origin trial

Microphone Meter

A <usermedia> element wired to a level meter. Click "request" — the element handles the permission flow declaratively, then fires capture with the MediaStream. AnalyserNode renders the peak level.

Origin trial The <usermedia> element is behind chrome://flags/#capability-elements in Chrome 144. JS fallback uses navigator.mediaDevices.getUserMedia().

<usermedia> tag: checking…

peak: — dBFS

the API

<usermedia kind="audio" id="m">request mic</usermedia>
<script>
  m.addEventListener("capture", e => {
    const ctx = new AudioContext();
    const src = ctx.createMediaStreamSource(e.stream);
    // ... analyser, etc.
  });
</script>

see also