captureMedia.onclick = () => {
mediaRecorder.requestData();
// makes snapshot available of data so far
// ondataavailable fires, then capturing continues
// in new Blob
};MediaRecorder: requestData() method / notebook
MediaRecorder: requestData() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.