All Products
Search
Document Center

Parameter pass-through for HLS encryption

Last Updated: Jun 09, 2022

This topic provides the operation and configuration guidelines for parameter pass-through for HTTP Live Streaming (HLS) encryption.

Features

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 provided by 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.

Procedure

  1. Log on to the ApsaraVideo VOD console.

  2. In the left-side navigation pane, click 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. In the left-side navigation pane of the domain name, click Video Related.

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

Note

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.

Notice

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