Adaptive Media Player

AmpIMA Docs

IMAEventObserver

@objc public protocol IMAEventObserver

Protocol used to receive IMA events.

  • Callback called when the internal IMA Manager is setup.

    Declaration

    Swift

    @objc optional func onIMASetup(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when the playback state of the manager changes.

    Declaration

    Swift

    @objc optional func onIMAPlaybackStateChanged(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when the buffering state of the manager changes.

    Declaration

    Swift

    @objc optional func onIMABufferingStateChanged(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when the position of the manager changes.

    Declaration

    Swift

    @objc optional func onIMAPositionChange(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when an ad starts.

    Declaration

    Swift

    @objc optional func onIMAAdStarted(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when an ad ends.

    Declaration

    Swift

    @objc optional func onIMAAdEnded(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when an ad pauses.

    Declaration

    Swift

    @objc optional func onIMAAdPaused(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when an ad resumes.

    Declaration

    Swift

    @objc optional func onIMAAdResumed(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when an ad is requested.

    Declaration

    Swift

    @objc optional func onIMAAdsRequested(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when ad view is tapped.

    Declaration

    Swift

    @objc optional func onIMATap(_ imaManager: AmpIMAManager)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

  • Callback called when the ima manager experiences an error.

    Declaration

    Swift

    @objc optional func onIMAError(_ imaManager: AmpIMAManager, error: NSError)

    Parameters

    imaManager

    The instance of the AMP IMA Manager that sends the event.

    error

    The error sent.

  • Callback called when the ima manager receive a event.

    Declaration

    Swift

    @objc optional func onAdManager(_ adManager: IMAAdsManager, didReceive event: IMAAdEvent)

    Parameters

    adManager

    The IMAAdsManager.

    event

    The IMAAdEvent.