Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using spécific User-Agent with MagicalExoPlayer ? #9

Open
eLTux opened this issue Sep 4, 2019 · 5 comments
Open

Using spécific User-Agent with MagicalExoPlayer ? #9

eLTux opened this issue Sep 4, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@eLTux
Copy link

eLTux commented Sep 4, 2019

Hi, we can use a spécific User-Agent with MagicalExoPlayer ?
I tried this :

  HashMap<String , String> extraHeaders = new HashMap<>();
  extraHeaders.put("User-Agent","My User Agent");
  andExoPlayerView.setSource("STREAM_URL", extraHeaders);

But i have still the original ExoPlayer User-Agent, how to do it ?
thanks

@HamidrezaAmz
Copy link
Owner

Hi
Yes you can add specific user-agent over HLS stream only.

@sarada
Copy link

sarada commented Sep 20, 2019

Hi Hamid,
Could you please post some sample code, how to add custom user agent header, as the above posted step by ELtux did not work.
Thanks.

@eLTux
Copy link
Author

eLTux commented Sep 20, 2019

Yeah... i tried with HLS stream and it's not work.

@HamidrezaAmz HamidrezaAmz added the bug Something isn't working label Sep 21, 2019
@HamidrezaAmz HamidrezaAmz self-assigned this Sep 21, 2019
@HamidrezaAmz
Copy link
Owner

HamidrezaAmz commented Sep 21, 2019

Hi @sarada
As @eLTux say you should just pass your extra headers in setSource method, headers will add over your stream but according to google/ExoPlayer#2280 there is a bug over ExoPlayer Library.
I will update my ExoPlayer core if they release a new version. ;)

@ihasanazimi
Copy link

Hi Yes you can add specific user-agent over HLS stream only.

Salam hamidReza jan
azizm man daqiqan eyn document ro piyade kardam ama moshkel injast k heaser vasash set nemishe!!!
mishe ye dasti az ma beghiri?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants