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.

  • Allows the publisher to receive IMAAVPlayerVideoDisplay specific events.

    Declaration

    Swift

    weak var playerVideoDisplayDelegate: (any IMAAVPlayerVideoDisplayDelegate)? { get set }

    Objective-C

    @property (nonatomic, weak, nullable) 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 (nonatomic, readonly, nullable) NSArray *subtitles;
  • A dictionary that contains options used to customize the initialization of an AVURLAsset for stream playback. Has no effect on client-side ads.

    Declaration

    Swift

    var streamAssetOptions: [String : Any]? { get set }

    Objective-C

    @property (nonatomic, copy, nullable) NSDictionary<NSString *, id> *streamAssetOptions;
  • Creates an IMAAVPlayerVideoDisplay that will play ads in the passed in content player.

    Declaration

    Swift

    init(avPlayer player: AVPlayer)

    Objective-C

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

    Parameters

    player

    the AVPlayer instance used for playing content

    Return Value

    an IMAAVPlayerVideoDisplay instance