-
Notifications
You must be signed in to change notification settings - Fork 979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImageCapture API support #159
Comments
Thanks a lot for sharing. I'm really excited, I totally missed out on this new API. I was looking for something that supports turning on/off the torch. I'll consider integrating it with the next version. |
Any progress with this? I've tried enabling the torch through the capabilities but even though it reports torch as available capability it refuses to enable it on my Moto 3G through applyConstraints. I'm hoping that it might work with the above approach. |
Light/torch support has been released with v.12.0. |
Torch/Focus/etc can be specified now, does that leave this with any valid changes still to be made? |
Since the full media stream is exposed, the user can apply any settings they need so I think this can be closed. |
It might be an interesting proposal to wrap camera settings like that in something that's a little easier to get to (and perhaps could be given whether the stream is open or not). |
The question then arises whether Quagga is a good place for that? Because at that point we wrap browser API and we need to clone typings for that browser API in our public API and so on. Instead, I think we should keep it simple and either include an example of how to apply the settings in the README (so we can link to it) or as a separate package - but that's generally speaking when it comes to flows on top of Quagga, for applying these settings specifically, a separate package is an overkill. I'm in favor of keeping the core and API surface small and manageable and allow higher order operations be handled by either 3rd party packages or as standalone snippets in the docs. |
sure, makes sense also. Maybe I'll consider doing a wrapper that does something like that, to mess with it. In the meantime, I think we should compare @ltlBeBoy 's patch with the current code tree, and see if there's any good functionality in the patch that hasn't been added to master already, so we can either close this, or write a change to include it, then close it. |
I extended the code (Version 1.0) to support the (currently experimental) MediaStream Image Capture. It creates an ImageCapture from the active VideoStreamTrack and uses ImageCapture#grabFrame() to grab a frame from the stream.
By using this API the PhoneSettings can be specified which means that e.g. flash light or focus can be configured.
Note that this feature is currently only supported by Chrome for Android when the flag "chrome://flags/#enable-experimental-web-platform-features" is set to "true".
Example configuration (note inputStream.photoSettings and flag inputStream.imageCapture to enable use of the API):
Modifications:
The text was updated successfully, but these errors were encountered: