From 40f4fc16e7e9d4a557a067ced4a323003cde2679 Mon Sep 17 00:00:00 2001 From: Niklas Gruhn Date: Tue, 19 Dec 2023 22:49:20 +0100 Subject: [PATCH] docs(README): troubleshoot `torch` See: #397 --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 692cbbd2..479d76a5 100644 --- a/README.md +++ b/README.md @@ -177,3 +177,19 @@ Unfortunately, it's not very convenient to bundle this file with the package. So by default we fetch it at runtime from a CDN. That's an issue for offline applications or applications that run in a network with strict CSP policy. For a workaround see: https://github.com/gruhn/vue-qrcode-reader/issues/354 + +### `torch` is not supported on my device, although it has a flashlight. + +Support for `torch` is inconsistent across devices, cameras and browsers and operating systems. +On some devices the rear camera supports `torch` but the front camera doesn't, +even if the front camera actually has a flashlight. + +Furthermore, `torch` is not supported on iOS at all (last checked iOS 17.1). + +Visit [this page](https://vue-qrcode-reader.netlify.app/select-camera-demo.html) with your device. +The list of links represents all cameras installed on the device. +If you click, the camera should be loaded. +Below the camera view the JSON object of "capabilities" is printed. +If it doesn't contain the key/value pair `"torch": true` then flashlight is not supported for that camera. + +This JSON object provided as payload of the [`camera-on` event](https://vue-qrcode-reader.netlify.app/api/QrcodeStream.html#camera-on).