MediaRecorder: start event

The start event is fired when MediaRecorder.start() is called. At this point, the data starts being gathered into a Blob.

Syntax

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

js

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

onstart = (event) => {};

Event type

A generic Event.

Example

js

record.onclick = () => {
  mediaRecorder.start();
  console.log("recorder started");
};

mediaRecorder.onstart = () => {
  // do something in response to
  // recording being started
};

Instance properties

None.

Specifications

Specification
MediaStream Recording
# dom-mediarecorder-onstart

Browser compatibility

BCD tables only load in the browser

See also