|
|
@ -146,14 +146,18 @@ class AudioPlayService : BaseService(), |
|
|
|
if (url.contains(".m3u8", false)) { |
|
|
|
if (url.contains(".m3u8", false)) { |
|
|
|
stopSelf() |
|
|
|
stopSelf() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
AudioPlayService.pause = pause |
|
|
|
try { |
|
|
|
handler.removeCallbacks(mpRunnable) |
|
|
|
AudioPlayService.pause = pause |
|
|
|
position = mediaPlayer.currentPosition |
|
|
|
handler.removeCallbacks(mpRunnable) |
|
|
|
mediaPlayer.pause() |
|
|
|
position = mediaPlayer.currentPosition |
|
|
|
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PAUSED) |
|
|
|
mediaPlayer.pause() |
|
|
|
AudioPlay.status = Status.PAUSE |
|
|
|
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PAUSED) |
|
|
|
postEvent(EventBus.AUDIO_STATE, Status.PAUSE) |
|
|
|
AudioPlay.status = Status.PAUSE |
|
|
|
upNotification() |
|
|
|
postEvent(EventBus.AUDIO_STATE, Status.PAUSE) |
|
|
|
|
|
|
|
upNotification() |
|
|
|
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
|
|
|
e.printStackTrace() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|