HTML Media Capture on Desktop
- Category
- DOM
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
Extend support for the HTML Media Capture "capture" attribute on <input type="file"> to desktop platforms (Windows, macOS, Linux). Currently this is only implemented on Android. On desktop, activating a file input with capture="user" or capture="environment" will open a native camera/microphone capture dialog supporting photo (JPEG), video (WebM VP8+Opus), and audio-only (WebM Opus) modes, based on the accept attribute. CL: https://chromium-review.googlesource.com/c/chromium/src/+/7594822 Design Doc: https://docs.google.com/document/d/1p2QlRMDbHUc-GneEUuf-yHXRCqWqJijZSFD_KErqdnQ/edit?usp=sharing
Motivation
The HTML Media Capture specification defines a capture attribute on <input type="file"> that allows web pages to request media capture directly from the device's camera or microphone. While this has been supported on Android for years, desktop browsers have never implemented it. Web developers who want camera capture on desktop are forced to use the significantly more complex getUserMedia() + MediaRecorder APIs, build custom UI for camera preview and recording controls, and handle media encoding themselves. This is a high barrier for simple use cases like profile photo capture or document scanning. Implementing the existing W3C Recommendation on desktop gives developers a simple, declarative way to access camera and microphone input with a single HTML attribute.
Standards & signals
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/40291635
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=html-media-capture-on-desktop
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+HTML%20Media%20Capture%20on%20Desktop
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=HTML%20Media%20Capture%20on%20Desktop
- Baseline status: https://webstatus.dev/?q=HTML%20Media%20Capture%20on%20Desktop