HTTP Live Streaming (HLS)

HTTP Live Streaming (also known as HLS) is an HTTP-based media streaming communications protocol implemented by Apple Inc. as part of its QuickTime, Safari, OS X, and iOS software.

This definition taken from the HLS wikipedia page.

It works similarly to DASH by breaking the content into chunks and serving it one segment at a time, potentially with no final chunk.

Live Streaming will be signaled by a Live Indicator displayed along with the Control bar.

Fluid Player makes use of hls.js to play .m3u8 files. Once an .m3u8 file is set as the source, Fluid Player will play it, as can be seen in the example below. For browsers that have native support for HLS, Fluid Player will not use hls.js.

<video id='hls-video'>
    <source src='stream_hls.m3u8' type='application/x-mpegURL'/>
</video>

<script>
fluidPlayer(
    'hls-video',
    {
        layoutControls: {
            fillToContainer: true
        }
    }
);
</script>

If your browser natively supports HLS, Fluid Player will not utilize hls.js. However, if you prefer to use hls.js despite native support, you can override it by enabling the following flag.

HTTP Live Streaming with VAST

Fluid Player supports HTTP Live Streaming with VAST tags. For .m3u8 files to be played, the VAST MediaFile tag must have the following attributes:

  • delivery should be set as streaming

  • type should be set as application/vnd.apple.mpegurl

For example:

Customizing HLS

Fluid Player has hooks that support hls.js configuration. A full list of configurable properties can be found in the official hsl.js API docs.

Below is an example of a configuration where you can set the maximum buffer length and streaming quality with which the video will be started.

For more information on using hooks see the Advanced configuration page.

Built in video quality switcher with auto option

Fluid Player automatically populates the video quality switcher with the available levels from the file and adds an auto option.

Was this helpful?