![]() ![]() In essence, this means that takePhoto() gives access to the full still-image resolution capabilities of the camera. GrabFrame() just takes the next available VideoFrame in the MediaStreamTrack inside the renderer process, whereas takePhoto() interrupts the MediaStream, reconfigures the camera, takes the photo (usually in a compressed format, hence the Blob) and then resumes the MediaStreamTrack. The takePhoto() method gives access to the camera's maximum resolution. If you run the code above, you'll notice a difference in dimensions between the grabFrame() and takePhoto() results. error ( 'Uh, oh, takePhoto() error:', error ) ) # Camera capabilities The Image Capture API gets access to a camera via a MediaStreamTrack obtained from getUserMedia(): navigator. The API has then two capture methods takePhoto() and grabFrame() and ways to retrieve the capabilities and settings of the camera, and to change those settings. Previous techniques for taking photos on the Web have used video snapshots, which are lower resolution than that available for still images.Īn ImageCapture object is constructed with a MediaStreamTrack as source. Best of all, Image Capture allows you to access the full resolution capabilities of any available device camera or webcam. The API enables control over camera features such as zoom, brightness, contrast, ISO and white balance. We've also published an ImageCapture polyfill library. This API is available in Chrome 59 on Android and desktop. Image Capture is an API to capture still images and configure camera hardware settings. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |