

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 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>
            ...
```