TVSDK provides classes and methods that you can use to customize the playback behavior of content that contains advertising.
The following API elements are useful for customizing playback:
API element | Content that supports advertising |
---|---|
AdvertisingMetadata | Control whether an ad break should be marked as having been watched by a viewer, and if yes, when to mark it. Set and get the watched policy using setAdBreakAsWatched and getAdBreakAsWatched. |
AdBreakPolicy | Enumerates possible playback policies for ad breaks. |
AdPolicy | Enumerates possible playback policies for ads. |
AdPolicySelector | Interface that allows customization of TVSDK ad behavior. |
DefaultAdPolicySelector | Class that implements the default TVSDK behavior. Your application can override this class to customize the default behaviors without implementing the complete interface. |
MediaPlayer |
Important: getLocalTime in MediaPlayer returns the current time relative to the original content, without dynamically spliced ads. getLocalTime in AdBreak returns the start time of the break relative to the original content. |
AdBreak | isWatched property. Indicates whether the viewer has watched the ad. |