@ -153,10 +153,6 @@ dependencies {
def exoplayer_version = '2.15.0'
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
implementation "com.google.android.exoplayer:extension-okhttp:$exoplayer_version"
// implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayer_version"
// implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayer_version"
// implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version"
// implementation "com.google.android.exoplayer:exoplayer-rtsp:$exoplayer_version"
//Splitties
def splitties_version = '2.1.1'
@ -25,8 +25,8 @@ object AudioPlay {
var bookSource: BookSource? = null
val loadingChapters = arrayListOf<Int>()
fun headers(): Map<String, String>? {
return bookSource?.getHeaderMap()
fun headers(hasLoginHeader: Boolean): Map<String, String>? {
return bookSource?.getHeaderMap(hasLoginHeader)
}
/**
@ -125,10 +125,9 @@ class AudioPlayService : BaseService(),
AudioPlay.status = Status.STOP
postEvent(EventBus.AUDIO_STATE, Status.STOP)
upPlayProgressJob?.cancel()
val analyzeUrl =
AnalyzeUrl(
val analyzeUrl = AnalyzeUrl(
url,
headerMapF = AudioPlay.headers(),
headerMapF = AudioPlay.headers(true),
source = AudioPlay.bookSource
)
val uri = Uri.parse(analyzeUrl.getDirectUrl())