builtInTripleCamera is not automatic switching from one camera to another

Hey!

I'm working on a camera app and I've noticed that the .builtInTripleCamera doesn't behave anything like the native app. Tested on iPhone 15 Pro Max and iPhone 12 Pro Max.

The documentation states the following, but that seems quite different from what is happening in the app:

Automatic switching from one camera to another occurs when the zoom factor, light level, and focus position allow.

So, does it automatically switch like the native camera, or do I need to do something?

Custom Camera vs Native Camera

Custom Camera

Native Camera

The code was adapted from the Apple's project AVCamFilter.

Just download the AVCamFilter and update videoDeviceDiscoverySession:

private let videoDeviceDiscoverySession = AVCaptureDevice.DiscoverySession(
        deviceTypes: [.builtInTripleCamera],
        mediaType: .video,
        position: .unspecified
    )

Hi there. The auto switching from constituent device to constituent device is handled according to the AVCaptureDevice's primaryConstituentDeviceSwitchingBehavior and primaryConstituentDeviceRestrictedSwitchingBehaviorConditions. By default, Dual and Triple cameras should be set to "Auto", so when the scene demands a camera switch (such as when you are in a macro focus situation), the virtual camera should auto switch from wide to ultrawide lens. Is that not what you're seeing?

Hi, I encountered the same problem. I am using AVCapture Device.DiscoverySession retrieves .builtInDualWideCamera,. builtInTripleCamera, and. builtInDualCamera multi camera systems. It is hoped that the camera can switch between cameras based on scaling, lighting, and other factors. However, currently, besides scaling to achieve camera switching, there are other factors that developers can interfere with to achieve automatic camera switching. Is there any other solution to achieve this function?

builtInTripleCamera is not automatic switching from one camera to another
 
 
Q