---
title: Delivering ad interstitials in podcast streams
framework: http-live-streaming
role: article
role_heading: Article
path: http-live-streaming/delivering-ad-interstitials
---

# Delivering ad interstitials in podcast streams

Insert ad interstitials into HTTP Live Streaming (HLS) media playlists.

## Overview

Overview An HLS interstitial is alternate content, such as an advertisement, that the player inserts into a stream at a specific point without altering the primary media. Use the #EXT-X-DATERANGE tag in your HLS media playlists to deliver client-side interstitial advertising. Place an exact segment boundary at each interstitial cue point in your encoded media when possible. Use X-SNAP to let the player correct splice timing automatically. Include CUE=POST when you deliver a post-roll interstitial. Use the following attributes with #EXT-X-DATERANGE for interstitial delivery:  |  |  |  |   |  |  |  |   |  |  |  |   |  |  |  |   |  |  |  |   |  |  |  |   |  |  |  |   |  |  |  |   |  |  |  |  note: Include either PLANNED-DURATION or DURATION for interstitials delivered with X-ASSET-URI; choose the option that best aligns with your ad decisioning process. If both are provided, DURATION takes precedence. For interstitials delivered with X-ASSET-LIST, the duration comes from the JSON response instead. Interstitial media can be delivered using one of two methods: Reference the interstitial directly with the asset URI Use X-ASSET-URI when you know the interstitial media playlist and it’s available when you create the HLS playlist. This attribute points directly to the interstitial’s HLS media playlist. #EXT-X-DATERANGE:ID="ad_break_1",CLASS="com.apple.hls.interstitial",START-DATE="2023-10-27T10:00:00Z",PLANNED-DURATION=30.0,X-ASSET-URI="https://ad-server.example.com/ads/midroll1.m3u8",X-RESUME-OFFSET=0,X-TIMELINE-OCCUPIES="RANGE",X-TIMELINE-STYLE="PRIMARY" Resolve interstitials at playback Use X-ASSET-LIST when you need flexibility to determine the interstitial media at playback or download time, or when no interstitial may be available. This attribute points to a JSON response that contains the interstitial media playlist information. #EXT-X-DATERANGE:ID="ad_break_1",CLASS="com.apple.hls.interstitial",START-DATE="2023-10-27T10:00:00Z",PLANNED-DURATION=30.0,X-ASSET-LIST="https://ad-server.example.com/ads/midroll1.json",X-RESUME-OFFSET=0,X-TIMELINE-OCCUPIES="RANGE",X-TIMELINE-STYLE="PRIMARY" The JSON response specified by X-ASSET-LIST must contain an ASSETS array. Each object in the array represents an interstitial asset and includes the following keys: {   "ASSETS": [     {       "URI": "https://example.com/ads/interstitial_1.m3u8",       "DURATION": 15.0     }   ] } When you have no ad to place, use an empty list. The player skips the ad break and continues playing the main media. {   "ASSETS": [] }

## See Also

- [Authoring multivariant and media playlists](http-live-streaming/multivariant-and-media-playlists.md)
- [Encoding media for HLS](http-live-streaming/encoding-media.md)
- [Configuring delivery for HLS](http-live-streaming/configuring-delivery.md)
- [Delivering WebVTT subtitles and captions in HLS](http-live-streaming/delivering-subtitles-and-captions.md)
- [Reviewing sample playlists and validating streams](http-live-streaming/examples-and-validation.md)
- [Handling downloads and playback](http-live-streaming/downloads-and-playback.md)
