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
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, click Configuration Management.
Choose CDN Configuration > Domain Names. The Domain Names page is displayed.
Find the domain name that you want to configure and click Configure in the Actions column.
In the left-side navigation pane of the domain name, click Video Related.
In the Encrypted Playback section, turn on Parameter Pass-through for HLS Encryption.
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
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.