GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMAAVPlayerContentPlayhead
An implementation of IMAContentPlayhead for AVPlayer. Use this class to
provide content tracking if your content player of choice is an AVPlayer
or its subclass.
-
Declaration
Swift
var player: AVPlayer { get }
Objective-C
@property (nonatomic, readonly) AVPlayer *_Nonnull player;
-
Initializes a IMAAVPlayerContentPlayhead that tracks a player. It will attach a periodic time
observer to the player immediately.
Declaration
Swift
init(avPlayer player: AVPlayer)
Objective-C
- (nonnull instancetype)initWithAVPlayer:(nonnull AVPlayer *)player;
Return Value
the IMAAVPlayerContentPlayhead 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 2024-08-21 UTC.
[null,null,["Last updated 2024-08-21 UTC."],[[["\u003cp\u003eIMAAVPlayerContentPlayhead is an implementation of IMAContentPlayhead specifically designed for AVPlayer and its subclasses, enabling content tracking.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a \u003ccode\u003eplayer\u003c/code\u003e property to access the AVPlayer instance being tracked.\u003c/p\u003e\n"],["\u003cp\u003eInitialization is done using \u003ccode\u003einitWithAVPlayer:\u003c/code\u003e, which takes an AVPlayer instance as a parameter and immediately attaches a periodic time observer to it for tracking.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMAAVPlayerContentPlayhead\n==========================\n\n @interface IMAAVPlayerContentPlayhead : NSObject \u003c../Protocols/IMAContentPlayhead.html\u003e\n\nAn implementation of IMAContentPlayhead for AVPlayer. Use this class to\nprovide content tracking if your content player of choice is an AVPlayer\nor its subclass.\n- `\n ``\n ``\n `\n\n ### [player](#/c:objc(cs)IMAAVPlayerContentPlayhead(py)player)\n\n `\n ` \n The player to track. \n\n #### Declaration\n\n Swift \n\n var player: AVPlayer { get }\n\n Objective-C \n\n @property (nonatomic, readonly) AVPlayer *_Nonnull player;\n\n- `\n ``\n ``\n `\n\n ### [-initWithAVPlayer:](#/c:objc(cs)IMAAVPlayerContentPlayhead(im)initWithAVPlayer:)\n\n `\n ` \n Initializes a IMAAVPlayerContentPlayhead that tracks a player. It will attach a periodic time\n observer to the player immediately. \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 to track. |\n\n #### Return Value\n\n the IMAAVPlayerContentPlayhead instance"]]