MediaRecorder.state
read-only property returns the current state of the current
MediaRecorder
对象。
var state = MediaRecorder.state
A AnimationPlayState object containing one of the following values:
| Enumeration | 描述 |
|---|---|
inactive
|
Recording is not occuring — it has either not been started yet, or it has been started and then stopped. |
recording
|
Recording has been started and the UA is capturing data. |
paused
|
Recording has been started, then paused, but not yet stopped or resumed. |
...
record.onclick = function() {
mediaRecorder.start();
console.log(mediaRecorder.state);
// Will return "recording"
console.log("recorder started");
}
...
| 规范 | 状态 | 注释 |
|---|---|---|
|
MediaStream 录制
The definition of 'MediaRecorder.state' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
state
|
Chrome
49
|
Edge 79 | Firefox 25 | IE No | Opera 36 | Safari No |
WebView Android
49
|
Chrome Android
49
|
Firefox Android 25 | Opera Android 36 | Safari iOS No | Samsung Internet Android 5.0 |
完整支持
不支持
见实现注意事项。
Navigator.getUserMedia
MediaRecorder