Conforms to NSObject
Declared in PTAdPolicySelector.h

Overview

An Ad Policy selector protocol for enforcing ad behaviors. Applications can confirm to this protocol by implementing all the required methods or extend the existing default policy selector class to customize specific behaviors.

Tasks

Policy Selection

  • – selectWatchedPolicyForAdBreak:

    Policy to define when to mark an ad break as watched. The value can be one of the options defined in the PTAdBreakIsWatched enumeration with PTAdBreakIsWatchedOnBegin as default. Modes: PTAdBreakAsWatchedOnBegin, PTAdBreakAsWatchedOnEnd, PTAdBreakAsWatchedNever

    required method
  • – selectPolicyForAdBreak:

    Selects the ad break policy for next ad break.

    required method
  • – selectAdBreaksToPlay:

    Selects the ad breaks to be played when the user seeks over one or more ad breaks Default behavior is to seek to the ad breaks that is closest to the requested seek time. If that ad break is already watched, seek is performed to the requested time immediately.

    required method
  • – selectPolicyForSeekIntoAd:

    Selects the ad policy when the user seeks into the middle of an ad

    required method

Instance Methods

selectAdBreaksToPlay:

Selects the ad breaks to be played when the user seeks over one or more ad breaks Default behavior is to seek to the ad breaks that is closest to the requested seek time. If that ad break is already watched, seek is performed to the requested time immediately.

- (NSArray *)selectAdBreaksToPlay:(PTAdPolicyInfo *)info

Parameters

adPolicyInfo

Context for selecting the right policy.

Return Value

an array of PTAdBreak instances to be played.

Discussion

Selects the ad breaks to be played when the user seeks over one or more ad breaks Default behavior is to seek to the ad breaks that is closest to the requested seek time. If that ad break is already watched, seek is performed to the requested time immediately.

Declared In

PTAdPolicySelector.h

selectPolicyForAdBreak:

Selects the ad break policy for next ad break.

- (PTAdBreakPolicyType)selectPolicyForAdBreak:(PTAdPolicyInfo *)info

Parameters

adPolicyInfo

Context for selecting the right policy.

Return Value

a valid PTAdBreakPolicyType value.

Discussion

Selects the ad break policy for next ad break.

Declared In

PTAdPolicySelector.h

selectPolicyForSeekIntoAd:

Selects the ad policy when the user seeks into the middle of an ad

- (PTAdPolicyType)selectPolicyForSeekIntoAd:(PTAdPolicyInfo *)info

Parameters

adPolicyInfo

Context for selecting the right policy.

Return Value

a valid PTAdPolicyType value.

Discussion

Selects the ad policy when the user seeks into the middle of an ad

Declared In

PTAdPolicySelector.h

selectWatchedPolicyForAdBreak:

Policy to define when to mark an ad break as watched. The value can be one of the options defined in the PTAdBreakIsWatched enumeration with PTAdBreakIsWatchedOnBegin as default. Modes: PTAdBreakAsWatchedOnBegin, PTAdBreakAsWatchedOnEnd, PTAdBreakAsWatchedNever

- (PTAdBreakAsWatched)selectWatchedPolicyForAdBreak:(PTAdPolicyInfo *)info

Discussion

Policy to define when to mark an ad break as watched. The value can be one of the options defined in the PTAdBreakIsWatched enumeration with PTAdBreakIsWatchedOnBegin as default. Modes: PTAdBreakAsWatchedOnBegin, PTAdBreakAsWatchedOnEnd, PTAdBreakAsWatchedNever

Declared In

PTAdPolicySelector.h