GoogleInteractiveMediaAds Framework Reference
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 2023-11-14 UTC.
[null,null,["Last updated 2023-11-14 UTC."],[[["`IMAAdPlaybackInfo` provides insights into various aspects of the ad player, such as current time, total duration, and buffered content."],["It offers read-only properties like `currentMediaTime`, `totalMediaTime`, and `bufferedMediaTime` to track ad playback progress, all measured in `TimeInterval`."],["`bufferedMediaTime` indicates how much of the ad content has been buffered and is ready for playback."],["The `playing` property (or `isPlaying` in Swift) reveals whether the ad is actively playing or paused."]]],["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"]]