GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMAAVPlayerVideoDisplay
An implementation of the IMAVideoDisplay protocol. This object is intended
to be initialized with the content player, and will reuse the player for
playing ads.
-
Allows the publisher to receive IMAAVPlayerVideoDisplay specific events.
-
The subtitles for the current stream. Will be nil until the stream starts playing.
Declaration
Swift
var subtitles: [Any]? { get }
Objective-C
@property (nonatomic, readonly, nullable) NSArray *subtitles;
-
A dictionary that contains options used to customize the initialization of an AVURLAsset
for
stream playback. Has no effect on client-side ads.
Declaration
Swift
var streamAssetOptions: [String : Any]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSDictionary<NSString *, id> *streamAssetOptions;
-
Creates an IMAAVPlayerVideoDisplay that will play ads in the passed in
content player.
Declaration
Swift
init(avPlayer player: AVPlayer)
Objective-C
- (nonnull instancetype)initWithAVPlayer:(nonnull AVPlayer *)player;
Parameters
player
|
the AVPlayer instance used for playing content
|
Return Value
an IMAAVPlayerVideoDisplay 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\u003eIMAAVPlayerVideoDisplay is an implementation of the IMAVideoDisplay protocol, designed to initialize with and reuse the content player for ad playback.\u003c/p\u003e\n"],["\u003cp\u003eIt offers a \u003ccode\u003eplayerVideoDisplayDelegate\u003c/code\u003e property for receiving IMAAVPlayerVideoDisplay-specific events.\u003c/p\u003e\n"],["\u003cp\u003eSubtitles for the stream are accessible via the \u003ccode\u003esubtitles\u003c/code\u003e property but are only available after the stream begins playing.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003estreamAssetOptions\u003c/code\u003e property allows customization of \u003ccode\u003eAVURLAsset\u003c/code\u003e initialization for streams, impacting only stream playback and not client-side ads.\u003c/p\u003e\n"],["\u003cp\u003eInitialization requires an AVPlayer instance passed during creation using the \u003ccode\u003einitWithAVPlayer:\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMAAVPlayerVideoDisplay\n=======================\n\n @interface IMAAVPlayerVideoDisplay : NSObject \u003c../Protocols/IMAVideoDisplay.html\u003e\n\nAn implementation of the IMAVideoDisplay protocol. This object is intended\nto be initialized with the content player, and will reuse the player for\nplaying ads.\n- `\n ``\n ``\n `\n\n ### [playerVideoDisplayDelegate](#/c:objc(cs)IMAAVPlayerVideoDisplay(py)playerVideoDisplayDelegate)\n\n `\n ` \n Allows the publisher to receive IMAAVPlayerVideoDisplay specific events. \n\n #### Declaration\n\n Swift \n\n weak var playerVideoDisplayDelegate: (any ../Protocols/IMAAVPlayerVideoDisplayDelegate.html)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/IMAAVPlayerVideoDisplayDelegate.html\u003e playerVideoDisplayDelegate;\n\n- `\n ``\n ``\n `\n\n ### [subtitles](#/c:objc(cs)IMAAVPlayerVideoDisplay(py)subtitles)\n\n `\n ` \n The subtitles for the current stream. Will be nil until the stream starts playing. \n\n #### Declaration\n\n Swift \n\n var subtitles: [Any]? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSArray *subtitles;\n\n- `\n ``\n ``\n `\n\n ### [streamAssetOptions](#/c:objc(cs)IMAAVPlayerVideoDisplay(py)streamAssetOptions)\n\n `\n ` \n A dictionary that contains options used to customize the initialization of an `AVURLAsset` for\n stream playback. Has no effect on client-side ads. \n\n #### Declaration\n\n Swift \n\n var streamAssetOptions: [String : Any]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSDictionary\u003cNSString *, id\u003e *streamAssetOptions;\n\n- `\n ``\n ``\n `\n\n ### [-initWithAVPlayer:](#/c:objc(cs)IMAAVPlayerVideoDisplay(im)initWithAVPlayer:)\n\n `\n ` \n Creates an IMAAVPlayerVideoDisplay that will play ads in the passed in\n content player. \n\n #### Declaration\n\n Swift \n\n init(avPlayer player: AVPlayer)\n\n Objective-C \n\n - (nonnull instancetype)initWithAVPlayer:(nonnull AVPlayer *)player;\n\n #### Parameters\n\n |----------------|------------------------------------------------|\n | ` `*player*` ` | the AVPlayer instance used for playing content |\n\n #### Return Value\n\n an IMAAVPlayerVideoDisplay instance"]]