This article shows how to use WebRTC to access the camera on a computer or mobile phone with WebRTC support and take a photo with it.Try this sample, then read on to learn how it works.
The MediaStreamTrackinterface represents a single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.