Inroll

@objc(YMAInroll)
public protocol Inroll

This class is responsible for playing inroll ad breaks.

  • This object will be notified about the inroll playback events.

    Declaration

    Swift

    var delegate: InstreamAdBreakDelegate? { get set }
  • InstreamAdBreak associated with this inroll.

    Declaration

    Swift

    var instreamAdBreak: InstreamAdBreak { get }
  • Prepare inroll playback. Note that prepare should always be called before play method.

    Declaration

    Swift

    func prepare(with adPlayer: InstreamAdPlayer)

    Parameters

    adPlayer

    player to play inroll.

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

    Declaration

    Swift

    func play(with adView: InstreamAdView)

    Parameters

    adView

    the view in which inroll will be displayed.

  • Pause inroll playback.

    Declaration

    Swift

    func pause()
  • Resume paused inroll playback.

    Declaration

    Swift

    func resume()
  • Invalidate inroll playback. Call this method right before ad player is invalidated. To resume playback after invalidation you should prepare and start inroll again.

    Declaration

    Swift

    func invalidate()