AI-generated Key Takeaways
- 
          IMAAVPlayerVideoDisplay is an implementation of the IMAVideoDisplay protocol designed to reuse an existing content player for ad playback. 
- 
          It provides properties like playerVideoDisplayDelegatefor receiving specific events,subtitlesfor accessing stream subtitles, andstreamAssetOptionsfor customizingAVURLAssetinitialization for stream playback.
- 
          An instance of IMAAVPlayerVideoDisplay is created using the initWithAVPlayer:method, taking the content player as a parameter.
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. DeclarationSwift 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. DeclarationSwift 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.DeclarationSwift 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. DeclarationSwift init(avPlayer player: AVPlayer)Objective-C - (nonnull instancetype)initWithAVPlayer:(nonnull AVPlayer *)player;Parametersplayerthe AVPlayer instance used for playing content Return Valuean IMAAVPlayerVideoDisplay instance