Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The capture property of the HTMLInputElement interface reflects the <input> element's capture attribute. Only relevant to the <input> of type file, the property and attribute specify whether, a new file should be captured from a user-facing (user) or outward facing (environment) camera or microphone. The type of file is defined the accept attribute. If the attribute is not explicitly set, the capture property is an empty string.
A string; generally either user or environment, or an empty string ("").
| HTML Media Capture # dom-htmlinputelement-capture |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jan 25, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.