HTTP Live Streaming is a protocol for streaming media, the easiest and most common way to organize broadcasts now.

The essence of HLS is in splitting the whole stream into small fragments (chunks), sequentially downloaded via HTTP. The flow is continuous and theoretically can be infinite. At the beginning of the session the player download a manifest (m3u8) with nested streams (with a different quality or audio track).

PlayerJS uses the latest version of the hls.js library to manage HLS, but in the settings you can choose a specific releaseHLS support is enabled by default.

Special events for JS API

You can get some HLS data through the JS API. For example, you can subscribe to fragment metadata with the fragdata event through a listener (works with version 9 of the player).

document.getElementById("player").addEventListener("fragdata", onFragmentData);

var player = new Playerjs({id:"player", file:"//site.com/stream.m3u8"});

function onFragmentData(event){

In the JS API there is also a fragment event for getting links of reproduced fragments.

DVR technology may also be relevant for HLS.

The Art of Players
2018 © PlayerJS with ♥


Restore password
Sign up
Log in

Sign up free

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

Order player

Your name
What project do you need a player for?
You agree to processing of this personal data.

Restore password

Forgot email? Contact us