-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[video_player_avfoundation] Fix regression where http headers were ignored #10991
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
base: main
Are you sure you want to change the base?
Conversation
|
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. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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 successfully addresses a regression in video_player_avfoundation where HTTP headers were being ignored. The core change correctly utilizes AVURLAsset URLAssetWithURL:options: to ensure that HTTP headers are properly passed, restoring the expected functionality. The CHANGELOG.md and pubspec.yaml files have been updated to reflect this important fix and version bump.
| - (NSObject<FVPAVAsset> *)URLAssetWithURL:(NSURL *)URL | ||
| options:(nullable NSDictionary<NSString *, id> *)options { | ||
| return [[FVPDefaultAVAsset alloc] initWithAsset:[AVAsset assetWithURL:URL]]; | ||
| return [[FVPDefaultAVAsset alloc] initWithAsset:[AVURLAsset URLAssetWithURL:URL options:options]]; |
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.
This change correctly resolves the regression by using AVURLAsset URLAssetWithURL:options: instead of AVAsset assetWithURL:. This ensures that HTTP headers are properly passed to the asset, which is a critical fix for the player's functionality when dealing with authenticated or custom header-dependent streams.
|
test-exempt: currently infeasible to test Unfortunately we don't have a good way to test this:
This is very low risk for regression, since this code is never intended to change; it should be an absolutely minimal wrapper of the underlying API, and the initial regression was only because it was wrong in the initial PR (due to a mistake in incremental work while I was creating the PR). Given that, and that we don't currently have a mechanism for testing it, I'm exempting it. |
|
This will just need a CLA to proceed. |
LouiseHsu
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.
LGTM once CLA is signed.
427b1d3 to
56694b6
Compare
|
FYI, even once you sign the CLA you will probably need to fix some local git configuration, rewrite the commit, and force-push. Currently the CLA check is showing a |
56694b6 to
e29ca8e
Compare
Fixed a regression in
2.9.1wherehttpHeaderswere ignored on iOS.Fixes flutter/flutter#182015
The Fix:
Updated
FVPAVFactory.mto use[AVURLAsset URLAssetWithURL:options:]instead of[AVAsset assetWithURL:]. The previous implementation dropped theoptionsdictionary containing the headers.Verification:
Verified manually with Wireshark.
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy].CHANGELOG.mdto add a description of the change.///).