refactor: let os handle pip invocation

This commit is contained in:
Acaki
2025-07-11 19:40:07 +08:00
parent 7c725a4d80
commit 10dcdc31d8
@@ -836,15 +836,6 @@
// This will fire if the user opens control center or gets a low battery message
- (void)applicationWillResignActive:(NSNotification *)notification {
if (_settings.enablePIP && self.pipController && !self.pipController.isPictureInPictureActive && self.pipController.isPictureInPicturePossible) {
VideoDecoderRenderer *renderer = self.streamMan.videoRenderer;
if (renderer && renderer.displayLayer && self.view.window) {
Log(LOG_I, @"Starting Picture in Picture");
[self.pipController startPictureInPicture];
} else {
Log(LOG_I, @"Skipping PiP start: Renderer/Layer/Window not ready OR PiP not possible.");
}
}
if (_inactivityTimer != nil) {
[_inactivityTimer invalidate];
_inactivityTimer = nil;