AI-generated Key Takeaways
- 
          The IMAVideoDisplay protocol declares a video display class used for ad playback. 
- 
          The delegate property allows sending player events to the SDK. 
- 
          The volume property sets and gets the ad volume relative to the device volume, from 0 to 1. 
- 
          The loadStream method is called to load a stream URL with optional subtitles. 
- 
          Methods like play, pause, reset, and seekStreamToTime control ad playback and state. 
IMAVideoDisplay
@protocol IMAVideoDisplay <IMAAdPlaybackInfo>Declares a simple video display class used for ad playback.
- 
                  
                  Allows the publisher to send player events to the SDK. DeclarationSwift weak var delegate: (any IMAVideoDisplayDelegate)? { get set }Objective-C @property (nonatomic, weak, nullable) id<IMAVideoDisplayDelegate> delegate;
- 
                  
                  Set and get the volume for the current ad. From 0 (muted) to 1 (loudest). This volume is relative to device volume, not absolute. Default value is 1. DeclarationSwift var volume: Float { get set }Objective-C @property (nonatomic) float volume;
- 
                  
                  Called to inform the VideoDisplay to load the passed URL with the subtitles for the stream. Subtitles are available only for dynamic ad insertion VOD streams and can be ignored for client side ads or dynamic ad insertion live streams. DeclarationSwift func loadStream(_ streamURL: URL, withSubtitles subtitles: [[String : String]])Objective-C - (void)loadStream:(nonnull NSURL *)streamURL withSubtitles: (nonnull NSArray<NSDictionary<NSString *, NSString *> *> *)subtitles;ParametersstreamURLthe URL of the stream subtitlesthe subtitles for the stream. Each entry in the subtitles array is an NSDictionary that corresponds to a language. Each dictionary will have a language key with a two letter language string value, a language name to specify the set of subtitles if multiple sets exist for the same language, and one or more subtitle key/value pairs. Here’s an example NSDictionary for English: "language" -> "en" "language_name" -> "English" "webvtt" -> "https://somedomain.com/vtt/en.vtt" "ttml" -> "https://somedomain.com/ttml/en.ttml"
- 
                  
                  Called to inform the VideoDisplay to play. DeclarationSwift func play()Objective-C - (void)play;
- 
                  
                  Called to inform the VideoDisplay to pause. DeclarationSwift func pause()Objective-C - (void)pause;
- 
                  
                  Called to remove all video assets from the player. DeclarationSwift func reset()Objective-C - (void)reset;
- 
                  
                  Called to inform that the stream needs to be seeked to the given time. DeclarationSwift func seekStream(toTime time: TimeInterval)Objective-C - (void)seekStreamToTime:(NSTimeInterval)time;Parameterstimethe time to which the stream should be seeked 
- 
                  
                  Called to inform the VideoDisplay to skip the current interstitial item. DeclarationSwift func skipCurrentInterstitialItem()Objective-C - (void)skipCurrentInterstitialItem;