[vlc-commits] [Git][videolan/vlc][master] macosx: Fix PiP window not showing for audio media

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Sep 8 12:36:00 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
eae9abe0 by Bob Moriasi at 2025-09-08T11:59:42+00:00
macosx: Fix PiP window not showing for audio media

- - - - -


1 changed file:

- modules/gui/macosx/windows/video/VLCMainVideoViewController.m


Changes:

=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -582,12 +582,22 @@
     _pipViewController.title = window.title;
     
     __weak typeof(self) weakSelf = self;
-    _voutViewController.boundsChangeHandler = ^{
-        typeof(self) strongSelf = weakSelf;
-        if (strongSelf && strongSelf->_voutViewController.presentingViewController == nil) {
-            [strongSelf->_pipViewController presentViewControllerAsPictureInPicture:strongSelf->_voutViewController];
-        }
-    };
+    
+    if (controller.currentMediaIsAudioOnly) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            typeof(self) strongSelf = weakSelf;
+            if (strongSelf && strongSelf->_voutViewController.presentingViewController == nil) {
+                [strongSelf->_pipViewController presentViewControllerAsPictureInPicture:strongSelf->_voutViewController];
+            }
+        });
+    } else {
+        _voutViewController.boundsChangeHandler = ^{
+            typeof(self) strongSelf = weakSelf;
+            if (strongSelf && strongSelf->_voutViewController.presentingViewController == nil) {
+                [strongSelf->_pipViewController presentViewControllerAsPictureInPicture:strongSelf->_voutViewController];
+            }
+        };
+    }
     
     if ([window isKindOfClass:VLCLibraryWindow.class]) {
         [self returnToLibrary:self];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/eae9abe033e5f6a01c8b02f0c19b7053f993dd1a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/eae9abe033e5f6a01c8b02f0c19b7053f993dd1a
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list