OOPulseSession Protocol Reference

Conforms to NSObject
Declared in OOPulseSession.h

Overview

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:].

Methods

– startSessionWithDelegate: required method

Start the ad session. The provided delegate will be notified when to play the content/ads.

- (void)startSessionWithDelegate:(id<OOPulseSessionDelegate>)delegate

Parameters

delegate

The OOPulseSessionDelegate delegate that will be notified.

Discussion

This will trigger an ad break through [OOPulseSessionDelegate startAdBreak] if any prerolls ads are available, otherwise it will trigger the start of the content through [OOPulseSessionDelegate startContentPlayback].

Declared In

OOPulseSession.h

– extendSessionWithContentMetadata:requestSettings:success: required method

Request additional ads for the ad session.

- (void)extendSessionWithContentMetadata:(OOContentMetadata *)contentMetadata requestSettings:(OORequestSettings *)requestSettings success:(OOSessionExtensionSuccessBlock)onSuccess

Parameters

contentMetadata

Information about the content which a requested ad session is to be played with, as well as information targeting the desired campaign(s).

requestSettings

Information about the environment in which the requested ad(s) will play.

onSuccess

The OOSessionExtensionSuccessBlock that will be notified when the session extension completes.

Declared In

OOPulseSession.h

– stopSession required method

Forcefully stop the session.

- (void)stopSession

Discussion

This may be called at any time during a session. No further delegate methods will be called after the session is stopped.

Declared In

OOPulseSession.h

Content event notifications

– contentStarted required method

Notify the session that content playback has started.

- (void)contentStarted

Discussion

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].

Declared In

OOPulseSession.h

– contentPositionChanged: required method

Notify the session that the content playback position has changed, either as a result of seeking or normal playback.

- (void)contentPositionChanged:(NSTimeInterval)position

Parameters

position

The content position in seconds since start.

Discussion

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

Declared In

OOPulseSession.h

– contentPaused required method

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

- (void)contentPaused

Discussion

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

Declared In

OOPulseSession.h

– contentFinished required method

Notify the session that the content has played to completion.

- (void)contentFinished

Discussion

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

Declared In

OOPulseSession.h