-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[video_player] Update for UIScene compatibility #10676
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
[video_player] Update for UIScene compatibility #10676
Conversation
Replaces the code that used the key window's root view controller with a call to the new registrar `viewController` method to get the actual Flutter content's view controller. Since code behind the view provider abstraction is by definition not unit testable (since that's the interface used to DI a replacement in tests), this changes the API surface so that it's a direct passthrough to the registrar method. This does add some additional ifdefing, but minor compile-time complexity is better than having additional logic behind the test injection abstraction. Fixes flutter/flutter#174416
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 Review
This pull request updates the video_player_avfoundation plugin for UIScene compatibility by replacing the deprecated keyWindow API with registrar.viewController. The changes are correctly implemented in the native code and the tests are updated accordingly, improving compatibility with modern iOS practices. I have one suggestion to align an initializer in the test code with Objective-C best practices.
packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m
Show resolved
Hide resolved
|
autosubmit label was removed for flutter/packages/10676, because - The status or check suite Mac_arm64 ios_platform_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label. |
flutter/packages@98b0325...ce3afa4 2026-01-15 [email protected] Manual roll Flutter from 793b0b8 to b45a73b (8 revisions) (flutter/packages#10799) 2026-01-15 [email protected] [path_provider] Re-release FFI foundation version (flutter/packages#10722) 2026-01-15 [email protected] [google_sign_in] Convert iOS tests to Swift (flutter/packages#10787) 2026-01-14 [email protected] [video_player] Update for UIScene compatibility (flutter/packages#10676) 2026-01-14 [email protected] [pointer_interceptor_ios] Migrate XCTest to Swift Testing (flutter/packages#10762) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#181035) flutter/packages@98b0325...ce3afa4 2026-01-15 [email protected] Manual roll Flutter from 793b0b8 to b45a73b (8 revisions) (flutter/packages#10799) 2026-01-15 [email protected] [path_provider] Re-release FFI foundation version (flutter/packages#10722) 2026-01-15 [email protected] [google_sign_in] Convert iOS tests to Swift (flutter/packages#10787) 2026-01-14 [email protected] [video_player] Update for UIScene compatibility (flutter/packages#10676) 2026-01-14 [email protected] [pointer_interceptor_ios] Migrate XCTest to Swift Testing (flutter/packages#10762) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Replaces the code that used the key window's root view controller with a call to the new registrar
viewControllermethod to get the actual Flutter content's view controller.Since code behind the view provider abstraction is by definition not unit testable (since that's the interface used to DI a replacement in tests), this changes the API surface so that it's a direct passthrough to the registrar method. This does add some additional ifdefing, but minor compile-time complexity is better than having additional logic behind the test injection abstraction.
Fixes flutter/flutter#174416
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3