Salar Bahador
Salar Bahador

Reputation: 1494

Flutter - Send headers with video player

I'm trying to use Flutter video_player plugin. But the API that the app uses requires a header for authorization.

After I looked up to the plugin's source, I found nothing about supporting the header in Flutter video player. Is there another way?

If not, how can I use an Android native plugin in flutter?

As far as I know Android itself supports this feature. Because I can't wait for the Flutter team to support this feature. My deadline is about to end.

Any help would be appreciated

Upvotes: 3

Views: 2707

Answers (3)

M Younes
M Younes

Reputation: 1

Theres two packages you can use the official video_player now supports custom headers starting from version 2.6.0 Refrence

and also theres another great package that has even more features including the custom headers better_player

Upvotes: 0

Christian X
Christian X

Reputation: 2187

For anyone Who is currently looking for a viable http flutter video plugin a new and really good package has been created which supports http headers for video as well as many other Features. The name of the package is: https://pub.dev/packages/better_player/changelog . Hope you'll like it.

Upvotes: 1

杨晨曦
杨晨曦

Reputation: 1

I put my token behind the video URL You can try this authentication method

'$url?token=Bearer $token'

Upvotes: 0

Related Questions