Media.pause()
method (part of the
MediaRecorder API
) is used to pause recording of media streams.
当
MediaRecorder
对象的
pause()
method is called, the browser queues a task that runs the below steps:
MediaRecorder.state
is "inactive", raise a DOM
InvalidState
error and terminate these steps. If not, continue to the next step.
MediaRecorder.state
to "paused".
Blob
, but keep it available so that recording can be resumed later on.
pause
事件。
MediaRecorder.pause()
undefined
.
InvalidStateError
MediaRecorder
is currently
"inactive"
; you can't pause recording if it's not active. If you call
pause()
while already paused, it silently does nothing.
...
pause.onclick = function() {
mediaRecorder.pause();
console.log("recording paused");
}
...
| 规范 | 状态 | 注释 |
|---|---|---|
|
MediaStream 录制
The definition of 'MediaRecorder.pause()' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
pause
|
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