HamidrezaAmz / MagicalExoPlayer

The Easiest Way To Play/Stream Video And Audio Using Google ExoPlayer In Your Android Application
MIT License
345 stars 77 forks source link

headers not working in latest release #75

Closed razarasool closed 2 years ago

razarasool commented 2 years ago

Hello, Headers are not working in the latest release of 3.02 (playerView.setSource(videoUrl, headers)). When I tried to pass the Referrer as extraheaders it is not passing, and the server is responding as header not received in the request.

While reviewing the code I found you are using setDrmLicenseRequestHeaders to set the headers in AndExoPlayerView class, this method is now deprecated and setLicenseRequestHeaders method should be used instead as per ExoPlayer documentation. Kindly see this. Thanks, this simplified player is excellent.

HamidrezaAmz commented 2 years ago

Hi @razarasool I have merged the pull request, thanks for your advice ;)