@ -74,7 +74,7 @@ class AudioPlayService : BaseService(),
Action.play -> {
title = intent.getStringExtra("title") ?: ""
subtitle = intent.getStringExtra("subtitle") ?: ""
position = intent.getIntExtra("pageIndex", 0)
position = intent.getIntExtra("position", 0)
play(intent.getStringExtra("url"))
}
Action.pause -> pause(true)
@ -13,7 +13,7 @@ object AudioPlay {
intent.putExtra("title", title)
intent.putExtra("subtitle", subtitle)
intent.putExtra("url", url)
intent.putExtra("dataKey", position)
intent.putExtra("position", position)
context.startService(intent)
@ -19,7 +19,7 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application)
var coverData = MutableLiveData<String>()
var book: Book? = null
var inBookshelf = false
var chapterSize = 0
private var chapterSize = 0
var callBack: CallBack? = null
var durChapterIndex = 0
var durPageIndex = 0