미디어 알림 삭제 후 재생 버튼 터치시 재생이 되지 않던 버그 수정

This commit is contained in:
klaus 2024-12-18 17:01:41 +09:00
parent f78a13bd2c
commit 5f0323e0a9
1 changed files with 10 additions and 5 deletions

View File

@ -308,11 +308,16 @@ class AudioContentPlayerFragment(
) )
binding.ivPlayOrPause.setOnClickListener { binding.ivPlayOrPause.setOnClickListener {
mediaController?.let { if (!SharedPreferenceManager.isPlayerServiceRunning) {
if (it.playWhenReady) { mediaController = null
it.pause() connectPlayerService()
} else { } else {
it.play() mediaController?.let {
if (it.playWhenReady) {
it.pause()
} else {
it.play()
}
} }
} }
} }