only do in PiP

This commit is contained in:
Bnyro 2022-08-27 11:44:43 +02:00
parent b997d0c6d0
commit 93315aeb63

View File

@ -1137,7 +1137,7 @@ class PlayerFragment : BaseFragment() {
binding.playImageView.setImageResource(R.drawable.ic_play) binding.playImageView.setImageResource(R.drawable.ic_play)
} }
if (SDK_INT >= Build.VERSION_CODES.O) { if (SDK_INT >= Build.VERSION_CODES.O && activity?.isInPictureInPictureMode!!) {
// listen for the stop button in the notification // listen for the stop button in the notification
if (playbackState == PlaybackState.STATE_STOPPED) { if (playbackState == PlaybackState.STATE_STOPPED) {
// finish PiP by finishing the activity // finish PiP by finishing the activity