|
|
@ -128,6 +128,7 @@ class AudioPlayService : BaseService(), |
|
|
|
pause = false |
|
|
|
pause = false |
|
|
|
mediaPlayer.start() |
|
|
|
mediaPlayer.start() |
|
|
|
mediaPlayer.seekTo(position) |
|
|
|
mediaPlayer.seekTo(position) |
|
|
|
|
|
|
|
handler.removeCallbacks(mpRunnable) |
|
|
|
handler.postDelayed(mpRunnable, 1000) |
|
|
|
handler.postDelayed(mpRunnable, 1000) |
|
|
|
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING) |
|
|
|
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING) |
|
|
|
postEvent(Bus.AUDIO_STATE, Status.PLAY) |
|
|
|
postEvent(Bus.AUDIO_STATE, Status.PLAY) |
|
|
@ -147,6 +148,7 @@ class AudioPlayService : BaseService(), |
|
|
|
mp?.start() |
|
|
|
mp?.start() |
|
|
|
mp?.seekTo(position) |
|
|
|
mp?.seekTo(position) |
|
|
|
postEvent(Bus.AUDIO_SIZE, mp?.duration) |
|
|
|
postEvent(Bus.AUDIO_SIZE, mp?.duration) |
|
|
|
|
|
|
|
handler.removeCallbacks(mpRunnable) |
|
|
|
handler.post(mpRunnable) |
|
|
|
handler.post(mpRunnable) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|