MediaRecorder: start event
MediaStream Recording
MediaStream Recording
The **`start`** event of the MediaRecorder interface is fired when
MediaRecorder.start() is called. At this point, the data
starts being gathered into a Blob.
## Syntax
Use the event name in addEventListener():
```js-nolint
addEventListener("start", (event) => { })
```
Alternatively, assign to the [event handler property](/docs/Web/API/Document_Object_Model/Events#using_onevent_properties) of the interface:
```js-nolint
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
};
```
## Specifications
## Browser compatibility
## See also
- [Using the MediaStream Recording API](/docs/Web/API/MediaStream_Recording_API/Using_the_MediaStream_Recording_API)
- [Web Dictaphone](https://mdn.github.io/dom-examples/media/web-dictaphone/): MediaRecorder +
getUserMedia + Web Audio API visualization demo, by [Chris Mills](https://github.com/chrisdavidmills) ([source on GitHub](https://github.com/mdn/dom-examples/tree/main/media/web-dictaphone).)
- [simpl.info MediaStream Recording demo](https://simpl.info/mediarecorder/), by [Sam Dutton](https://github.com/samdutton).
- Navigator.getUserMedia
Cite this
"MediaRecorder: start event". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/start_event JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy