How to enable DRM protection for HLS streaming - ninacoder-info/music-engine-web-wiki GitHub Wiki

You need to enabled SSL on your site (https)

CD to your project public folder (not pubic_html, it is in the project file)

Make sure you installed opensll

run

$ openssl rand 16 > enc.key

After done, run this

$ openssl rand -hex 16

You will get a key file like this

ecd0d06eaf884d8226c33928e87efa33

Now create enc.keyinfo (in public folder too)

$ vim enc.keyinfo

The file content should look like

https://yoursite.com/enc.key
/home/nina/public_html/public/enc.key   <~~~ should be the full path to enc.key file
ecd0d06eaf884d8226c33928e87efa33

Now, Go to Admin -> Settings -> Music, enabled the DRM option

NOTE: if you are using s3 to store your HLS conversion, you have to config

[
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

Save.