BCOVCuePointProgressPolicy Class Reference
Inherits from | NSObject |
---|---|
Declared in | BCOVCuePointProgressPolicy.h |
Overview
This policy provides clients of BCOVPlayerSDK with the means of specifying the behavior of code that acts in response to cue point events. The most common application for this is in creating ad policies: the playhead reaches a cue point that indicates an ad should be shown, and an instance of this policy is provided by the client code to specify how the player should behave, with respect to:
- Which cue points should be processed by the code consulting the policy.
- The time (playhead position) at which playback should resume once the cue
points have been processed. This is specified using one of the cue points
that was passed into the policy, or
nil
(which indicates that the content should resume from its current playhead position).
– applyToEvent:
Returns a BCOVCuePointProgressPolicyResult that specifies which cue points are to be processed by the code consulting this policy, as well as the position at which playback should resume once all cue points have been processed.
- (BCOVCuePointProgressPolicyResult *)applyToEvent:(NSDictionary *)cuePointEvent
Parameters
cuePointEvent |
A dictionary containing cue point event information, as specified in the BCOVPlaybackController cue point delegate method. |
---|
Return Value
A policy result for the specified cue point event.
Discussion
Returns a BCOVCuePointProgressPolicyResult that specifies which cue points are to be processed by the code consulting this policy, as well as the position at which playback should resume once all cue points have been processed.
This method is called by the consumer of the cue point progress policy. In most cases, that consumer is an advertising plugin to the Brightcove Player SDK, not the client (app) of the Player SDK. A custom cue point policy should override this method if a policy cannot be produced using a convenience factory class method.
Declared In
BCOVCuePointProgressPolicy.h
ignoringPreviouslyProcessedCuePoints
Whether the policy should tell its caller to ignore cue points that it has already been instructed to process.
@property (nonatomic, readonly) BOOL ignoringPreviouslyProcessedCuePoints
Discussion
Whether the policy should tell its caller to ignore cue points that it has already been instructed to process.
Declared In
BCOVCuePointProgressPolicy.h
+ progressPolicyProcessingCuePoints:resumingPlaybackFrom:ignoringPreviouslyProcessedCuePoints:
Convenience factory method that returns a cue point progress policy configured according to the specified parameters.
+ (instancetype)progressPolicyProcessingCuePoints:(BCOVProgressPolicyCuePointsToProcess)cuePointsToProcess resumingPlaybackFrom:(BCOVProgressPolicyResumePosition)resumePosition ignoringPreviouslyProcessedCuePoints:(BOOL)ignorePrevious
Parameters
cuePointsToProcess |
A BCOVProgressPolicyCuePointsToProcess that configures the returned policy to tell its caller which cue points should be processed, out of the cue points in a given cue point event. |
---|---|
resumePosition |
A BCOVProgressPolicyResumePosition that configures the returned policy to tell its caller where content playback should resume, once it has processed all specified cue points. |
ignorePrevious |
Whether the returned policy should tell its caller to ignore cue points that it has already been instructed to process. |
Return Value
A cue point progress policy configured with the specified settings.
Discussion
Convenience factory method that returns a cue point progress policy configured according to the specified parameters.
Declared In
BCOVCuePointProgressPolicy.h