Media Capture
This document defines a set of JavaScript APIs that allow local media, including audio and video, to be requested from a platform.
The publisher of the pinned text is named in Sources. With this skill the agent applies that text: when capturing camera, microphone, screen or element media.
Follow the workflow below step by step. Every rule here comes from a source in Sources. Quoted requirements are sentences taken from the pinned text. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: producer or consumer of this specification.
- Target version: Media Capture and Streams (default, posture build); MediaStream Image Capture (default, posture track); MediaStream Recording (default, posture track); Media Capture from DOM Elements (default, posture track); MediaStreamTrack Insertable Media Processing using Streams (default, posture track); MediaStreamTrack Content Hints (default, posture track); Region Capture (default, posture track); Viewport Capture (default, posture track); Screen Capture (default, posture track); Capture Handle - Bootstrapping Collaboration when Screensharing (default, posture track); Audio Output Devices API (default, posture build). See
references/versions.md. - Revision: the pinned revision in Sources, unless the user names another.
- Sources: when refreshing this skill, re-read every URL in Sources and check the publisher index for a newer revision or version line.
Invariants
- 2. Conformance. "The key words MAY , MUST , MUST NOT , NOT REQUIRED , and SHOULD in this document are to be interpreted as described in BCP 14 [ RFC2119 ] [ RFC8174 ] when, and only when, they appear in all capitals, as shown here."
- 3. Terminology. "The platform SHOULD try to minimize such excursions as far as possible, but will continue to deliver media even when a temporary or permanent condition exists that prevents satisfying the constraints."
- 4.2 MediaStream. "The track set MUST contain the MediaStreamTrack objects that correspond to the tracks of the stream."
- 4.2 MediaStream. "To add a track track to a MediaStream stream , the User Agent MUST run the following steps: If track is already in stream's track set , then abort these steps."
- 4.2 MediaStream. "To remove a track track from a MediaStream stream , the User Agent MUST"
- Attributes. "id of type DOMString , readonly The id attribute MUST return the value to which it was initialized when the object was created."
- Attributes. "When a MediaStream is created, the User Agent MUST generate an identifier string, and MUST initialize the object's id attribute to that string, unless the object is created as part of a special purpose algorithm that specifies how the stream id must be initialized."
- Attributes. "To avoid fingerprinting, implementations SHOULD use the forms in section 4.4 or 4.5 of RFC 4122 when generating UUIDs."
Workflow
- Pick the version. Use the current line unless a named consumer needs a supported one. Do not author a legacy line. Emit a preview only when its posture is build and the user asked for that draft.
->
references/versions.md✓ The target version is recorded, and it is not a legacy line. - Apply the pinned requirements. Walk the quotes in
references/requirements.mdand implement each one that applies to the role. ->references/requirements.md✓ Each applicable quote is either implemented or recorded as out of scope for the role, with the heading it came from. - Upgrade (only when asked). Follow the upgrade section from the source line to the target.
->
references/versions.md✓ The result cites the target line and no longer depends on a requirement that only the old line stated.
Verify before done
- The artifact cites the target line's revision from Sources.
- Every applicable quoted requirement in
references/requirements.mdholds. - Nothing from a preview line is emitted unless its posture is build and the user opted in.
Reference index
references/versions.md: every version line, which one to use, and how to upgrade. Load for steps 1 and 3.references/requirements.md: quotes taken from the pinned specification. Load for step 2.
Related skills
Install related spec skills by name with npx skills add ScaleDockHQ/scaledock-skills --skill <name>.
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- Media Capture and Streams: Candidate Recommendation Draft, mediacapture-streams CRD-mediacapture-streams-20251009 (Candidate Recommendation Draft, 2025-10-09), checked 2026-10-06.
- MediaStream Image Capture: Working Draft, image-capture WD-image-capture-20250423 (Working Draft, 2025-04-23), checked 2026-10-06.
- MediaStream Recording: Working Draft, mediastream-recording WD-mediastream-recording-20260316 (Working Draft, 2026-03-16), checked 2026-10-06.
- Media Capture from DOM Elements: Working Draft, mediacapture-fromelement WD-mediacapture-fromelement-20250212 (Working Draft, 2025-02-12), checked 2026-10-06.
- MediaStreamTrack Insertable Media Processing using Streams: Working Draft, mediacapture-transform WD-mediacapture-transform-20260416 (Working Draft, 2026-04-16), checked 2026-10-06.
- MediaStreamTrack Content Hints: Working Draft, mst-content-hint WD-mst-content-hint-20250919 (Working Draft, 2025-09-19), checked 2026-10-06.
- Region Capture: Working Draft, mediacapture-region WD-mediacapture-region-20230712 (Working Draft, 2023-07-12), checked 2026-10-06.
- Viewport Capture: Working Draft, mediacapture-viewport WD-mediacapture-viewport-20241009 (Working Draft, 2024-10-09), checked 2026-10-06.
- Screen Capture: Working Draft, screen-capture WD-screen-capture-20260827 (Working Draft, 2026-08-27), checked 2026-10-06.
- Capture Handle - Bootstrapping Collaboration when Screensharing: Working Draft, capture-handle-identity WD-capture-handle-identity-20250306 (Working Draft, 2025-03-06), checked 2026-10-06.
- Audio Output Devices API: Candidate Recommendation Draft, audio-output CRD-audio-output-20251009 (Candidate Recommendation Draft, 2025-10-09), checked 2026-10-06.