This topic describes how to configure parameter pass-through for HTTP Live Streaming (HLS) encryption.
Overview
The parameter pass-through for HLS encryption feature rewrites M3U8 files (media playlists) for the HLS protocol.
This feature rewrites the #EXT-X-KEY tag in the M3U8 file. The feature appends a parameter to the end of the URI in the #EXT-X-KEY tag. The value of this parameter is obtained from the client request. By default, the parameter name is MtsHlsUriToken.
For more information about the technical principles and application scenarios of M3U8 encryption and rewrite, see M3U8 encryption and rewrite.
Prerequisites
Cross-origin resource sharing (CORS) is configured. For more information, see Configure CORS.
Procedure
Log on to the ApsaraVideo VOD console.
In the navigation pane on the left, click Configuration Management.
Click CDN Configuration > Domain Names to go to the Domain Names page.
In the Actions column of the domain name that you want to manage, click Configure.
In the navigation pane on the left, click Video Related.
In the Encrypted Playback section, turn on the Parameter Pass-through for HLS Encryption switch.

After you enable this feature, authentication is performed by rewriting a token authentication parameter during the HLS encryption parameter pass-through. The rewritten parameter name is MtsHlsUriToken.
Configuration example
Enable Parameter Pass-through for HLS Encryption in the ApsaraVideo VOD console. The default parameter name is MtsHlsUriToken.
A client request contains the MtsHlsUriToken parameter with the value test. When the CDN decrypts the content for playback, it appends MtsHlsUriToken=test to the end of the URI in the #EXT-X-KEY tag of the M3U8 file.
This feature is not currently available on Alibaba Gov Cloud.