Details
-
Task
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
None
-
-
681b93eb8 (dev), 5da455d8f (6.7), 6e39b49dc (6.6), 944eefab5 (tqtc/lts-6.5)
Description
Currect code finds cameras like this:
AVCaptureDevice *defaultDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; NSArray *videoDevices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
But that will find and return only "single-lens" camera types. One on each side. General-purpose AVCaptureDeviceTypeBuiltInWideAngleCamera for the front side, for example.
This type unfortunately doesn't switch between different lenses. AVCaptureDeviceTypeBuiltInTripleCamera (or dual) must be used to achive this. These types can be discovered differently, as stated in the note:
Note
You can only discover this device type using an AVCaptureDeviceDiscoverySession or the AVCaptureDevice defaultDeviceWithDeviceType:mediaType:position: method.
Proposal of this issue is to switch to the new discovery method and set default camera to one the multi-lens logical cameras that can automatically switch between lenses.