Flutter - Send headers with video player

Viewed 1760

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

2 Answers

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.

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

'$url?token=Bearer $token'
Related