WebRTC, IIRC. I recently rolled out a webapp at work that case workers can use to help determine eligibility for potential clients. One minor capability within it is photo capture. Along with a slew of questions about demographics, disabilities, and such, it'll also take a picture and stash it in the database. If someone is then accepted as a client, that photo is then available so that (for instance) our delivery drivers can compare the photo on file to whoever answers the door to make sure the client's at home to accept delivery. We could've just had the user take a picture with the phone's camera app and then upload into our webapp from there, but this is a seamless approach that's easier to use.
There's not much to it, either. The page that handles the capture is 28 lines of HTML and 114 lines of JavaScript, a fair bit of which was cribbed from examples I found with a few seconds' googling. It provides a live view of what the camera sees, lets you switch between front and back cameras, and lets you preview the capture before it's sent to the server.