Skip to content

fix(mobile): video auth#26865

Draft
uhthomas wants to merge 1 commit intomainfrom
uhthomas/fix-mobile-video-auth
Draft

fix(mobile): video auth#26865
uhthomas wants to merge 1 commit intomainfrom
uhthomas/fix-mobile-video-auth

Conversation

@uhthomas
Copy link
Collaborator

Description

It looks like recent changes to auth did not include videos, and so no auth was being sent when loading them.

It looks like recent changes to auth did not include videos, and so no
auth was being sent when loading them.
Comment on lines +70 to +72
if #available(iOS 15, *) {
VideoProxyServer.shared.session = session
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentionally only set when getting an mTLS or basic auth challenge because it's less efficient than the default AVPlayer handling.

companion object {
fun registerPlugins(ctx: Context, flutterEngine: FlutterEngine) {
HttpClientManager.initialize(ctx)
NativeVideoPlayerPlugin.dataSourceFactory = { OkHttpDataSource.Factory(HttpClientManager.getClient()) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting this is good, but we should confirm that it doesn't cache the video because that will trash the disk cache of the shared session.

@alextran1502
Copy link
Member

I was having problem with auth playing video on iOS and this PR also seems to fix it FYI

@mertalev
Copy link
Member

It will, but #26887 is the better solution

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants