GoogleInteractiveMediaAds Framework Reference

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:(nonnull IMAStreamManager *)streamManager
        didReceiveAdEvent:(nonnull 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:(nonnull IMAStreamManager *)streamManager
        didReceiveAdError:(nonnull 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, adPeriodDuration: TimeInterval)

    Objective-C

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

    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

    adPeriodDuration

    the total duration of the current ad period in seconds. This includes ads duration plus slate.