← Back to release summary

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

Ecosystem

View on chromestatus.com