com.adobe.mediacore
Class DefaultAdPolicySelector

java.lang.Object
  extended by com.adobe.mediacore.DefaultAdPolicySelector
All Implemented Interfaces:
AdPolicySelector

public class DefaultAdPolicySelector
extends Object
implements AdPolicySelector


Constructor Summary
DefaultAdPolicySelector(MediaPlayerItem mediaPlayerItem)
           
 
Method Summary
 List<AdBreakPlacement> selectAdBreaksToPlay(AdPolicyInfo adPolicyInfo)
          Select ad breaks after seek.
 AdBreakPolicy selectPolicyForAdBreak(AdPolicyInfo adPolicyInfo)
          Select policy for the provided ad break.
 AdPolicy selectPolicyForSeekIntoAd(AdPolicyInfo adPolicyInfo)
          Select policy for the provided ad break.
 AdBreakAsWatched selectWatchedPolicyForAdBreak(AdPolicyInfo adPolicyInfo)
          Select watched policy for the provided ad break.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAdPolicySelector

public DefaultAdPolicySelector(MediaPlayerItem mediaPlayerItem)
Method Detail

selectPolicyForAdBreak

public AdBreakPolicy selectPolicyForAdBreak(AdPolicyInfo adPolicyInfo)
Description copied from interface: AdPolicySelector
Select policy for the provided ad break. The policy will instruct the media player on how to proceed after the ad break has been viewed by the user. Note: The P-SDK considers an ad break as being view when the content is changed during playback. This change can occur due to a seek (if the application allows the user to perform this operation) or due to ad break playback complete. The application can choose to either: - keep the ad break on the timeline - remove the ad break from the timeline - remove the ad break and restore main content (for live items)

Specified by:
selectPolicyForAdBreak in interface AdPolicySelector
Returns:
The desired ad policy

selectAdBreaksToPlay

public List<AdBreakPlacement> selectAdBreaksToPlay(AdPolicyInfo adPolicyInfo)
Description copied from interface: AdPolicySelector
Select ad breaks after seek. An ArrayList of AdBreakPlacement will be returned.

Specified by:
selectAdBreaksToPlay in interface AdPolicySelector
Returns:
The desired Ad Break policy

selectPolicyForSeekIntoAd

public AdPolicy selectPolicyForSeekIntoAd(AdPolicyInfo adPolicyInfo)
Description copied from interface: AdPolicySelector
Select policy for the provided ad break. The policy will instruct the media player on how to proceed after the ad was seeked into.

Specified by:
selectPolicyForSeekIntoAd in interface AdPolicySelector
Returns:
Ad Breaks to play

selectWatchedPolicyForAdBreak

public AdBreakAsWatched selectWatchedPolicyForAdBreak(AdPolicyInfo adPolicyInfo)
Description copied from interface: AdPolicySelector
Select watched policy for the provided ad break. The policy will instruct when to mark ad break as watched.

Specified by:
selectWatchedPolicyForAdBreak in interface AdPolicySelector
Returns:
The desired ad policy