Subscribing with HLS

Subscribing with HLS

Adaptive Bitrate is supported also by HLS subscribers. In this case it is necessary to subscribe to the m3u8 stream with the top-level stream name. The stream variants are defined in the m3u8 manifest and the HLS playback element has the capability to switch between them based on the conditions of the network.

As for WebRTC and Flash the first step involves requesting an edge endpoint from the stream manager using for the stream name one of the existing variants. The call is as follows:


URL: https://yourstreammanager.com/streammanager/api/3.1/event/live/mystream_2?action=subscribe


  • yourstreammanager.com: is the host of your Stream Manager.
  • mystream_2: is the name of the stream variant that you want to subscribe to initially.

A successful response will look like the following:

  "serverAddress": "",
  "scope": "live",
  "name": "mystream_2"

This data is then used in the initialization configuration for the HLSSubscriber which will look like the following:

(function (red5prosdk) {

  var subscriber = new red5prosdk.HLSSubscriber()
    host: '',
    app: 'live',
    streamName: 'mystream',
    protocol: 'html',
    port: 5080
  .then(function () {
  .catch(function (e) {


This will make the Red5 Pro SDL request to subscribe to the HLS stream at: