#C0346LWVBJ4 I'm trying to pause the AVPlayer video when in Full screen.
Now when another window is opened the player is not paused it still continue playing behind this new window.
I'm adding new window using this code.
Copy code
val scene = UIApplication.sharedApplication.connectedScenes.first() as? UIWindowScene
val overlayWindow: UIWindow? = scene?.let { UIWindow(it) }
overlayWindow?.setFrame(UIScreen.mainScreen.bounds)
overlayWindow?.setWindowLevel(UIWindowLevelAlert + 1)
overlayWindow?.hidden = false
overlayWindow?.rootViewController = overlayViewController
overlayWindow?.makeKeyAndVisible()
I'm able to show and hide the window everything works fine.
But when this window is shown the player compose state is still resume and playing