This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
The state read-only property of the MediaRecorder interface returns the current state of the current MediaRecorder object.
A string containing one of the following values:
inactiveRecording is not occurring — it has either not been started yet, or it has been started and then stopped.
recordingRecording has been started and the user agent is capturing data.
pausedRecording has been started, then paused, but not yet stopped or resumed.
record.onclick = () => {
mediaRecorder.start();
console.log(mediaRecorder.state);
// Will return "recording"
console.log("recorder started");
};
| Specification |
|---|
| MediaStream Recording> # dom-mediarecorder-state> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
state |
4947–49Before Chrome 49, only video is supported, not audio. |
79 | 25 | 36 | 14.1 | 4947–49Before Chrome Android 49, only video is supported, not audio. |
25 | 36 | 14 | 5.0 | 4947–49Before WebView Android 49, only video is supported, not audio. |
14 |
Navigator.getUserMedia()
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/state