v151 · media · capabilities
Capability Elements <usermedia> MVP
A declarative, user-activated control for accessing and interacting with media streams. Instead of calling getUserMedia() from JavaScript and triggering a permission prompt, the <usermedia> element provides a browser-managed UI for starting and stopping a camera/microphone stream.
concepts
Declarative Permission Flow
Feature-detect the
<usermedia>element and compare the declarative permission flow (element-based) with the imperativegetUserMedia()flow side by side.Camera Preview
If the element is supported, render a live camera preview using
<usermedia>. Falls back togetUserMedia()for unsupported browsers.
why it shipped
Permission prompts triggered directly from JavaScript are a common source of confusion — users see a prompt with no context about why it appeared. The <usermedia> element puts the control in the page's UI, so the user sees the camera button and explicitly clicks it before the prompt fires. This is more transparent and user-friendly.