yukashima huksay
yukashima huksay

Reputation: 6238

exoplayer player error unable to connect to hls link

I have an hls link that plays just fine using mpv, but in exoplayer I get this error:

PlayerError com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: Unable to connect to https://hamdeli.arvanvod.com/MLWvVo7NPe/BNlxo57Wzj/h_,144_200,240_400,360_800,480_1500,720_1579,k.mp4.list/master.m3u8

Any thoughts what the problem could be? what should I do now?

Upvotes: 5

Views: 11870

Answers (3)

Maulik Togadiya
Maulik Togadiya

Reputation: 591

I faced a similar problem and my spent like 2 hours on it and then i realize it was an issue on my device with the date and time changed so please verify it from your end once.

seem like exoplyer or your URL won't work when you changed the date in the device you are checking.

Upvotes: 1

Prashant
Prashant

Reputation: 392

Probably it will solve this problem

/res/xml/config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">example.com</domain>
    </domain-config>
</network-security-config>

Manifest.xml

<application
...
    android:networkSecurityConfig="@xml/network_config">

Upvotes: 0

yukashima huksay
yukashima huksay

Reputation: 6238

I dug further and figured that the link gives a 307, temporary redirect response redirecting https to http. I manualy edited the link and the problem is solved now.

Upvotes: 1

Related Questions