exoplayer 播放器错误无法连接到 hls link
exoplayer player error unable to connect to hls link
我有一个 hls link 使用 mpv 播放效果很好,但在 exoplayer 中我得到这个错误:
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
有什么想法可能是什么问题吗?我现在该怎么办?
我进一步挖掘并发现 link 给出了 307,临时重定向响应将 https
重定向到 http
。我手动编辑了link,现在问题已经解决了。
可能会解决这个问题
/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">
我遇到了类似的问题,我花了大约 2 个小时解决它,然后我意识到这是我的设备上的问题,日期和时间已更改,所以请从您的终端验证一次。
当您更改正在检查的设备中的日期时,exoplyer 或您的 URL 似乎无法工作。
我有一个 hls link 使用 mpv 播放效果很好,但在 exoplayer 中我得到这个错误:
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
有什么想法可能是什么问题吗?我现在该怎么办?
我进一步挖掘并发现 link 给出了 307,临时重定向响应将 https
重定向到 http
。我手动编辑了link,现在问题已经解决了。
可能会解决这个问题
/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">
我遇到了类似的问题,我花了大约 2 个小时解决它,然后我意识到这是我的设备上的问题,日期和时间已更改,所以请从您的终端验证一次。
当您更改正在检查的设备中的日期时,exoplyer 或您的 URL 似乎无法工作。