Implement html5-qrcode Torch/Flashlight feature in frappe.ui.Scanner
#20.984 aperta il 14 mag 2023
Metriche repository
- Star
- (5938 stelle)
- Metriche merge PR
- (Merge medio 3g 3h) (582 PR mergiate in 30 g)
Descrizione
Is your feature request related to a problem? Please describe. Many users on manufacturing shopfloors perform their work throughout the whole plant, including areas with lower levels of lighting (think cold rooms, storage areas etc). Their work includes scanning product barcodes using the Barcode Scanner on Data fields with Options set to Barcode. When there is not enough light for the device's camera, the barcode scanner doesn't work.
Describe the solution you'd like
To add a "Torch" button on the frappe.ui.Scanner prompt, that controls the Torch/Flashlight if supported.
html5-qrcode, the library that is used by frappe.ui.Scanner, has a feature of turning on the device's Torch/Flashlight (if it is supported) - see mebjas/html5-qrcode/issues/129.
Describe alternatives you've considered
- Attempted to turn on the device's Torch/Flashlight while the
frappe.ui.Scannerprompt is open, but the Torch/Flashlight can not be controlled from the device's setting shortcuts/status bar if an app is using the camera (iOS and Android)
Additional context
An example: