GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMAAVPlayerVideoDisplayDelegate
@protocol IMAAVPlayerVideoDisplayDelegate <NSObject>
A callback protocol for IMAAVPlayerVideoDisplayDelegate.
-
Called when the IMAAVPlayerVideoDisplay will load a stream for playback. Allows the publisher to
register the AVURLAsset for Fairplay content protection before playback starts.
Declaration
Swift
optional func playerVideoDisplay(_ playerVideoDisplay: IMAAVPlayerVideoDisplay, willLoadStreamAsset URLAsset: AVURLAsset)
Objective-C
- (void)playerVideoDisplay:(nonnull IMAAVPlayerVideoDisplay *)playerVideoDisplay
willLoadStreamAsset:(nonnull AVURLAsset *)URLAsset;
Parameters
playerVideoDisplay
|
the IMAVPlayerVideoDisplay that will load the AVURLAsset.
|
URLAsset
|
the AVURLAsset representing the stream to be loaded.
|
-
Called when the IMAAVPlayerVideoDisplay
has at least partially loaded media for
playback and the player item is loaded. Only called for dynamic ad insertion.
Declaration
Swift
optional func playerVideoDisplay(_ playerVideoDisplay: IMAAVPlayerVideoDisplay, didLoad playerItem: AVPlayerItem)
Objective-C
- (void)playerVideoDisplay:(nonnull IMAAVPlayerVideoDisplay *)playerVideoDisplay
didLoadPlayerItem:(nonnull AVPlayerItem *)playerItem;
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 2024-08-21 UTC.
[null,null,["Last updated 2024-08-21 UTC."],[[["\u003cp\u003e\u003ccode\u003eIMAAVPlayerVideoDisplayDelegate\u003c/code\u003e is a callback protocol for the \u003ccode\u003eIMAAVPlayerVideoDisplay\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt allows publishers to interact with the video display's loading and playback process, such as registering content protection.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewillLoadStreamAsset\u003c/code\u003e method is called before loading a stream, enabling Fairplay content protection setup for AVURLAssets.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edidLoadPlayerItem\u003c/code\u003e method is called when the IMAAVPlayerVideoDisplay has loaded media and the AVPlayerItem is ready, specifically for dynamic ad insertion.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMAAVPlayerVideoDisplayDelegate\n===============================\n\n @protocol IMAAVPlayerVideoDisplayDelegate \u003cNSObject\u003e\n\nA callback protocol for IMAAVPlayerVideoDisplayDelegate.\n- `\n ``\n ``\n `\n\n ### [-playerVideoDisplay:willLoadStreamAsset:](#/c:objc(pl)IMAAVPlayerVideoDisplayDelegate(im)playerVideoDisplay:willLoadStreamAsset:)\n\n `\n ` \n Called when the IMAAVPlayerVideoDisplay will load a stream for playback. Allows the publisher to\n register the AVURLAsset for Fairplay content protection before playback starts. \n\n #### Declaration\n\n Swift \n\n optional func playerVideoDisplay(_ playerVideoDisplay: ../Classes/IMAAVPlayerVideoDisplay.html, willLoadStreamAsset URLAsset: AVURLAsset)\n\n Objective-C \n\n - (void)playerVideoDisplay:(nonnull ../Classes/IMAAVPlayerVideoDisplay.html *)playerVideoDisplay\n willLoadStreamAsset:(nonnull AVURLAsset *)URLAsset;\n\n #### Parameters\n\n |----------------------------|-----------------------------------------------------------|\n | ` `*playerVideoDisplay*` ` | the IMAVPlayerVideoDisplay that will load the AVURLAsset. |\n | ` `*URLAsset*` ` | the AVURLAsset representing the stream to be loaded. |\n\n- `\n ``\n ``\n `\n\n ### [-playerVideoDisplay:didLoadPlayerItem:](#/c:objc(pl)IMAAVPlayerVideoDisplayDelegate(im)playerVideoDisplay:didLoadPlayerItem:)\n\n `\n ` \n Called when the [IMAAVPlayerVideoDisplay](../Classes/IMAAVPlayerVideoDisplay.html) has at least partially loaded media for\n playback and the player item is loaded. Only called for dynamic ad insertion. \n\n #### Declaration\n\n Swift \n\n optional func playerVideoDisplay(_ playerVideoDisplay: ../Classes/IMAAVPlayerVideoDisplay.html, didLoad playerItem: AVPlayerItem)\n\n Objective-C \n\n - (void)playerVideoDisplay:(nonnull ../Classes/IMAAVPlayerVideoDisplay.html *)playerVideoDisplay\n didLoadPlayerItem:(nonnull AVPlayerItem *)playerItem;"]]