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 2024-08-21 UTC.
[null,null,["Last updated 2024-08-21 UTC."],[[["\u003cp\u003e\u003ccode\u003eIMAAdPlaybackInfo\u003c/code\u003e provides information about the current state of ad playback, such as current time, total time, and buffered time.\u003c/p\u003e\n"],["\u003cp\u003eIt indicates if the ad is currently playing with the \u003ccode\u003eisPlaying\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eAll properties return 0 for time-related values if no ad is loaded.\u003c/p\u003e\n"],["\u003cp\u003eAccess playback details through read-only properties like \u003ccode\u003ecurrentMediaTime\u003c/code\u003e, \u003ccode\u003etotalMediaTime\u003c/code\u003e, and \u003ccode\u003ebufferedMediaTime\u003c/code\u003e.\u003c/p\u003e\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;"]]