更新时间:2023-05-22 17:31:11
HLS is a streaming protocol based on HTTP, introduced by Apple. It packages video content in the TS (Transport Stream) format, along with a manifest file called M3U8 that informs the client of the playlist of video files. Once the client obtains the M3U8 file, it can play the content directly. However, to prevent unauthorized access to video files, the TS video files used in HLS need to be encrypted. To decrypt the content, clients need to be informed of the decryption method, which can be achieved by configuring the M3U8 standard encryption rewrite feature and using the #EXT-X-KEY tag to specify the encryption algorithm, key URI, and authentication key. For example:
#EXT-X-KEY:METHOD=AES-128,URI="https://example.com/video.key?token=xxx"