GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMAPictureInPictureProxy
@interface IMAPictureInPictureProxy
: NSProxy <AVPictureInPictureControllerDelegate, AVPlayerViewControllerDelegate>
#else
@interface IMAPictureInPictureProxy : NSObject
#endif
/**
* Whether or not Picture-in-Picture is currently active.
*/
@property(nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
/**
* Whether or not Picture-in-Picture is supported on this device.
*/
+ (BOOL)isPictureInPictureSupported;
/**
* Instantiates an IMAPictureInPictureProxy that will proxy delegate
* messages from an AVPictureInPictureController, and forward them
* to the AVPictureInPictureControllerDelegate passed on init.
*
* @param delegate the AVPictureInPictureControllerDelegate
*
* @return an IMAPictureInPictureProxy instance
*/
- (instancetype)initWithAVPictureInPictureControllerDelegate:
(id<AVPictureInPictureControllerDelegate>)delegate API_AVAILABLE(ios(9.0), tvos(14.0));
/**
* Instantiates an IMAPictureInPictureProxy that will proxy delegate
* messages from an AVPlayerViewController, and forward them to the
* AVPlayerViewControllerDelegate passed on init.
*
* @param delegate the AVPlayerViewControllerDelegate
*
* @return an IMAPictureInPictureProxy instance
*/
- (instancetype)initWithAVPlayerViewControllerDelegate:(id<AVPlayerViewControllerDelegate>)delegate
API_AVAILABLE(ios(9.0), tvos(14.0));
@end
Undocumented
-
Whether or not Picture-in-Picture is currently active.
Declaration
Swift
var isPictureInPictureActive: Bool { get }
Objective-C
@property (nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
-
Whether or not Picture-in-Picture is supported on this device.
Declaration
Swift
class func isPictureInPictureSupported() -> Bool
Objective-C
+ (BOOL)isPictureInPictureSupported;
-
Instantiates an IMAPictureInPictureProxy that will proxy delegate
messages from an AVPictureInPictureController, and forward them
to the AVPictureInPictureControllerDelegate passed on init.
Declaration
Swift
init(avPictureInPictureControllerDelegate delegate: any AVPictureInPictureControllerDelegate)
Objective-C
- (nonnull instancetype)initWithAVPictureInPictureControllerDelegate:
(nonnull id<AVPictureInPictureControllerDelegate>)delegate;
Parameters
delegate
|
the AVPictureInPictureControllerDelegate
|
Return Value
an IMAPictureInPictureProxy instance
-
Instantiates an IMAPictureInPictureProxy that will proxy delegate
messages from an AVPlayerViewController, and forward them to the
AVPlayerViewControllerDelegate passed on init.
Declaration
Swift
init(avPlayerViewControllerDelegate delegate: any AVPlayerViewControllerDelegate)
Objective-C
- (nonnull instancetype)initWithAVPlayerViewControllerDelegate:
(nonnull id<AVPlayerViewControllerDelegate>)delegate;
Parameters
delegate
|
the AVPlayerViewControllerDelegate
|
Return Value
an IMAPictureInPictureProxy instance
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eIMAPictureInPictureProxy\u003c/code\u003e manages Picture-in-Picture functionality, acting as a proxy for \u003ccode\u003eAVPictureInPictureControllerDelegate\u003c/code\u003e and \u003ccode\u003eAVPlayerViewControllerDelegate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties to check if Picture-in-Picture is active (\u003ccode\u003epictureInPictureActive\u003c/code\u003e) and if it's supported on the current device (\u003ccode\u003eisPictureInPictureSupported\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThis class offers methods to instantiate a proxy instance to handle delegate messages from either \u003ccode\u003eAVPictureInPictureControllerDelegate\u003c/code\u003e or \u003ccode\u003eAVPlayerViewControllerDelegate\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `IMAPictureInPictureProxy` class manages Picture-in-Picture (PiP) functionality. It checks if PiP is supported using `isPictureInPictureSupported` and if it's active with `pictureInPictureActive`. The class can be instantiated to proxy delegate messages from either an `AVPictureInPictureController` or an `AVPlayerViewController`, forwarding them to the designated delegates. Each instantiation method takes a delegate as a parameter and returns an `IMAPictureInPictureProxy` instance.\n"],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMAPictureInPictureProxy\n========================\n\n @interface IMAPictureInPictureProxy\n : NSProxy \u003cAVPictureInPictureControllerDelegate, AVPlayerViewControllerDelegate\u003e\n #else\n @interface IMAPictureInPictureProxy : NSObject\n #endif\n /**\n * Whether or not Picture-in-Picture is currently active.\n */\n @property(nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;\n\n /**\n * Whether or not Picture-in-Picture is supported on this device.\n */\n + (BOOL)isPictureInPictureSupported;\n\n /**\n * Instantiates an IMAPictureInPictureProxy that will proxy delegate\n * messages from an AVPictureInPictureController, and forward them\n * to the AVPictureInPictureControllerDelegate passed on init.\n *\n * @param delegate the AVPictureInPictureControllerDelegate\n *\n * @return an IMAPictureInPictureProxy instance\n */\n - (instancetype)initWithAVPictureInPictureControllerDelegate:\n (id\u003cAVPictureInPictureControllerDelegate\u003e)delegate API_AVAILABLE(ios(9.0), tvos(14.0));\n\n /**\n * Instantiates an IMAPictureInPictureProxy that will proxy delegate\n * messages from an AVPlayerViewController, and forward them to the\n * AVPlayerViewControllerDelegate passed on init.\n *\n * @param delegate the AVPlayerViewControllerDelegate\n *\n * @return an IMAPictureInPictureProxy instance\n */\n - (instancetype)initWithAVPlayerViewControllerDelegate:(id\u003cAVPlayerViewControllerDelegate\u003e)delegate\n API_AVAILABLE(ios(9.0), tvos(14.0));\n\n @end\n\nUndocumented\n- `\n ``\n ``\n `\n\n ### [pictureInPictureActive](#/c:objc(cs)IMAPictureInPictureProxy(py)pictureInPictureActive)\n\n `\n ` \n Whether or not Picture-in-Picture is currently active. \n\n #### Declaration\n\n Swift \n\n var isPictureInPictureActive: Bool { get }\n\n Objective-C \n\n @property (nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;\n\n- `\n ``\n ``\n `\n\n ### [+isPictureInPictureSupported](#/c:objc(cs)IMAPictureInPictureProxy(cm)isPictureInPictureSupported)\n\n `\n ` \n Whether or not Picture-in-Picture is supported on this device. \n\n #### Declaration\n\n Swift \n\n class func isPictureInPictureSupported() -\u003e Bool\n\n Objective-C \n\n + (BOOL)isPictureInPictureSupported;\n\n- `\n ``\n ``\n `\n\n ### [-initWithAVPictureInPictureControllerDelegate:](#/c:objc(cs)IMAPictureInPictureProxy(im)initWithAVPictureInPictureControllerDelegate:)\n\n `\n ` \n Instantiates an IMAPictureInPictureProxy that will proxy delegate\n messages from an AVPictureInPictureController, and forward them\n to the AVPictureInPictureControllerDelegate passed on init. \n\n #### Declaration\n\n Swift \n\n init(avPictureInPictureControllerDelegate delegate: any AVPictureInPictureControllerDelegate)\n\n Objective-C \n\n - (nonnull instancetype)initWithAVPictureInPictureControllerDelegate:\n (nonnull id\u003cAVPictureInPictureControllerDelegate\u003e)delegate;\n\n #### Parameters\n\n |------------------|------------------------------------------|\n | ` `*delegate*` ` | the AVPictureInPictureControllerDelegate |\n\n #### Return Value\n\n an IMAPictureInPictureProxy instance\n- `\n ``\n ``\n `\n\n ### [-initWithAVPlayerViewControllerDelegate:](#/c:objc(cs)IMAPictureInPictureProxy(im)initWithAVPlayerViewControllerDelegate:)\n\n `\n ` \n Instantiates an IMAPictureInPictureProxy that will proxy delegate\n messages from an AVPlayerViewController, and forward them to the\n AVPlayerViewControllerDelegate passed on init. \n\n #### Declaration\n\n Swift \n\n init(avPlayerViewControllerDelegate delegate: any AVPlayerViewControllerDelegate)\n\n Objective-C \n\n - (nonnull instancetype)initWithAVPlayerViewControllerDelegate:\n (nonnull id\u003cAVPlayerViewControllerDelegate\u003e)delegate;\n\n #### Parameters\n\n |------------------|------------------------------------|\n | ` `*delegate*` ` | the AVPlayerViewControllerDelegate |\n\n #### Return Value\n\n an IMAPictureInPictureProxy instance"]]