IMAVideoDisplayDelegate

@protocol IMAVideoDisplayDelegate <NSObject>

Delegate object that receives state change callbacks from IMAVideoDisplay.

  • Informs the SDK that the ad has loaded.

    Declaration

    Swift

    func videoDisplayDidLoad(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidLoad:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the 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.

    Declaration

    Swift

    func videoDisplayDidStart(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidStart:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that started ad playback

  • Informs the SDK the ad has paused.

    Declaration

    Swift

    func videoDisplayDidPause(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidPause:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that paused ad playback

  • Informs the SDK the ad has resumed playback.

    Declaration

    Swift

    func videoDisplayDidResume(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidResume:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that resumed ad playback

  • Informs the SDK the ad has resumed playback.

    Declaration

    Swift

    func videoDisplayDidPlay(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidPlay:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that resumed ad playback

  • Informs the SDK the ad has completed playback.

    Declaration

    Swift

    func videoDisplayDidComplete(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidComplete:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that completed ad playback

  • Informs the SDK the ad was clicked.

    Declaration

    Swift

    func videoDisplayDidClick(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidClick:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that received the ad click

  • Informs the SDK the ad playback failed due to an error.

    Declaration

    Swift

    func videoDisplay(_ videoDisplay: IMAVideoDisplay!, didReceiveError error: Error!)

    Objective-C

    - (void)videoDisplay:(id<IMAVideoDisplay>)videoDisplay
         didReceiveError:(NSError *)error;

    Parameters

    videoDisplay

    the IMAVideoDisplay that failed to play the ad

    error

    the error that caused the video display to fail to play the ad

  • Informs the SDK the ad was skipped.

    Declaration

    Swift

    func videoDisplayDidSkip(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidSkip:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that skipped the ad

  • Informs the SDK the ad skip button appeared.

    Declaration

    Swift

    func videoDisplayDidShowSkip(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidShowSkip:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that showed the skip button

  • Informs the SDK that the ad volume was changed.

    Declaration

    Swift

    func videoDisplay(_ videoDisplay: IMAVideoDisplay!, volumeChangedTo volume: NSNumber!)

    Objective-C

    - (void)videoDisplay:(id<IMAVideoDisplay>)videoDisplay
         volumeChangedTo:(NSNumber *)volume;

    Parameters

    videoDisplay

    the IMAVideoDisplay that changed the ad volume

    volume

    the new volume of the ad being played

  • Informs the SDK that the video ad progressed.

    Declaration

    Swift

    func videoDisplay(_ videoDisplay: IMAVideoDisplay!, didProgressWithMediaTime mediaTime: TimeInterval, totalTime duration: TimeInterval)

    Objective-C

    - (void)videoDisplay:(id<IMAVideoDisplay>)videoDisplay
        didProgressWithMediaTime:(NSTimeInterval)mediaTime
                       totalTime:(NSTimeInterval)duration;

    Parameters

    videoDisplay

    the IMAVideoDisplay that progressed

    mediaTime

    the current time of the ad being played

    duration

    the total duration of the ad being played

  • Informs the SDK that timed metadata was received.

    Declaration

    Swift

    func videoDisplay(_ videoDisplay: IMAVideoDisplay!, didReceiveTimedMetadata metadata: [String : String]!)

    Objective-C

    - (void)videoDisplay:(id<IMAVideoDisplay>)videoDisplay
        didReceiveTimedMetadata:(NSDictionary<NSString *, NSString *> *)metadata;

    Parameters

    videoDisplay

    the IMAVideoDisplay that received the timed metadata event

    metadata

    the metadata dictionary received with the timed metadata event

  • Informs the SDK the video ad is buffered to |mediaTime| in seconds.

    Declaration

    Swift

    optional func videoDisplay(_ videoDisplay: IMAVideoDisplay!, didBufferToMediaTime mediaTime: TimeInterval)

    Objective-C

    - (void)videoDisplay:(id<IMAVideoDisplay>)videoDisplay
        didBufferToMediaTime:(NSTimeInterval)mediaTime;

    Parameters

    videoDisplay

    the IMAVideoDisplay whose buffer was updated

    mediaTime

    the time in seconds of ad media that has been buffered.

  • Informs the SDK the ad is buffered and playback is likely to keep up.

    Declaration

    Swift

    optional func videoDisplayIsPlaybackReady(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayIsPlaybackReady:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that is playback ready

  • Informs the SDK the ad’s media buffer is empty and playback will stall.

    Declaration

    Swift

    optional func videoDisplayDidStartBuffering(_ videoDisplay: IMAVideoDisplay!)

    Objective-C

    - (void)videoDisplayDidStartBuffering:(id<IMAVideoDisplay>)videoDisplay;

    Parameters

    videoDisplay

    the IMAVideoDisplay that started buffering