MediaRecorder: resume event

The resume event is thrown when MediaRecorder.resume() is called.

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

addEventListener("resume", (event) => {});

onresume = (event) => {};

Event type

A generic Event.

Example

...

  pause.onclick = function() {
    if(MediaRecorder.state === "recording") {
      mediaRecorder.pause();
      // recording paused
    } else if(MediaRecorder.state === "paused") {
      mediaRecorder.resume();
      // resume recording
    }
  }

  mediaRecorder.onpause = function() {
    // do something in response to
    // recording being paused
  }

  mediaRecorder.onresume = function() {
    // do something in response to
    // recording being resumed
  }

...

Properties

None.

Specifications

Specification
MediaStream Recording
# dom-mediarecorder-onresume

Browser compatibility

BCD tables only load in the browser

See also