INPulseLiveSession
Objective-C
@protocol INPulseLiveSession <NSObject>
Swift
protocol INPulseLiveSession : NSObjectProtocol
This protocol is used to interact with a live session.
The live session does not trigger ads based on content progress and video player state like the standard OOPulseSession
.
Instead, it makes the ad break data available to the integration and it’s then up to the integration code to get the list of ads from each INPulseLiveAdBreak
and trigger the ads when desired.
The live session currently only supports linear video ads.
-
Request additional ads for the ad session.
Declaration
Objective-C
- (void)extendSessionWithContentMetadata:(OOContentMetadata *)contentMetadata requestSettings:(OORequestSettings *)requestSettings success: (OOSessionExtensionSuccessBlock)onSuccess;
Swift
func extend(with contentMetadata: OOContentMetadata!, requestSettings: OORequestSettings!, success onSuccess: OOSessionExtensionSuccessBlock!)
Parameters
contentMetadata
Information about the content which a requested ad session is to be played with.
requestSettings
Information about the environment in which the requested ad(s) will play.
onSuccess
The delegate that will be called when the session extension completes.
-
Get access to a specific preroll or postroll ad break.
Declaration
Objective-C
- (id<INPulseLiveAdBreak>)getAdBreak:(OOAdBreakType)breakType;
Swift
func getAdBreak(_ breakType: OOAdBreakType) -> (any INPulseLiveAdBreak)!
Parameters
breakType
The type of ad break you want to get.
Return Value
The
INPulseLiveAdBreak
that was requested, if available. -
Get access to a specific midroll ad break.
Declaration
Objective-C
- (id<INPulseLiveAdBreak>)getAdBreak:(OOAdBreakType)breakType atIndex:(float)breakIndex;
Swift
func getAdBreak(_ breakType: OOAdBreakType, atIndex breakIndex: Float) -> (any INPulseLiveAdBreak)!
Parameters
breakType
The type of ad break you want to get.
breakIndex
The index/position of a midroll break.
Return Value
The
INPulseLiveAdBreak
that was requested, if available.