Bug 248054

Summary: [Cocoa] Use AVCaptureDeviceDiscoverySession for camera discovery
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: WebRTCAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, moritz.zimmermann, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=250142
Bug Depends on: 248245    
Bug Blocks:    

Description Eric Carlson 2022-11-17 14:17:46 PST
Use AVCaptureDeviceDiscoverySession for camera discovery instead of AVCaptureDevice
Comment 1 Eric Carlson 2022-11-17 14:56:10 PST
rdar://101919809
Comment 2 Eric Carlson 2022-11-17 15:01:17 PST
Pull request: https://github.com/WebKit/WebKit/pull/6604
Comment 3 EWS 2022-11-18 12:52:20 PST
Committed 256849@main (460662e8590c): <https://commits.webkit.org/256849@main>

Reviewed commits have been landed. Closing PR #6604 and removing active labels.
Comment 4 WebKit Commit Bot 2022-11-22 12:53:59 PST
Re-opened since this is blocked by bug 248245
Comment 5 Eric Carlson 2022-11-28 12:35:08 PST
Pull request: https://github.com/WebKit/WebKit/pull/6872
Comment 6 EWS 2022-11-28 16:50:11 PST
Committed 257094@main (358c50c87d32): <https://commits.webkit.org/257094@main>

Reviewed commits have been landed. Closing PR #6872 and removing active labels.
Comment 7 Eric Carlson 2022-11-28 16:54:41 PST
*** Bug 247737 has been marked as a duplicate of this bug. ***
Comment 8 Mo 2022-11-29 00:36:51 PST
Could you verify if this change will allow access to other back cameras than just the default (wide-angle) on multi-camera iOS devices?

For example these devices:
- builtInDualWideCamera: https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype/3377620-builtindualwidecamera
- https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype/3377622-builtinultrawidecamera
Comment 9 Eric Carlson 2022-11-30 17:58:38 PST
(In reply to Mo from comment #8)
> Could you verify if this change will allow access to other back cameras than
> just the default (wide-angle) on multi-camera iOS devices?
> 
> For example these devices:
> - builtInDualWideCamera:
> https://developer.apple.com/documentation/avfoundation/avcapturedevice/
> devicetype/3377620-builtindualwidecamera
> -
> https://developer.apple.com/documentation/avfoundation/avcapturedevice/
> devicetype/3377622-builtinultrawidecamera

This change exposes each of the physical cameras on a iOS device, which includes the ultra-wide angle camera on devices that have one.

It does not expose the built-in "dual wide" or "triple wide" virtual cameras that automatically switch between physical cameras when zoom factor, light level, and focus position allow.
Comment 10 Mo 2022-12-01 00:05:09 PST
Thank you very much, this is invaluable to us!

Would you know if support for iOS virtual cameras is planned for a future release?
Comment 11 Eric Carlson 2022-12-01 16:19:35 PST
(In reply to Mo from comment #10)
> Thank you very much, this is invaluable to us!
> 
> Would you know if support for iOS virtual cameras is planned for a future
> release?

Yes, we are planning to investigate adding support for the virtual cameras.
Comment 12 Eric Carlson 2023-01-09 09:31:26 PST
(In reply to Eric Carlson from comment #11)
> (In reply to Mo from comment #10)
> > Thank you very much, this is invaluable to us!
> > 
> > Would you know if support for iOS virtual cameras is planned for a future
> > release?
> 
> Yes, we are planning to investigate adding support for the virtual cameras.

https://bugs.webkit.org/show_bug.cgi?id=250142
Comment 13 Ahmad Saleem 2024-03-27 09:00:56 PDT
*** Bug 248106 has been marked as a duplicate of this bug. ***