AmpIMAManager
open class AmpIMAManager: UIViewController, IMAAdsLoaderDelegate, IMAAdsManagerDelegate, IMAStreamManagerDelegate
Class in charge of managing the integration between the AMP SDK and the IMA SDK
-
The view used by the player, ads will be shown here as well.
Declaration
Swift
open let videoView: UIView
-
The amp player associated with a specific IMA Manager.
Declaration
Swift
open let ampPlayer: AmpPlayer
-
The current state of the video playback.
Declaration
Swift
open var playbackState: PlaybackState
-
The current buferring state.
Declaration
Swift
open var bufferingState: BufferingState
-
Initializes a new AmpIMAManager with the parameters provided.
Declaration
Swift
public init(ampPlayer: AmpPlayer, videoView: UIView, _ coder: NSCoder? = nil)
Parameters
ampPlayer
The amp player associated with a specific IMA Manager.
videoView
The view used by the player, ads will be shown here as well.
Return Value
A configured instance of an AmpIMAManager.
-
Initializes a new AmpIMAManager to use DAI with the parameters provided.
Declaration
Swift
public convenience init(ampPlayer: AmpPlayer, videoView: UIView, fallbackUrl: String? = nil, _ coder: NSCoder? = nil)
Parameters
ampPlayer
The amp player associated with a specific IMA Manager.
videoView
The view used by the player, ads will be shown here as well.
fallbackUrl
The fallback url in case of DAI fail.
Return Value
A configured instance of an AmpIMAManager.
-
Registers an observer to be notified of player events.
Declaration
Swift
open func registerObserver(_ observer: IMAEventObserver)
Parameters
observer
The observer to be registered.
Return Value
The id of the registered observer.
-
Removes a registered observer.
Declaration
Swift
open func removeObserver(id: Int)
Parameters
id
The id of the observer to be removed.
-
Resumes the current ad if any.
Declaration
Swift
open func resume()
-
Pause the current ad if any.
Declaration
Swift
open func pause()
-
Request ads.
Declaration
Swift
open func requestAds(adsUrl: String, companionView: UIView? = nil)
Parameters
adsUrl
The ads to be requested.
companionView
The view where companions should be shown. Default: nil.
-
Stops the entire module.
Declaration
Swift
open func stop()