kuttz / PIP-WebRTC-Sample

Sample code for how to use Picture-in-Picture create in a WebRTC based video conferencing interface. This is not a production ready code!.
1 stars 0 forks source link

isMultitaskingCameraAccessSupported allways returns false #1

Open liuyang2211 opened 10 months ago

liuyang2211 commented 10 months ago

// TODO: - Not working // isMultitaskingCameraAccessSupported allways returns false if #available(iOS 16.0, *) { capturer.captureSession.beginConfiguration() if capturer.captureSession.isMultitaskingCameraAccessSupported { capturer.captureSession.isMultitaskingCameraAccessEnabled = true } capturer.captureSession.commitConfiguration() } My test same with you, when i start PiP and enterbackground, my local captureSession stop work , and NSNotification.Name.AVCaptureSessionWasInterrupted return videoDeviceNotAvailableWithMultipleForegroundApps . how can i see my local session when start PiP and enterbackground

kuttz commented 10 months ago

I'm having the same issue. I already quoted that in the README. Unfortunately I could't find a solution yet. Please update if you found any solutions.

liuyang2211 commented 10 months ago

I think, maybe we need "multitasking camera access entitlement request" in apple developer https://stackoverflow.com/questions/71419635/how-to-add-picture-in-picture-pip-for-webrtc-video-calls-in-ios-swift https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_avfoundation_multitasking-camera-access?language=objc

But in the company I work for I don't have this permission configuration

WechatIMG164

kuttz commented 10 months ago

Yes, Only account holder can request a Multitasking Camera Access. I just submitted a request and I will update the status here accordingly.