Closed abhishek-gangwar closed 6 years ago
Can you share the URL?
No url is confidential to us, but I can assure you that it works perfectly fine on any other platform, even with android Media Player also.
Will you be able to send it to our email id , if not put it up here?
That's not possible for me. Really sorry.
Can't do much about it then. 403 HTTP response code means that the URL is forbidden to be accessed by the device. Is the FTV device connected to the same network as the laptop when you use safari browser.
Yes, FTV device is connected to the same network as safari. Also if I use Android Media Player on the Same fire tv device it works perfectly fine. Our hls is a standard url, which works across all devices. That's why 403 HTTP response looks strange to us. I have seen many other people reported the same issue with exo player. But couldn't find a solution anywhere
User agent? Does the server need authentication/whitelisting of the user agent?
Yes server requires authentication.
so most likely, connections from FTV is not authenticated / accepted by server. Find out why. That' all I can help right now.
If that is the case then why it is not happening with Android Media Player?
Most likely the User agent is making the difference. Find out the user agent used in Android Media Player and use the same in Exo. Exo supports configuring the user agent.
Yes, it is the user agent which is making the difference. Thanks for your help.
but can someone please comment on the warning in Android studio 3.0.1 as mentioned below 'HlsMediaSource(android.net.Uri, com.google.android.exoplayer2.upstream.DataSource.Factory, int, android.os.Handler, com.google.androidexoplayer2.source.MediaSourceEventListener)' is deprecated. This inspection reports where deprecated code is used in the specified inspection scope.
Source error. com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403
Getting the above error with the hls stream. The same stream url works on Safari without any issue. But with amazon fire tv the same hls url is giving the above error.
Also HlsMediaSource is giving the warning in Android studio 3.0.1 as mentioned below 'HlsMediaSource(android.net.Uri, com.google.android.exoplayer2.upstream.DataSource.Factory, int, android.os.Handler, com.google.androidexoplayer2.source.MediaSourceEventListener)' is deprecated. This inspection reports where deprecated code is used in the specified inspection scope.
Why is that so, and what are the other options?