

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# DASH 广告可用时长
<a name="dash-ad-avail-duration"></a>

在播放过程中，当 AWS Elemental MediaTailor 遇到广告可用性时，它会将部分或全部广告替换为广告。 MediaTailor 在广告开始时开始替换广告，包括如下广告：
+ 如果广告可用性指定了持续时间，则在不覆盖随后的内容的情况下，在不覆盖随后的内容的情况下， MediaTailor 包含尽可能多的广告。
+ 如果未提供持续时间，则在广告有效期结束之前 MediaTailor 包含广告。对于多周期清单来说，这就是周期的结束。对于单周期清单，活动到此结束。 MediaTailor 不会在广告结束后播放广告，当广告到达结尾时，会截断当前广告，而不是覆盖随后的内容。

**如何 AWS Elemental MediaTailor 查看广告投放时长**  
AWS Elemental MediaTailor 按以下顺序搜索持续时间设置：

1. `Event` `duration`

1. 对于拼接插入，搜索 `scte35:BreakDuration` `duration`

1. 对于时间信号，搜索 `scte35:SegmentationDescriptor` `segmentationDuration`

如果找 AWS Elemental MediaTailor 不到这些设置中的任何一个，则它会在没有持续时间的情况下管理广告收录。

以下示例显示了具有 `duration` 的 `Event`。

```
  <Period start="PT444806.040S" id="123586" duration="PT15.000S">
          <EventStream timescale="90000" schemeIdUri="urn:scte:scte35:2013:xml">
            <Event duration="1350000">
              <scte35:SpliceInfoSection protocolVersion="0" ptsAdjustment="180832" tier="4095">
                <scte35:SpliceInsert spliceEventId="4026531855" spliceEventCancelIndicator="false" outOfNetworkIndicator="true" spliceImmediateFlag="false" uniqueProgramId="1" availNum="1" availsExpected="1">
                  <scte35:Program><scte35:SpliceTime ptsTime="5672624400"/></scte35:Program>
                  <scte35:BreakDuration autoReturn="true" duration="1350000"/>
                </scte35:SpliceInsert>
              </scte35:SpliceInfoSection>
            </Event>
              ...
```

以下示例显示未指定持续时间的广告效用。`Event` 没有 `duration`，`scte35:SpliceInsert` 元素不包含 `scte35:BreakDuration` 子元素。

```
  <Period start="PT444836.720S" id="123597" duration="PT12.280S">
          <EventStream timescale="90000" schemeIdUri="urn:scte:scte35:2013:xml">
            <Event>
              <scte35:SpliceInfoSection protocolVersion="0" ptsAdjustment="180832" tier="4095">
                <scte35:SpliceInsert spliceEventId="4026531856" spliceEventCancelIndicator="false" outOfNetworkIndicator="true" spliceImmediateFlag="false" uniqueProgramId="1" availNum="1" availsExpected="1">
                  <scte35:Program><scte35:SpliceTime ptsTime="5675385600"/></scte35:Program>
                </scte35:SpliceInsert>
              </scte35:SpliceInfoSection>
            </Event>
            ...
```