TVSDK supports the programmatic deleting and replacing of ad content in VOD streams.
The delete and replace feature extends the custom ad markers feature. Custom ad markers mark sections of the main content as ad-related content periods. In addition to marking these time ranges, you can also delete and replace time ranges.
The following changes in TVSDK support ad deletion and replacement.
PTTimeRangeCollection is a public class that defines a predefined set of ranges and a type:
property PTTimeRangeCollectionType type indicates the type of time range.
property NSArray* ranges is used to set the time ranges.
The expected type of objects in the array are
All the objects of the array must be the same type.
PTTimeRangeCollectionType is an enum that defines the behavior for the ranges that are defined in the
PTTimeRangeCollectionTypeMarkRanges: The type of the ranges is Mark. The ranges are used for marking the ranges in the content as Ads.
PTTimeRangeCollectionTypeDeleteRanges: The type of the ranges is Delete. The defined ranges are removed from the main content before ad insertion.
PTTimeRangeCollectionTypeReplaceRanges: The type of the ranges is Replace. The defined ranges are replaced from the main with Ads (Ad signaling mode is set to
PTReplacementTimeRange - New public class that defines a single range of the
property CMTimeRange range- Defines the start and duration of the range.
property long replacementDuration- If the type of the
replacementDurationis used to create a placement opportunity (ad insertion) with a duration of
replacementDuration. If the
replacementDurationis not set, the ad server will determine the duration and number of ads for that placement opportunity.
PTAdSignalingModeCustomTimeRanges- Added a new type of
PTAdSignalingMode. This mode is used in conjunction with the
PTTimeRangeCollectionReplacefor ad insertion based on the replacement ranges.
property PTTimeRangeCollection* timeRangeCollection- For setting the time ranges used in the mark/delete/replace ranges in the playback content.
property NSArray* externalAdRanges- This property was previously used to define C3 ranges for marking. It is now deprecated, as these ranges are set via