PTAdPolicySelector Protocol Reference
| 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 *)infoParameters
- 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.hselectPolicyForAdBreak:
Selects the ad break policy for next ad break.
- (PTAdBreakPolicyType)selectPolicyForAdBreak:(PTAdPolicyInfo *)infoParameters
- 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.hselectPolicyForSeekIntoAd:
Selects the ad policy when the user seeks into the middle of an ad
- (PTAdPolicyType)selectPolicyForSeekIntoAd:(PTAdPolicyInfo *)infoParameters
- 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.hselectWatchedPolicyForAdBreak:
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 *)infoDiscussion
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