GoogleInteractiveMediaAds Framework Reference

  • IMAAVPlayerContentPlayhead is designed to track the content progress of an AVPlayer or its subclasses.

  • It implements the IMAContentPlayhead protocol, providing a standard way to interact with content playback information.

  • This class uses a periodic time observer attached to the AVPlayer to monitor playback.

  • Initialization requires an AVPlayer instance, and upon creation, it immediately starts tracking.

Constants

The following constants are available globally.

  • The key for subtitle language.

    Declaration

    Swift

    let kIMASubtitleLanguage: String

    Objective-C

    extern NSString *const _Nonnull kIMASubtitleLanguage
  • The key for the WebVTT sidecar subtitle URL.

    Declaration

    Swift

    let kIMASubtitleWebVTT: String

    Objective-C

    extern NSString *const _Nonnull kIMASubtitleWebVTT
  • The key for the TTML sidecar subtitle URL.

    Declaration

    Swift

    let kIMASubtitleTTML: String

    Objective-C

    extern NSString *const _Nonnull kIMASubtitleTTML
  • The key for the time in seconds when the AD_BREAK_READY event fired.

    Declaration

    Swift

    let kIMAAdBreakTime: String

    Objective-C

    extern NSString *const _Nonnull kIMAAdBreakTime
  • The default value of |bitrate property|, causes the effective bitrate to be automatically selected.

    Declaration

    Swift

    let kIMAAutodetectBitrate: Int

    Objective-C

    extern const NSInteger kIMAAutodetectBitrate
  • Fluid companion ads have no fixed size, but rather adapt to fit the creative content they display. Set width and height to fluid size to allow companion slot to be filled by fluid companion ad.

    Declaration

    Swift

    let kIMAFluidSize: Int

    Objective-C

    extern const NSInteger kIMAFluidSize
  • Property name used for key value observation.

    Declaration

    Swift

    let kIMAPropertyCurrentTime: String

    Objective-C

    extern NSString *const _Nonnull kIMAPropertyCurrentTime