MediaStream Recording API
The MediaStream Recording API is the browser API for recording media streams into chunks that applications can process, store, or export.
Definition
The MediaStream Recording API is a W3C browser API for recording MediaStream objects. The W3C specification defines a recording API for use with streams, centered on the MediaRecorder interface, recording states, options, events, and BlobEvent data delivery.
MDN describes the API as closely affiliated with the Media Capture and Streams API and WebRTC. It can capture data generated by a MediaStream or HTMLMediaElement for analysis, processing, or saving. This page is about browser-side recording, not the permission gate that opens a camera or microphone, and not the screen-selection flow governed by Screen Capture API.
How It Works
An application creates a MediaRecorder with a source stream and optional settings such as MIME type or bit rates. The application starts recording with start(), stops with stop(), or waits for the source stream to end. The W3C overview says the recording is made available through ondataavailable.
MDN explains that MediaRecorder delivers media data through a sequence of dataavailable events. The event data is a Blob. A page can receive one blob at the end, request data manually, or pass a timeslice to receive periodic chunks. That chunking matters because it shapes upload design, retention, memory pressure, and what can be reviewed before data leaves the device.
As reviewed on June 25, 2026, MDN marked both the MediaStream Recording API and MediaRecorder as Baseline and widely available, with some parts varying by browser. That availability does not mean every codec, container, bitrate, or runtime path is portable.
Agent Context
Recording changes a stream from a passing signal into an artifact. An AI meeting assistant, interview tool, tutoring platform, browser agent, remote-support workflow, medical intake site, or workplace monitor can convert live sound and video into files that later feed transcription, summarization, training, search, scoring, or dispute review.
That is useful when the person expects a durable record. It is dangerous when recording is hidden inside a convenience feature. The agent may treat the blob as ordinary input, while the human experiences it as a remembered room, call, face, voice, or mistake. Governance has to account for the social meaning of recorded media, not only the JavaScript object.
Governance Use
A governed recorder separates capture permission, recording start, chunk handling, storage, analysis, sharing, and deletion. Permission to access a microphone does not automatically justify retaining a recording. Permission to record a meeting does not automatically justify training a model, scoring participants, or sharing clips with vendors.
Agent systems should expose recording state clearly. If a browser agent starts or controls MediaRecorder, the user should see what source is recorded, whether audio or video is included, where blobs go, whether upload begins during recording, and which automated actions can be triggered by the recorded content.
Limits
The API is not a consent system, evidence-authentication system, or safe-retention policy. It does not prove who was present, whether everyone consented, whether the recording is complete, whether chunks arrived on schedule, or whether the encoded file preserves every detail. MDN warns that timeslice timing is not exact and that browser behaviors can delay chunks or produce larger chunks.
Media recording also inherits the privacy problems of the source stream. A recording can include bystander speech, background screens, home interiors, children, health clues, workplace disputes, or protected information. The fact that the bytes are browser-generated does not make them neutral.
Minimum Evidence Record
For agent-mediated recording, record the origin, source stream class, audio and video inclusion, capture permission state, recording start and stop events, MIME type, chunking interval if used, upload timing, storage location class, retention rule, user-facing recording indicator, user stop action, and downstream model or workflow actions. Avoid storing raw blobs longer than necessary.
Source Discipline
Use the W3C MediaStream Recording specification for interface definitions, states, events, error handling, and privacy considerations. Use MDN for implementation-facing summaries of the API, MediaRecorder, and dataavailable. Use the W3C GitHub repository for development context, not as proof that a feature is safely deployed.
Spiralist Reading
Spiralism reads recording as memory made cheap. A stream disappears; a blob persists. Once persistence is easy, institutions become tempted to remember everything: every support call, class, interview, sales demo, therapy intake, meeting, and mistake.
The humane rule is not to reject memory. It is to make memory answerable. A recording should have a reason, a visible beginning, a visible end, a path to deletion, and a boundary between evidence and extraction.
Related Pages
- Media Capture and Streams API
- Screen Capture API
- Web Speech API
- WebRTC Data Channels
- AI Browsers and Computer Use
- AI Audit Trails
- AI Data Retention
- Contextual Integrity
- Surveillance Capitalism
- Biometric Categorization
Sources
- W3C, MediaStream Recording.
- MDN Web Docs, MediaStream Recording API.
- MDN Web Docs, MediaRecorder.
- MDN Web Docs, MediaRecorder: dataavailable event.
- W3C GitHub, mediacapture-record.