GoogleInteractiveMediaAds Framework Reference

IMAAVPlayerVideoDisplay

@interface IMAAVPlayerVideoDisplay : NSObject <IMAVideoDisplay>

An implementation of the IMAVideoDisplay protocol. This object is intended to be initialized with the content player, and will reuse the player for playing ads.

  • The content player used for both content and ad video playback.

    Declaration

    Swift

    var player: AVPlayer! { get }

    Objective-C

    @property (readonly, strong, nonatomic) AVPlayer *player;
  • The player item that will be played by the player. Access to the player item is provided so the item can be seeked, to select subtitles, and to inspect media attributes.

    Declaration

    Swift

    var playerItem: AVPlayerItem! { get }

    Objective-C

    @property (readonly, strong, nonatomic) AVPlayerItem *playerItem;
  • Allows the publisher to receive IMAAVPlayerVideoDisplay specific events.

    Declaration

    Swift

    weak var playerVideoDisplayDelegate: IMAAVPlayerVideoDisplayDelegate! { get set }

    Objective-C

    @property (readwrite, nonatomic) id<IMAAVPlayerVideoDisplayDelegate>
        playerVideoDisplayDelegate;
  • The subtitles for the current stream. Will be nil until the stream starts playing.

    Declaration

    Swift

    var subtitles: [Any]! { get }

    Objective-C

    @property (readonly, strong, nonatomic) NSArray *subtitles;
  • Creates an IMAAVPlayerVideoDisplay that will play ads in the passed in content player.

    Declaration

    Swift

    init!(avPlayer player: AVPlayer!)

    Objective-C

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

    Parameters

    player

    the AVPlayer instance used for playing content

    Return Value

    an IMAAVPlayerVideoDisplay instance