-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ImageCapture native polyfill (#1283)
This change provides an initial implementation of a polyfill for [`ImageCapture`](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture) to enable high res photo capture. This builds on top of the existing `MediaCapture` polyfill, and follows existing patterns. Some notes on this: - MediaStream and MediaStreamTrack are polyfilled by the same class on the C++ side, which means that class (`MediaStream`) is what gets passed into the `ImageCapture` constructor. For this PR, I am considering `ImageCapture` to be part of the same polyfill. It is not independent, and has internal knowledge that the object passed into the `ImageCapture` constructor is actually a `MediaStream`. The `MediaStream` now exposes the underlying (platform specific) `CameraDevice`. - The `CameraDevice` remains the primary camera abstraction across platforms. As such, it is the thing that exposes high res photo capabilities, settings, and the ability to actually take a high res photo. Since capabilities are normally track specific, it just returns capabilities for the opened camera session. This should be fine because we only support opening a single camera stream at a time, and `ImageCapture` isn't constructed until you have a track (which is the result of opening a camera stream). This PR includes all the common glue code (e.g. napi) and platform abstractions, plus an initial iOS implementation (probably needs a bit more work, but the basics are in place).
- Loading branch information
Showing
14 changed files
with
580 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.