-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[video_player] Add cookie support for network resources #2882
[video_player] Add cookie support for network resources #2882
Conversation
Realized I need to be using the pigeon tool (neat!) to update the courier types instead of by hand (oops!). Currently blocked on that since I need List, but can't get List to work flutter/flutter#61660 |
b3b65eb
to
5b2fce7
Compare
Expecting this to get merged anytime soon @jaysephjw ? |
@rohitsharma1113 I am hoping to! Updating this today. But have not gotten any review yet. From looking at previous PRs and feedback from the build system, it looks like I may need to separate PRs out so as to bump the platform_interface first. I'll do that now. |
@iskakaushik @cyanglaz can anyone take a look? |
@@ -19,6 +23,7 @@ | |||
## 0.10.12+3 | |||
|
|||
* Avoiding uses or overrides a deprecated API in `VideoPlayerPlugin` class. | |||
>>>>>>> master |
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.
Leftovers of a merge here
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.
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.
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.
@Salakar If that's best then yes, whatever makes the most sense to avoid confusion. As a start I updated this PR to have 0 diffs so its obvious the changes are happening elsewhere.
Any update on this ? |
ee694d3
to
34faaaf
Compare
I may wait for #3281, which updates the pigeon version, before landing this. I'll then push new diffs from the new pigeon version. |
Description
I Broke this change up in to 3 parts, #3136 #3137 and #3138. Review each step individually.
Add cookie support for video_player network resources.
Avoids the problem of relying on
"AVURLAssetHTTPHeaderFieldsKey"
(undocumented ios API) seen in #953 and #897 by only supporting cookies.Implementation
Dart:
Optionally include a List when calling VideoPlayerController.network
Pigeon these over to hosts via List, which each cookie as a "Set-Cookie" value strings.
iOS:
Parse the strings into NSHTTPCookies and attach them using
AVURLAssetHTTPCookiesKey
Android:
Parse the strings into HttpCookies so we can then break name=value pairs back out, and build a "Cookie" header for EXOPlayer
Web:
Set the cookies onto the document with the
document.cookie
setter, which supports full "Set-Cooke" value strings. Note: Haven't tested web yet. Are these still there after the player disposes? Can we cleanup?Related Issues
Testing done
Tested on iOS and Android with an HLS server that requires an auth cookie.
Breaking Change
Checklist
///
).TODO:
flutter analyze
) does not report any problems on my PR.