The MediaRecorder.state
read-only property returns the current state of the current MediaRecorder
object.
The MediaRecorder.state
read-only property returns the current state of the current MediaRecorder
object.
A string containing one of the following values:
js
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 | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
state |
4947–49Before Chrome 49, only video is supported, not audio. |
79 | 25 | No | 36 | 14.1 | 4947–49Before Chrome 49, only video is supported, not audio. |
4947–49Before Chrome 49, only video is supported, not audio. |
25 | 36 | 14 | 5.0 |
Navigator.getUserMedia
© 2005–2023 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