AI-generated Key Takeaways
-
IMAAVPlayerVideoDisplay is an implementation of the IMAVideoDisplay protocol initialized with the content player to reuse it for playing ads.
-
The
playerVideoDisplayDelegateproperty allows the publisher to receive IMAAVPlayerVideoDisplay specific events. -
The
subtitlesproperty provides the subtitles for the current stream and is nil until the stream starts playing. -
The
streamAssetOptionsproperty is a dictionary for customizing the initialization of anAVURLAssetfor stream playback, with no effect on client-side ads. -
The
-initWithAVPlayer:method creates an IMAAVPlayerVideoDisplay instance that will play ads in the provided content player.
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
AVURLAssetfor 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
playerthe AVPlayer instance used for playing content
Return Value
an IMAAVPlayerVideoDisplay instance