mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-07-30 08:09:21 +00:00
fix: media keeps playing after closing pip
This commit is contained in:
parent
91cf6e62c5
commit
e19fcd08e3
1 changed files with 2 additions and 1 deletions
|
|
@ -240,7 +240,8 @@ actual fun PlatformPlayerSurface(
|
|||
Lifecycle.Event.ON_STOP -> {
|
||||
val isInPictureInPicture =
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && activity?.isInPictureInPictureMode == true
|
||||
if (!isInPictureInPicture) {
|
||||
val isFinishing = activity?.isFinishing == true
|
||||
if (!isInPictureInPicture || isFinishing) {
|
||||
exoPlayer.pause()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue