Apia saysgetUserMedia requests camera and microphone access, returning a MediaStream.
navigator.mediaDevices.getUserMedia({ video: true, audio: true }) prompts for permission and resolves to a MediaStream you can show in a <video> (video.srcObject = stream) or feed to WebRTC/recording. Requires HTTPS and a user gesture. Always stop tracks (track.stop()) when done to release the camera light.
Power-ups you unlock
getUserMedia({video,audio}) → MediaStream
Show via video.srcObject = stream
HTTPS + permission + user gesture required
Stop tracks when done to release devices
Legacy Larry attacks — common mistakes
Forgetting HTTPS (API unavailable)
Never stopping tracks (camera stays on)
Not handling permission denial
Boss battleSketch requesting the camera and showing it in a <video>.