Demos / Camera preview

Live camera in a webpage.

getUserMedia requests permission for the iPad's camera and streams it into a <video> element. The Snap button copies the current frame to a canvas, nothing is uploaded.

Waiting for permission

Privacy: the stream lives in this tab. Nothing is recorded, nothing is uploaded, and the stream stops the moment you leave the page.

Permission & secure contexts

getUserMedia only works on a secure context (HTTPS or localhost). On iPadOS the permission prompt also asks which camera; the Switch button just calls getUserMedia again with the opposite facingMode.