Default and customized playback behavior with ads

The behavior of media playback is affected by seeking, pausing, fast forward or rewind (trick play mode), and the inclusion of advertising.

To override the default behavior, use AdPolicySelector.

IMPORTANT

TVSDK does not provide a way to disable seeking during ads. Adobe recommends that you configure your application to disable seeking during ads.

The following table describes how TVSDK handles ads and ad breaks during playback:

Video activity Default TVSDK behavior policy Customization available through AdPolicySelector
During normal play, an ad break is encountered.
  • For live/linear, plays the ad break, even if the ad break has already been watched.
  • For VOD, plays the ad break and marks the ad break as watched.
Specify a different policy for the ad break by using selectPolicyForAdBreak.
Your application seeks forward over ad break(s) into main content. Plays the last unwatched ad break that was skipped over and resumes playback at the desired seek position when the break(s) playback is complete. Select which skipped break to play by using selectAdBreaksToPlay.
Your application seeks backward over ad break(s) into main content. Skips to the desired seek position without playing ad breaks. Select which skipped break to play by using selectAdBreaksToPlay.
Your application seeks forward into an ad break. Plays from the beginning of the ad in which the seek ended. Specify a different ad policy for the ad break and for the specific ad where the seek ended by using selectPolicyForSeekIntoAd.
Your application seeks backward into an ad break. Plays from the beginning of the ad in which the seek ended. Specify a different ad policy for the ad break and for the specific ad in which the seek ended by using selectPolicyForSeekIntoAd.
Your application seeks forward or backward over watched ad break(s) into main content. If the last ad break skipped has already been watched, skips to the user-selected seek position. Select which of the skipped breaks to play using selectAdBreaksToPlay and determine which breaks have already been watched by using TimeLineItem.watched .

Important: By default, TVSDK marks an ad break as watched immediately after entering the first ad in the ad break.

Your application seeks forward or backward over one or more ad breaks and drops into a watched ad break. Skips the ad break and seeks to the position immediately following the ad break. Specify a different ad policy for the ad break (with the watched status set to true) and for the specific ad where the seek ended by using selectPolicyForSeekIntoAd.
Your application enters trick-play (DVR mode). Play rate can be negative (rewind) or greater than 1 (fast forward). Skips all ads during fast forward or rewind, plays the last break skipped after trick play ends, and skips to the user-selected trick play position when that break finishes playback. Select which of the skipped breaks to play after trick play ends using selectAdBreaksToPlay.
Your application seeks forward over ads that were inserted using custom ad markers. Skips to the user-selected seek position. For more information, see Display a seek scrub bar with the current playback position...

On this page