fix: silence Continuity Camera deprecation warning on macOS#668
Open
fix: silence Continuity Camera deprecation warning on macOS#668
Conversation
On macOS 14+, mediadevices logs a deprecation warning because the Objective-C bindings still use AVCaptureDeviceTypeExternal for Continuity Cameras. This PR updates the camera discovery code to prefer AVCaptureDeviceTypeContinuityCamera when available, falling back to AVCaptureDeviceTypeExternal on older macOS versions. - Removes the deprecation warning on modern macOS - Keeps behavior and API unchanged - Change is limited to the Darwin Objective-C bindings
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #668 +/- ##
=======================================
Coverage 43.58% 43.58%
=======================================
Files 85 85
Lines 4880 4880
=======================================
Hits 2127 2127
Misses 2598 2598
Partials 155 155 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Thank you for the fix! I'm not very sure which version of MacOS should be supported by mediadevices. Any thoughts? |
Contributor
|
Hi, I have a mac machine (macOS 26.1) but I couldn't find where the deprecation warning was from. Would you mind showing where you found it? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AVCaptureDeviceTypeContinuityCameraon macOS 14+Changes
AVCaptureDeviceTypeExternalwithAVCaptureDeviceTypeContinuityCamerain macOS 14.0+ code pathpkg/avfoundation/AVFoundationBind/AVFoundationBind.m)