Skip to content

fix: silence Continuity Camera deprecation warning on macOS#668

Open
mikeyg42 wants to merge 1 commit intopion:mainfrom
mikeyg42:fix/continuity-camera-deprecation
Open

fix: silence Continuity Camera deprecation warning on macOS#668
mikeyg42 wants to merge 1 commit intopion:mainfrom
mikeyg42:fix/continuity-camera-deprecation

Conversation

@mikeyg42
Copy link
Copy Markdown

Description

  • Updates AVFoundation bindings to use AVCaptureDeviceTypeContinuityCamera on macOS 14+
  • Silences deprecation warning that appears during camera device enumeration
  • Maintains backward compatibility with older macOS versions

Changes

  • Replace AVCaptureDeviceTypeExternal with AVCaptureDeviceTypeContinuityCamera in macOS 14.0+ code path
  • No API surface changes
  • Change limited to Darwin Objective-C bindings (pkg/avfoundation/AVFoundationBind/AVFoundationBind.m)

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
Copy link
Copy Markdown

codecov bot commented Nov 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.58%. Comparing base (98fa96e) to head (e9b5769).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@at-wat
Copy link
Copy Markdown
Member

at-wat commented Nov 25, 2025

Thank you for the fix!

I'm not very sure which version of MacOS should be supported by mediadevices. Any thoughts?
(I don't have any mac machines and not familiar with)

@philipch07
Copy link
Copy Markdown
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants