[vlc-commits] [Git][videolan/vlc][master] 2 commits: vout: apple: Update VLCDrawable.h

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu May 8 06:49:57 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
702c8264 by Mokhlas Hussein at 2025-05-08T06:34:08+00:00
vout: apple: Update VLCDrawable.h
Controls whether PiP can start automatically when video enters inline mode

- - - - -
99e46685 by Mokhlas Hussein at 2025-05-08T06:34:08+00:00
vout: apple: Update VLCPictureInPictureController.m
Check if the drawable implements the new method canStartPictureInPictureAutomaticallyFromInline

- - - - -


2 changed files:

- modules/video_output/apple/VLCDrawable.h
- modules/video_output/apple/VLCPictureInPictureController.m


Changes:

=====================================
modules/video_output/apple/VLCDrawable.h
=====================================
@@ -116,4 +116,9 @@
 /// - Returns Must return the block where picture in picture activation
 /// controller is passed
 - (void (^)(id<VLCPictureInPictureWindowControlling>)) pictureInPictureReady;
+
+/// Controls whether PiP can start automatically when video enters inline mode
+/// - Returns YES to allow automatic PiP activation, NO to disable it
+/// The default implementation will return YES if not implemented
+- (BOOL)canStartPictureInPictureAutomaticallyFromInline;
 @end


=====================================
modules/video_output/apple/VLCPictureInPictureController.m
=====================================
@@ -94,9 +94,15 @@ API_AVAILABLE(ios(15.0), tvos(15.0), macosx(12.0))
     avPipController.requiresLinearPlayback = !isMediaSeekable;
     avPipController.delegate = self;
 #if TARGET_OS_IOS
-    // Not sure if it's mandatory, its usefulness isn't obvious and 
-    // documentation doesn't particularily helps
-    avPipController.canStartPictureInPictureAutomaticallyFromInline = YES;
+    // Check if the drawable implements the new method to Controls whether PiP 
+    // can start automatically when video enters inline mode
+    if ([_drawable respondsToSelector:@selector(canStartPictureInPictureAutomaticallyFromInline)]) {
+        avPipController.canStartPictureInPictureAutomaticallyFromInline = 
+            [_drawable canStartPictureInPictureAutomaticallyFromInline];
+    } else {
+        // Use default value if method not implemented
+        avPipController.canStartPictureInPictureAutomaticallyFromInline = YES;
+    }
 #endif
     _avPipController = avPipController;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cf3035ee38537556ed4b55523a3a14318eb60bd0...99e466853fef59668d112557762d309b8d260935

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cf3035ee38537556ed4b55523a3a14318eb60bd0...99e466853fef59668d112557762d309b8d260935
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