|
|
@ -134,6 +134,9 @@ class AudioPlayService : BaseService(), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun pause(pause: Boolean) { |
|
|
|
private fun pause(pause: Boolean) { |
|
|
|
|
|
|
|
if (url.contains(".m3u8", false)) { |
|
|
|
|
|
|
|
stopSelf() |
|
|
|
|
|
|
|
} else { |
|
|
|
AudioPlayService.pause = pause |
|
|
|
AudioPlayService.pause = pause |
|
|
|
handler.removeCallbacks(mpRunnable) |
|
|
|
handler.removeCallbacks(mpRunnable) |
|
|
|
position = mediaPlayer.currentPosition |
|
|
|
position = mediaPlayer.currentPosition |
|
|
@ -143,6 +146,7 @@ class AudioPlayService : BaseService(), |
|
|
|
postEvent(Bus.AUDIO_STATE, Status.PAUSE) |
|
|
|
postEvent(Bus.AUDIO_STATE, Status.PAUSE) |
|
|
|
upNotification() |
|
|
|
upNotification() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun resume() { |
|
|
|
private fun resume() { |
|
|
|
pause = false |
|
|
|
pause = false |
|
|
|