MediaRecorder: start event
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 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
};
Specifications
Specification |
---|
MediaStream Recording # dom-mediarecorder-onstart |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
start event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- Using the MediaStream Recording API
- Web Dictaphone: MediaRecorder + getUserMedia + Web Audio API visualization demo, by Chris Mills (source on GitHub.)
- simpl.info MediaStream Recording demo, by Sam Dutton.
Navigator.getUserMedia