|
|
@ -161,6 +161,7 @@ class AudioPlayService : BaseService(), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun resume() { |
|
|
|
private fun resume() { |
|
|
|
|
|
|
|
try { |
|
|
|
pause = false |
|
|
|
pause = false |
|
|
|
if (!mediaPlayer.isPlaying) { |
|
|
|
if (!mediaPlayer.isPlaying) { |
|
|
|
mediaPlayer.start() |
|
|
|
mediaPlayer.start() |
|
|
@ -172,6 +173,10 @@ class AudioPlayService : BaseService(), |
|
|
|
AudioPlay.status = Status.PLAY |
|
|
|
AudioPlay.status = Status.PLAY |
|
|
|
postEvent(EventBus.AUDIO_STATE, Status.PLAY) |
|
|
|
postEvent(EventBus.AUDIO_STATE, Status.PLAY) |
|
|
|
upNotification() |
|
|
|
upNotification() |
|
|
|
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
|
|
|
e.printStackTrace() |
|
|
|
|
|
|
|
stopSelf() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun adjustProgress(position: Int) { |
|
|
|
private fun adjustProgress(position: Int) { |
|
|
|