Comments (1)
Firstly, does navigator.mediaDevices.getSupportedCapabilities() return "torch: true"? if no, then browser doesn't support it on that device. If yes, then... it seems you might need to write some code more complex than a one liner to figure it out. Ultimately, you need to get access to a MediaStreamTrack, which you could do by building a dev version of Quagga and once you have that, you need to look at the results of MediaStreamTrack.getCapabilities(), and see if that returns "torch: true". If that is also a yes, then it's broken, report it to Samsung. If that is a no, then the device's camera does not support turning on the flash from the browser, which seems broken, report it to Samsung.
Alternatively, you might also check and see if there are multiple cameras reported -- Perhaps the torch is only supported with certain specific camera device ids.
To get a list of all camera devices, you can use Quagga.CameraAccess.enumerateVideoDevices(), and the results will be an array of all of the camera devices detected on the hardware, along with their identifiers. You can pass the deviceId to Quagga.init() to use a different camera (but be sure to not pass a "facing" parameter if you pass a deviceId)
As the interface to all camera devices is no different between the S9 and the S10 and any other device, that seems to highly indicate that the problem is either with the Samsung supplied software, or an intentional "you can't use torch from browser" or "you can't use torch with this specific camera id", neither of which make sense, but there's a lot of things that don't make sense to me out there. Therefore, I'm going to mark this as closed, unless or until you can provide some evidence of a deficiency in Quagga. If you find something, feel free to re-open.
I'd be happy to help where I can, but I think ultimately, you'll need to put together a development environment, and actually write some camera access code, to attempt to debug where the problem lay exactly.
from quagga2.
Related Issues (20)
- Any idea what permissions I need to grant on a Cordova (phone gap) app for the Quagga JS to work on iOS? HOT 2
- Scanning not working iPhone14 and Samsung Galaxy A, S Series HOT 11
- Camera window freezes on iPhone/iPad HOT 4
- How to start torch on ios? HOT 3
- Difficulties when scanning a flat barcode HOT 2
- "ReferenceError: Property 'Image' doesn't exist" using React Native HOT 2
- Cannot find name 'Buffer' on Quagga2 type-definitions HOT 4
- how to decode from image from remote url? HOT 3
- Request for new npm release HOT 4
- invent a way to flag which tests are definitely working and therefore should cause actual failures in testing instead of being marked 'skipped'
- investigate usage of ImageCapture API versus current frame grabber for browser
- play() function HOT 3
- CAMERA NOT DICONNECTING AFTER QUAGGA.STOP() CALLED HOT 5
- Camera Takes Multiple Seconds to Scan Code HOT 3
- Quagga.stop not working HOT 8
- consider adding a function to query if a device supports torch?
- Not able to detect the barcode attached HOT 11
- Responsiveness HOT 5
- Zoom constraints not applied in Quagga.init HOT 3
- camera is always showing front view and not back view even though i set facing mode to environment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quagga2.