packages icon indicating copy to clipboard operation
packages copied to clipboard

[video_player_avfoundation] Fix deprecated tracksWithMediaType usage

Open raju-muliyashiya opened this issue 1 month ago • 1 comments

fixes Issue #173092

Pre-Review Checklist

  • [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • [x] I read the [Tree Hygiene] page, which explains my responsibilities.
  • [x] I read and followed the [relevant style guides] and ran [the auto-formatter].
  • [x] I signed the [CLA].
  • [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • [x] I [linked to at least one issue that this PR fixes] in the description above.
  • [x] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under[^1].
  • [x] I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under[^1].
  • [x] I updated/added any relevant documentation (doc comments with ///).

Description

  • Fixes the deprecated tracksWithMediaType: API usage that causes compilation warnings on iOS 18/macOS 15.

Changes

  • Migrated to loadTracksWithMediaType:completionHandler: for iOS 15.0+/macOS 12.0+
  • Added backward compatibility for iOS 13.0-14.x and macOS 10.15-11.x using pragma directives

raju-muliyashiya avatar Dec 03 '25 09:12 raju-muliyashiya

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

flutter-dashboard[bot] avatar Dec 03 '25 09:12 flutter-dashboard[bot]