OOPulseSession

@protocol OOPulseSession <NSObject>

This protocol is used to interact with an ad session.

You must notify this object of the following events:

The session will notify you through the delegate provided to -[OOPulseSession startSessionWithDelegate:].

  • Notify the session that content playback has started.

    This should only be called after your delegate has been instructed to play the content through -[OOPulseSessionDelegate startContentPlayback], or if you have previously paused it with a call to -[OOPulseSession contentPaused].

    Declaration

    Objective-C

    - (void)contentStarted;

    Swift

    func contentStarted()
  • Notify the session that the content playback position has changed, either as a result of seeking or normal playback.

    This may trigger an ad break through -[OOPulseSessionDelegate startAdBreak:] if any midroll ads are available.

    Declaration

    Objective-C

    - (void)contentPositionChanged:(NSTimeInterval)position;

    Swift

    func contentPositionChanged(_ position: TimeInterval)

    Parameters

    position

    The content position in seconds since start.

  • Notify the session that content playback has been paused by the user.

    This may trigger a pause ad to display through -[OOPulseSessionDelegate showPauseAd:], if such an ad is available.

    Declaration

    Objective-C

    - (void)contentPaused;

    Swift

    func contentPaused()
  • Notify the session that the content has played to completion.

    This may trigger an ad break through -[OOPulseSessionDelegate startAdBreak:] if any postroll ads are available.

    Declaration

    Objective-C

    - (void)contentFinished;

    Swift

    func contentFinished()