Merge pull request #1286 from Bnyro/master

fix exo controllers
This commit is contained in:
Bnyro 2022-09-12 15:07:42 +02:00 committed by GitHub
commit 7f2440bf0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -753,9 +753,11 @@ class PlayerFragment : BaseFragment() {
exoPlayer.prepare()
exoPlayer.play()
if (SDK_INT >= Build.VERSION_CODES.O) {
if (binding.playerMotionLayout.progress != 1.0f) {
// show controllers when not in picture in picture mode
if (!activity?.isInPictureInPictureMode!!) exoPlayerView.useController = true
if (!(SDK_INT >= Build.VERSION_CODES.O && activity?.isInPictureInPictureMode!!)) {
exoPlayerView.useController = true
}
}
// show the player notification
initializePlayerNotification()