AI-generated Key Takeaways
- 
          IMAVideoDisplayDelegate is a delegate object that receives state change callbacks from IMAVideoDisplay. 
- 
          It includes methods to inform the SDK about various ad playback states such as loading, starting, pausing, resuming, completing, skipping, and errors. 
- 
          The delegate also provides information about ad clicks, skip button appearance, volume changes, ad progression, timed metadata, and buffering status. 
IMAVideoDisplayDelegate
@protocol IMAVideoDisplayDelegate <NSObject>Delegate object that receives state change callbacks from IMAVideoDisplay.
- 
                  
                  Informs the SDK that the ad has loaded. DeclarationSwift func videoDisplayDidLoad(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidLoad:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that loaded the ad 
- 
                  
                  Informs the SDK the ad has started playback. This must be called at most once per loadStream: or loadUrl: call. DeclarationSwift func videoDisplayDidStart(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidStart:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that started ad playback 
- 
                  
                  Informs the SDK the ad has paused. DeclarationSwift func videoDisplayDidPause(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidPause:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that paused ad playback 
- 
                  
                  Informs the SDK the ad has resumed playback. DeclarationSwift func videoDisplayDidResume(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidResume:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that resumed ad playback 
- 
                  
                  Informs the SDK the ad has completed playback. DeclarationSwift func videoDisplayDidComplete(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidComplete:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that completed ad playback 
- 
                  
                  Informs the SDK the ad was clicked. DeclarationSwift func videoDisplayDidClick(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidClick:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that received the ad click 
- 
                  
                  Informs the SDK the ad playback failed due to an error. DeclarationSwift func videoDisplay(_ videoDisplay: any IMAVideoDisplay, didReceiveError error: any Error)Objective-C - (void)videoDisplay:(nonnull id<IMAVideoDisplay>)videoDisplay didReceiveError:(nonnull NSError *)error;ParametersvideoDisplaythe IMAVideoDisplay that failed to play the ad errorthe error that caused the video display to fail to play the ad 
- 
                  
                  Informs the SDK the ad was skipped. DeclarationSwift func videoDisplayDidSkip(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidSkip:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that skipped the ad 
- 
                  
                  Informs the SDK the ad skip button appeared. DeclarationSwift func videoDisplayDidShowSkip(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidShowSkip:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that showed the skip button 
- 
                  
                  Informs the SDK that the ad volume was changed. DeclarationSwift func videoDisplay(_ videoDisplay: any IMAVideoDisplay, volumeChangedTo volume: NSNumber)Objective-C - (void)videoDisplay:(nonnull id<IMAVideoDisplay>)videoDisplay volumeChangedTo:(nonnull NSNumber *)volume;ParametersvideoDisplaythe IMAVideoDisplay that changed the ad volume volumethe new volume of the ad being played 
- 
                  
                  Informs the SDK that the video ad progressed. DeclarationSwift func videoDisplay(_ videoDisplay: any IMAVideoDisplay, didProgressWithMediaTime mediaTime: TimeInterval, totalTime duration: TimeInterval)Objective-C - (void)videoDisplay:(nonnull id<IMAVideoDisplay>)videoDisplay didProgressWithMediaTime:(NSTimeInterval)mediaTime totalTime:(NSTimeInterval)duration;ParametersvideoDisplaythe IMAVideoDisplay that progressed mediaTimethe current time of the ad being played durationthe total duration of the ad being played 
- 
                  
                  Informs the SDK that timed metadata was received. DeclarationSwift func videoDisplay(_ videoDisplay: any IMAVideoDisplay, didReceiveTimedMetadata metadata: [String : String])Objective-C - (void)videoDisplay:(nonnull id<IMAVideoDisplay>)videoDisplay didReceiveTimedMetadata: (nonnull NSDictionary<NSString *, NSString *> *)metadata;ParametersvideoDisplaythe IMAVideoDisplay that received the timed metadata event metadatathe metadata dictionary received with the timed metadata event 
- 
                  
                  Informs the SDK the video ad is buffered to |mediaTime| in seconds. DeclarationSwift optional func videoDisplay(_ videoDisplay: any IMAVideoDisplay, didBufferToMediaTime mediaTime: TimeInterval)Objective-C - (void)videoDisplay:(nonnull id<IMAVideoDisplay>)videoDisplay didBufferToMediaTime:(NSTimeInterval)mediaTime;ParametersvideoDisplaythe IMAVideoDisplay whose buffer was updated mediaTimethe time in seconds of ad media that has been buffered. 
- 
                  
                  Informs the SDK the ad is buffered and playback is likely to keep up. DeclarationSwift optional func videoDisplayIsPlaybackReady(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayIsPlaybackReady:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that is playback ready 
- 
                  
                  Informs the SDK the ad’s media buffer is empty and playback will stall. DeclarationSwift optional func videoDisplayDidStartBuffering(_ videoDisplay: any IMAVideoDisplay)Objective-C - (void)videoDisplayDidStartBuffering:(nonnull id<IMAVideoDisplay>)videoDisplay;ParametersvideoDisplaythe IMAVideoDisplay that started buffering