Hardware APIs demand permission and secure context
A video call button that silently fails on HTTP teaches users to distrust the whole product.
I request camera and microphone through constraints and handle denial as a normal outcome.
MDN documents getUserMedia permission behavior including rejection over insecure contexts and blocked policies.
The promise resolves with a MediaStream on success and rejects with named errors otherwise.
Permissions Policy can block sources entirely, so feature checks must precede every call.
If Web APIs live in the runtime, not the language explains availability, fetch() treats network as promises with explicit control contrasts with these gated reads.
I design a graceful fallback before requesting any device the page may not receive.