IMAStreamManagerDelegate

@protocol IMAStreamManagerDelegate

A callback protocol for IMAStreamManager.

  • Called when there is an IMAAdEvent.

    Declaration

    Swift

    func streamManager(_ streamManager: IMAStreamManager!, didReceive event: IMAAdEvent!)

    Objective-C

    - (void)streamManager:(IMAStreamManager *)streamManager
        didReceiveAdEvent:(IMAAdEvent *)event;

    Parameters

    streamManager

    the IMAStreamManager receiving the event

    event

    the IMAAdEvent received

  • Called when there is an IMAAdEvent.

    Declaration

    Swift

    func streamManager(_ streamManager: IMAStreamManager!, didReceive error: IMAAdError!)

    Objective-C

    - (void)streamManager:(IMAStreamManager *)streamManager
        didReceiveAdError:(IMAAdError *)error;

    Parameters

    streamManager

    the IMAStreamManager receiving the error

    error

    the IMAAdError received

  • Called when the ad is playing to give updates about ad progress.

    Declaration

    Swift

    optional func streamManager(_ streamManager: IMAStreamManager!, adDidProgressToTime time: TimeInterval, adDuration: TimeInterval, adPosition: Int, totalAds: Int, adBreakDuration: TimeInterval)

    Objective-C

    - (void)streamManager:(IMAStreamManager *)streamManager
        adDidProgressToTime:(NSTimeInterval)time
                 adDuration:(NSTimeInterval)adDuration
                 adPosition:(NSInteger)adPosition
                   totalAds:(NSInteger)totalAds
            adBreakDuration:(NSTimeInterval)adBreakDuration;

    Parameters

    streamManager

    the IMAStreamManager tracking ad playback

    time

    the current ad playback time in seconds

    adDuration

    the total duration of the current ad in seconds

    adPosition

    the ad position of the current ad in the current ad break

    totalAds

    the total number of ads in the current ad break

    adBreakDuration

    the total duration of the current ad break in seconds