HLS download protection


Special browser add-ons can download HLS streams. You can complicate this process in two ways.

Remove m3u8 extension

You can specify to remove the extension or specify another (except txt - it is intended for playlists). For the player to understand that this is HLS, you need to add the hls:1 parameter in the player connection code.

let player = new Playerjs({id:"player", file:"//site.com/video.8u3m", hls:1});

Encrypt manifest

You can encrypt the contents of the m3u8 manifest in any convenient way, for example Base64. After loading the manifest, the player will try to decrypt it using an external JS function, which must be available in the same namespace as the player. Example for Base64:

window.8u3m = function(s){return atob(s)};

The name of this function must be specified in the player settings.

Please note that decryption will not work in native HLS playback mode (on iOS).


21.0.0
2025 © PlayerJS

Sign up

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Restore password

Restore
Forgot email? Contact us