Control Apple HLS client caching with Wowza Streaming Engine

The M3U playlist tag EXT-X-ALLOW-CACHE tag indicates whether iOS-based devices can download media segments for later replay. This article describes how to configure Wowza Streaming Engine™ media server software properties to create a properly formatted EXT-X-ALLOW-CACHE tag in chunklist.m3u8 playlist files that are delivered to iOS-based devices.

Note: Wowza Streaming Engine 4.0 or later or Wowza Media Server™ 3.5.3 or later is required.

About the EXT-X-ALLOW-CACHE tag


The EXT-X-ALLOW-CACHE tag in an M3U playlist indicates whether the client can cache downloaded media segments for later replay. It can appear once anywhere in the playlist file and applies to all segments in the playlist. Its format is:

#EXT-X-ALLOW-CACHE:<YES|NO>

If the playlist file contains the EXT-X-ALLOW-CACHE tag and its value is NO, then the client can't cache downloaded media segments after they've been played. Otherwise, the client can cache downloaded media segments indefinitely for later replay. By setting the value to YES, Wowza Streaming Engine tells the player that it can cache the content. For VOD playback, this may be acceptable but for live content, this caching could the player to play old content instead of the current content. If the tag isn't set at all, then the player will decide whether or not to cache the content.

For more information, see the HTTP Live Streaming draft-pantos-http-live-streaming-10 specification.

Configure the EXT-X-ALLOW-CACHE tag in Wowza Streaming Engine


This section describes how configure the properties that format the EXT-X-ALLOW-CACHE tag in M3U playlists. You can configure the properties in the Application.xml file for VOD, live, and nDVR applications.

For each property, the value true enables caching (#EXT-X-ALLOW-CACHE:YES), and the value false disables caching (#EXT-X-ALLOW-CACHE:NO). If a property isn't set, then the following defaults are used:

  • For VOD streaming, the header isn't displayed.
  • For live and nDVR streaming, the header is set to #EXT-X-ALLOW-CACHE:NO.

Configure the tag for Apple HLS VOD streaming

  1. Set up a VOD application by following the instructions in the "Configuration" section in Set up video-on-demand streaming.
     
  2. Navigate to [install-dir]/conf/[application]/ and open Application.xml in a text editor.
  3. Add the vodCupertinoPlaylistAllowCaching and cupertinoEnableExtXAllowCache properties to the <HTTPStreamer>/<Properties> container element. The XML looks like this:
    <Property>
        <Name>vodCupertinoPlaylistAllowCaching</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>
    <Property>
        <Name>cupertinoEnableExtXAllowCache</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>

  4. Restart Wowza Streaming Engine.

Configure the tag for Apple HLS live streaming

  1. Set up a live application by following the instructions in the "Configuration" section in one of the following articles (select the article for your encoder):
  2. Navigate to [install-dir]/conf/[application]/ and open Application.xml a text editor.
  3. Add the cupertinoAllowCaching property to the <LiveStreamPacketizer>/<Properties> container element. The XML looks like this:
    <Property>
        <Name>cupertinoAllowCaching</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>
  4. Restart Wowza Streaming Engine.

Configure the tag for Apple HLS nDVR streaming

  1. Set up an application for nDVR streaming by following the instructions in the "Basic configuration" section in Set up and run Wowza nDVR in Wowza Streaming Engine.
     
  2. Navigate to [install-dir]/conf/[application]/ and open Application.xml in a text editor.
  3. Add the dvrCupertinoPlaylistAllowCaching property to the <HTTPStreamer>/<Properties> container element. The XML looks like this:
    <Property>
         <Name>dvrCupertinoPlaylistAllowCaching</Name>
         <Value>true</Value>
         <Type>Boolean</Type>
    </Property>
  4. Restart Wowza Streaming Engine.