GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMAAdPlaybackInfo
@protocol IMAAdPlaybackInfo <NSObject>
Groups various properties of the ad player.
-
The current media time of the ad, or 0 if no ad loaded.
Declaration
Swift
var currentMediaTime: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval currentMediaTime;
-
The total media time of the ad, or 0 if no ad loaded.
Declaration
Swift
var totalMediaTime: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval totalMediaTime;
-
The buffered media time of the ad, or 0 if no ad loaded.
Declaration
Swift
var bufferedMediaTime: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval bufferedMediaTime;
-
Whether or not the ad is currently playing.
Declaration
Swift
var isPlaying: Bool { get }
Objective-C
@property (nonatomic, readonly, getter=isPlaying) BOOL playing;
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\u003eIMAAdPlaybackInfo\u003c/code\u003e provides insights into various aspects of the ad player, such as current time, total duration, and buffered content.\u003c/p\u003e\n"],["\u003cp\u003eIt offers read-only properties like \u003ccode\u003ecurrentMediaTime\u003c/code\u003e, \u003ccode\u003etotalMediaTime\u003c/code\u003e, and \u003ccode\u003ebufferedMediaTime\u003c/code\u003e to track ad playback progress, all measured in \u003ccode\u003eTimeInterval\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ebufferedMediaTime\u003c/code\u003e indicates how much of the ad content has been buffered and is ready for playback.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eplaying\u003c/code\u003e property (or \u003ccode\u003eisPlaying\u003c/code\u003e in Swift) reveals whether the ad is actively playing or paused.\u003c/p\u003e\n"]]],["The `IMAAdPlaybackInfo` protocol groups ad player properties, providing read-only access to key time-related metrics and playback status. It includes `currentMediaTime`, representing the ad's current playback time; `totalMediaTime`, indicating the ad's total duration; and `bufferedMediaTime`, showing the amount of buffered media time. Additionally, the `playing` property, or `isPlaying`, reveals whether the ad is currently playing. If no ad is loaded all the times will be 0.\n"],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMAAdPlaybackInfo\n=================\n\n @protocol IMAAdPlaybackInfo \u003cNSObject\u003e\n\nGroups various properties of the ad player.\n- `\n ``\n ``\n `\n\n ### [currentMediaTime](#/c:objc(pl)IMAAdPlaybackInfo(py)currentMediaTime)\n\n `\n ` \n The current media time of the ad, or 0 if no ad loaded. \n\n #### Declaration\n\n Swift \n\n var currentMediaTime: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval currentMediaTime;\n\n- `\n ``\n ``\n `\n\n ### [totalMediaTime](#/c:objc(pl)IMAAdPlaybackInfo(py)totalMediaTime)\n\n `\n ` \n The total media time of the ad, or 0 if no ad loaded. \n\n #### Declaration\n\n Swift \n\n var totalMediaTime: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval totalMediaTime;\n\n- `\n ``\n ``\n `\n\n ### [bufferedMediaTime](#/c:objc(pl)IMAAdPlaybackInfo(py)bufferedMediaTime)\n\n `\n ` \n The buffered media time of the ad, or 0 if no ad loaded. \n\n #### Declaration\n\n Swift \n\n var bufferedMediaTime: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval bufferedMediaTime;\n\n- `\n ``\n ``\n `\n\n ### [playing](#/c:objc(pl)IMAAdPlaybackInfo(py)playing)\n\n `\n ` \n Whether or not the ad is currently playing. \n\n #### Declaration\n\n Swift \n\n var isPlaying: Bool { get }\n\n Objective-C \n\n @property (nonatomic, readonly, getter=isPlaying) BOOL playing;"]]