Pauseroll

@objc(YMAPauseroll)
public protocol Pauseroll

This class is responsible for playing pauseroll ad breaks.

  1. delegate
  2. instreamAdBreak
  3. prepare(with:)
  4. play(with:)
  5. pause()
  6. resume()
  7. invalidate()

delegate

This object will be notified about the pauseroll playback events.

Declaration

Swift

var delegate: InstreamAdBreakDelegate? { get set }

instreamAdBreak

InstreamAdBreak associated with this pauseroll.

Declaration

Swift

var instreamAdBreak: InstreamAdBreak { get }

prepare(with:)

Prepare pauseroll playback. Note that prepare should always be called before play method.

Declaration

Swift

func prepare(with adPlayer: InstreamAdPlayer)

Parameters

adPlayer

player to play pauseroll.

adPlayer

player to play pauseroll.

play(with:)

Start pauseroll playback. Note that you can call play only on a prepared pauseroll.

Declaration

Swift

func play(with adView: InstreamAdView)

Parameters

adView

the view in which pauseroll will be displayed.

adView

the view in which pauseroll will be displayed.

pause()

Pause pauseroll playback.

Declaration

Swift

func pause()

resume()

Resume paused pauseroll playback.

Declaration

Swift

func resume()

invalidate()

Invalidate pauseroll playback. Call this method right before ad player is invalidated. To resume playback after invalidation you should prepare and start pauseroll again.

Declaration

Swift

func invalidate()