media-kit / media-kit

A cross-platform video player & audio player for Flutter & Dart.
https://github.com/media-kit/media-kit
MIT License
893 stars 126 forks source link

[Feature] Specify custom user-agent #781

Closed tomekit closed 3 weeks ago

tomekit commented 3 weeks ago

I was wondering if there is anyway to specify custom: user-agent header?

At the moment player (at least on Linux) sets it to default: libmpv.

abdelaziz-mahdy commented 3 weeks ago

Set it using the headers it should be set correctly

alexmercerind commented 3 weeks ago

The Media constructor allows to specify httpHeaders.

tomekit commented 3 weeks ago

Thank you. Media(url, httpHeaders: headers) works flawlessly.