WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
221752
enumerateDevices does only returns one videoinput device for multi-lense devices
https://bugs.webkit.org/show_bug.cgi?id=221752
Summary
enumerateDevices does only returns one videoinput device for multi-lense devices
Matthias Rauch
Reported
2021-02-11 06:47:57 PST
We developed a website where are able to scan barcodes via WebRTC. Since barcode scanning does not work well with wide-angle cameras, we also added a small feature where the user can select the camera to use for scanning. To achieve this we list all cameras returned from navigator.mediaDevices.enumerateDevices() for the user to choose from. The chosen deviceId is then passed in the constraints to navigator.mediaDevices.getUserMedia(). This works well on Android devices, because navigator.mediaDevices.enumerateDevices() returns multiple videoinput devices for the back facing cameras where one of them is always the telelens (=non wide-angle) camera. In contrast navigator.mediaDevices.enumerateDevices() on iOS 14 only ever returns two videoinput devices (front camera, back camera). That is also the case for devices like iPhone 11 or iPhone 7 Plus where multiple back-facing lenses are available. This is especially a problem with iPhone 7 Plus where the wide-angle camera is selected as the default back camera and cannot be changed by the user.
Attachments
Add attachment
proposed patch, testcase, etc.
Matthias Rauch
Comment 1
2021-02-12 00:13:06 PST
Are there any plans to return multiple devices for the different lenses as Chrome on Android does? Is there any way to force the use of telelens camera on iPhone 7 Plus as back camera?
Radar WebKit Bug Importer
Comment 2
2021-02-18 06:48:15 PST
<
rdar://problem/74476182
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug