mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
de09f54366
commit
faee44c605
@ -160,9 +160,9 @@ class AudioPlayService : BaseService(),
|
|||||||
headerMapF = AudioPlay.headers(true),
|
headerMapF = AudioPlay.headers(true),
|
||||||
)
|
)
|
||||||
val uri = Uri.parse(analyzeUrl.url)
|
val uri = Uri.parse(analyzeUrl.url)
|
||||||
ExoPlayerHelper.preDownload(uri, analyzeUrl.headerMap)
|
//ExoPlayerHelper.preDownload(uri, analyzeUrl.headerMap)
|
||||||
//休息1秒钟,防止403
|
//休息1秒钟,防止403
|
||||||
delay(1000)
|
//delay(1000)
|
||||||
val mediaSource = ExoPlayerHelper
|
val mediaSource = ExoPlayerHelper
|
||||||
.createMediaSource(uri, analyzeUrl.headerMap)
|
.createMediaSource(uri, analyzeUrl.headerMap)
|
||||||
exoPlayer.setMediaSource(mediaSource)
|
exoPlayer.setMediaSource(mediaSource)
|
||||||
@ -286,6 +286,7 @@ class AudioPlayService : BaseService(),
|
|||||||
AudioPlay.next(this)
|
AudioPlay.next(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
upNotification()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user