IMAEventObserver
@objc public protocol IMAEventObserver
Protocol used to receive IMA events.
-
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 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.