mirror of
https://github.com/gedoor/legado.git
synced 2024-09-03 09:55:00 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
345fe81caf
@ -350,13 +350,7 @@ class AudioPlayService : BaseService(),
|
|||||||
postEvent(EventBus.AUDIO_BUFFER_PROGRESS, exoPlayer.bufferedPosition.toInt())
|
postEvent(EventBus.AUDIO_BUFFER_PROGRESS, exoPlayer.bufferedPosition.toInt())
|
||||||
it.durChapterPos = exoPlayer.currentPosition.toInt()
|
it.durChapterPos = exoPlayer.currentPosition.toInt()
|
||||||
postEvent(EventBus.AUDIO_PROGRESS, it.durChapterPos)
|
postEvent(EventBus.AUDIO_PROGRESS, it.durChapterPos)
|
||||||
mediaSessionCompat?.setPlaybackState(
|
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING)
|
||||||
PlaybackStateCompat.Builder()
|
|
||||||
.setActions(PlaybackStateCompat.ACTION_SEEK_TO)
|
|
||||||
.setState(PlaybackStateCompat.STATE_NONE, exoPlayer.currentPosition, 1f)
|
|
||||||
.setBufferedPosition(exoPlayer.bufferedPosition)
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
saveProgress(it)
|
saveProgress(it)
|
||||||
}
|
}
|
||||||
delay(1000)
|
delay(1000)
|
||||||
@ -435,7 +429,8 @@ class AudioPlayService : BaseService(),
|
|||||||
mediaSessionCompat?.setPlaybackState(
|
mediaSessionCompat?.setPlaybackState(
|
||||||
PlaybackStateCompat.Builder()
|
PlaybackStateCompat.Builder()
|
||||||
.setActions(MediaHelp.MEDIA_SESSION_ACTIONS)
|
.setActions(MediaHelp.MEDIA_SESSION_ACTIONS)
|
||||||
.setState(state, position.toLong(), 1f)
|
.setState(state, exoPlayer.currentPosition, 1f)
|
||||||
|
.setBufferedPosition(exoPlayer.bufferedPosition)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user