pull/46/head
kunfei 5 years ago
parent 8d7e8e45bc
commit ecc20d0be1
  1. 1
      app/src/main/java/io/legado/app/constant/Bus.kt
  2. 2
      app/src/main/java/io/legado/app/service/AudioPlayService.kt

@ -14,7 +14,6 @@ object Bus {
const val OPEN_CHAPTER = "openChapter" const val OPEN_CHAPTER = "openChapter"
const val REPLACE = "replace" const val REPLACE = "replace"
const val AUDIO_NEXT = "audioNext" const val AUDIO_NEXT = "audioNext"
const val AUDIO_CUR_POS = "audioCurPos"
const val AUDIO_STATE = "audioState" const val AUDIO_STATE = "audioState"
const val AUDIO_PROGRESS = "audioProgress" const val AUDIO_PROGRESS = "audioProgress"
} }

@ -67,7 +67,7 @@ class AudioPlayService : BaseService(),
launch(IO) { launch(IO) {
while (isActive) { while (isActive) {
delay(1000) delay(1000)
postEvent(Bus.AUDIO_CUR_POS, mediaPlayer.currentPosition) postEvent(Bus.AUDIO_PROGRESS, mediaPlayer.currentPosition)
} }
} }
} }

Loading…
Cancel
Save