GoogleInteractiveMediaAds Framework Reference

  • IMAAVPlayerContentPlayhead is an implementation of IMAContentPlayhead specifically for AVPlayer, used for content tracking with AVPlayer or its subclasses.

  • The player property provides read-only access to the AVPlayer instance being tracked.

  • The -initWithAVPlayer: initializer creates and returns an IMAAVPlayerContentPlayhead instance that tracks a specified AVPlayer, attaching a periodic time observer immediately.

IMAAVPlayerContentPlayhead

@interface IMAAVPlayerContentPlayhead : NSObject <IMAContentPlayhead>

An implementation of IMAContentPlayhead for AVPlayer. Use this class to provide content tracking if your content player of choice is an AVPlayer or its subclass.

  • The player to track.

    Declaration

    Swift

    var player: AVPlayer { get }

    Objective-C

    @property (nonatomic, readonly) AVPlayer *_Nonnull player;
  • Initializes a IMAAVPlayerContentPlayhead that tracks a player. It will attach a periodic time observer to the player immediately.

    Declaration

    Swift

    init(avPlayer player: AVPlayer)

    Objective-C

    - (nonnull instancetype)initWithAVPlayer:(nonnull AVPlayer *)player;

    Parameters

    player

    the AVPlayer to track.

    Return Value

    the IMAAVPlayerContentPlayhead instance