-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
macOS: Allow users to select Continuity Camera #104857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS: Allow users to select Continuity Camera #104857
Conversation
Calinou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, but I don't have an iOS device to test this.
bruvzg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, but I do not have anything to test it with.
Since you are changing this code, it probably worth replacing __MAC_OS_X_VERSION_MIN_REQUIRED (which only suppresses warnings) with runtime checks:
NSArray<AVCaptureDevice *> *devices = nullptr;
#if defined(__x86_64__)
if (@available(macOS 10.15, *)) {
#endif
AVCaptureDeviceDiscoverySession *session;
if (@available(macOS 14.0, *)) {
session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternal, AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeContinuityCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
} else {
session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternalUnknown, AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
}
devices = session.devices;
#if defined(__x86_64__)
} else {
devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
}
#endifAdded Continuity Camera to the device discovery session to provide users with more camera options. Users on macOS 13+ can now select their Continuity Camera device within the application.
8ccebbe to
e37d785
Compare
|
I´m also interested in this feature. |
|
Thanks! Congratulations on your first merged contribution! 🎉 |
fixed godotengine/godot-proposals#12125
Added Continuity Camera to the device discovery session to provide users with more camera options. Users on macOS 13+ can now select their Continuity Camera device within the application.
https://support.apple.com/en-us/102546