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 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eIMAAVPlayerVideoDisplayDelegate\u003c/code\u003e protocol defines callbacks for interactions with an \u003ccode\u003eIMAAVPlayerVideoDisplay\u003c/code\u003e, enabling publishers to manage stream loading and content protection.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eplayerVideoDisplay:willLoadStreamAsset:\u003c/code\u003e method allows publishers to register an \u003ccode\u003eAVURLAsset\u003c/code\u003e for Fairplay before playback, particularly useful for handling protected content.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eplayerVideoDisplay:didLoadPlayerItem:\u003c/code\u003e is called when the \u003ccode\u003eIMAAVPlayerVideoDisplay\u003c/code\u003e has partially or fully loaded media, signaling the availability of an \u003ccode\u003eAVPlayerItem\u003c/code\u003e primarily for dynamic ad insertion scenarios.\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;"]]