-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modern phones often have multipe front/rear cameras. Sometimes special purpose cameras like the wide-angle camera are picked by default. Those are not optimal for scanning QR codes but standard media constraints don't allow us to specify which camera we want exactly. However, we can obtain a list of all video input devices with navigator.mediaDevices.enumerateDevices() Picking the first entry as the default front camera and the last entry as the default rear camera seems to be a valid heuristic. Issue: #179
- Loading branch information
Showing
3 changed files
with
63 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters