TVSDK handles time range errors according to the specific problem, either merging or reordering the improperly defined time ranges.
TVSDK deals with timeRanges
errors by doing default merging and reordering. First, it sorts customer-defined time ranges by the begin time. Based on this sorting order, it then merges adjacent ranges, and joins them if there are subsets and intersections among the ranges.
TVSDK handles time-range errors as follows:
timeRange
in the conflicting group.TVSDK handles signaling-mode conflicts as follows:
When the server does not return valid AdBreaks
:
NOPTimelineOperation
for the empty AdBreak
. No ad plays.TVSDK responds to erroneous time range specifications by merging or replacing the time ranges as appropriate.
In the following example, four intersecting DELETE time ranges are defined. TVSDK merges the four time ranges into one, so that the actual delete range is from 0-50s.
"time-ranges": {
"type": "delete",
"time-range-list": [ {
"begin": 10000,
"end": 35000
}, {
"begin": 20000,
"end": 50000
}, {
"begin": 0,
"end": 30000
}, {
"begin": 30000,
"end": 40000
} ]
}
In the following example, four REPLACE time ranges are defined with conflicting time ranges. In this case, TVSDK replaces 0-50s with 25s of ads. It goes with the first replacement duration in the sort order, because there are conflicts in subsequent ranges.
"time-ranges": {
"type": "replace",
"time-range-list": [ {
"begin": 10000,
"end": 35000,
"replace-duration": 15000
}, {
"begin": 20000,
"end": 50000,
"replace-duration": 20000
}, {
"begin": 0,
"end": 30000,
"replace-duration": 25000
}, {
"begin": 30000,
"end": 40000,
"replace-duration": 30000
} ]
}