mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
音频预缓存
This commit is contained in:
@@ -140,6 +140,8 @@ class AudioPlayService : BaseService(),
|
||||
)
|
||||
val uri = Uri.parse(analyzeUrl.url)
|
||||
ExoPlayerHelper.preDownload(uri, analyzeUrl.headerMap)
|
||||
//休息1秒钟,防止403
|
||||
Thread.sleep(1000)
|
||||
val mediaSource = ExoPlayerHelper
|
||||
.createMediaSource(uri, analyzeUrl.headerMap)
|
||||
exoPlayer.setMediaSource(mediaSource)
|
||||
|
||||
Reference in New Issue
Block a user