fix pip when video ended

This commit is contained in:
Bnyro 2022-11-25 14:15:07 +01:00
parent ffd7968686
commit d837dedb12

View File

@ -503,6 +503,13 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
override fun onDestroy() {
super.onDestroy()
try {
// disable the auto PiP mode for SDK >= 32
if (SDK_INT >= Build.VERSION_CODES.S) {
activity?.setPictureInPictureParams(
PictureInPictureParams.Builder().setAutoEnterEnabled(false).build()
)
}
saveWatchPosition()
// clear the playing queue and release the player