All Products
Document Center

ApsaraVideo VOD:Parameter pass-through for HLS encryption

Last Updated:Jul 28, 2023

This topic describes how to configure parameter pass-through for HTTP Live Streaming (HLS) encryption.


After you enable parameter pass-through for HLS encryption, you can rewrite M3U8 files that are transmitted over HLS.

To accelerate the delivery of HLS content, Alibaba Cloud CDN rewrites the #EXT-X-KEY tag in an M3U8 file that is transmitted over HLS. After the #EXT-X-KEY tag is rewritten, the specified parameter name and value are added to the end of the URI attribute in the tag to decrypt the M3U8 file. The value of the parameter is carried in the client request. By default, the MtsHlsUriToken parameter is rewritten.

For more information about the technical principles and application scenarios of M3U8 encryption and rewrite, see M3U8 encryption and rewrite.


Cross-origin resource sharing (CORS) is configured. For more information, see Configure CORS.


  1. Log on to the ApsaraVideo VOD console.

  2. In the left-side navigation pane, find Configuration Management.

  3. Choose CDN Configuration > Domain Names. The Domain Names page is displayed.

  4. Find the domain name that you want to configure and click Configure in the Actions column.

  5. On the page that appears, click Video Related.

  6. In the Encrypted Playback section, turn on Parameter Pass-through for HLS Encryption.p181836


After you enable the parameter pass-through for HLS encryption feature, the MtsHlsUriToken parameter will be overwritten in decryption requests when users attempt to play HLS-encrypted videos.

Configuration example

After you turn on Parameter Pass-through for HLS Encryption in the ApsaraVideo VOD console, the MtsHlsUriToken parameter is used by default.

A client request contains the MtsHlsUriToken parameter. The value of this parameter is test. To decrypt the M3U8 file, Alibaba Cloud CDN adds MtsHlsUriToken=test to the end of the URI attribute in the #EXT-X-KEY tag.


Alibaba Cloud Gov Cloud does not support parameter pass-through for HLS encryption.