Skip to content

Device list not guaranteed to place front camera at index 0#1

Open
karlmorris wants to merge 1 commit intoaddlive:masterfrom
karlmorris:master
Open

Device list not guaranteed to place front camera at index 0#1
karlmorris wants to merge 1 commit intoaddlive:masterfrom
karlmorris:master

Conversation

@karlmorris
Copy link

The default value 0 is not guaranteed to be the front facing camera on devices that contain 2 cameras (tested on Nexus 4 and Nexus 7 2013; both running Android 4.4.2). This code checks for the front camera label at index 1, and defaults to index 0 if it fails. This is safe for devices with 1 or 2 cameras.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant