Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).

The Media.pause() method (part of the MediaRecorder API) is used to pause recording of media streams.

When a MediaRecorder object’s pause()method is called, the browser queues a task that runs the below steps:

  1. If MediaRecorder.state is "inactive", raise a DOM InvalidState error and terminate these steps. If not, continue to the next step.
  2. Set MediaRecorder.state to "paused".
  3. Stop gathering data into the current Blob, but keep it available so that recording can be resumed later on.
  4. Raise a pause event.



Return value



The 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() {
     console.log("recording paused");



Specification Status Comment
MediaStream Recording
The definition of 'MediaRecorder.pause()' in that specification.
Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
pauseChrome Full support 47
Notes Disabled
Full support 47
Notes Disabled
Notes Full support since Chrome 49.
Disabled From version 47: this feature is behind the Experimental Web Platform features preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.
Edge ? Firefox Full support 25IE ? Opera Full support 36Safari ? WebView Android Full support 49Chrome Android Full support 49Edge Mobile ? Firefox Android Full support 25Opera Android Full support 36Safari iOS ? Samsung Internet Android ?


Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also

Метки документа и участники

Внесли вклад в эту страницу: mdnwebdocs-bot, lucian95, Sheppy, jpmedley, Sebastianz, chrisdavidmills, teoli, kscarfone
Обновлялась последний раз: mdnwebdocs-bot,