GoogleInteractiveMediaAds Framework Reference

  • IMAAdPlaybackInfo provides information about the current state of ad playback, such as current time, total time, and buffered time.

  • It indicates if the ad is currently playing with the isPlaying property.

  • All time-related properties are represented as TimeInterval values and are set to 0 if no ad is loaded.

  • This protocol is used by the IMA SDK to track and communicate the playback status of ads within your application.

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;