音频预缓存

pull/1817/head
ag2s20150909 3 years ago
parent 00e8cce519
commit 5a441915fc
  1. 2
      app/src/main/java/io/legado/app/service/AudioPlayService.kt

@ -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)

Loading…
Cancel
Save