Hi,
I am developing a web application which is a QR Code scanner web application. For QR Code scanning I am using the below library:
In this library MediaDevices class and getUserMedia() function to get the mobile camera access. I have implemented camera auto focus and zoom while getting the camera control in the web app.
The code is as follows:
navigator.mediaDevices.getUserMedia({
audio: !1,
video: {
deviceId: {
exact: b
},
focusMode:"continuous", // Enable continuous autofocus
zoom: 1.5
}
}).then(function (b) {
o(b).then(function () {
g._isScanning = !0, a()
})["catch"](c)
})["catch"](function (a) {
c("Error getting userMedia, error = ".concat(a))
})
But for latest Samsung devices with Android 10 and above the auto focus and zoom are not working on these devices cameras.
The devices we tested on are Samsung S22, A54 and A52. For the auto focus and zoom to work on these devices which library should I use? Or what am I doing wrong?
Thanks in advance.
Sheetal