HLS Streaming helps you to reach extremely large number of audiences with your video session in real time. It supports adaptive bitrate streaming to get best quality video based on available network bandwidth at receiving end.

Table of Contents

Overview

HLS Streaming helps to scale up your reach to a larger audience with your video session, meetings, webinar in real time. Audiences receive best quality video streaming based on available bandwidth at their end. A web-based Video UI may be linked to define the view of your streaming which will be played across devices.

At the background, the linked Video UI is made to join the video room automatically and a HLS Stream is created using the same view. As the Stream is ready, end points receive a HLS Stream URL to play in HLS Player.

Service Subscription

HLS Streaming Infrastructure is owned and managed by EnableX Therefore, it’s a subscription based service. Connect to Sales/Account Manager for subscription.

In case you look to livestream to YouTube, Vimeo, LinkedIn and/or Facebook; you need RTMP Live Streaming.

HLS View

HLS Streaming experience for audiences may be achieved through the Video UI presented to them. You can have a Video UI or HLS View in either of the following ways:

  • Use Default View: The simplest and quickest way is to use the default view for HLS Streaming. You needn’t code for it. It’s available with EnableX. There are limited customization option available.
  • Develop Custom View: To have a custom view, a Web-based Application needs to be developed, hosted over publicly accessible “https” URL and linked to video room. Read everything you need to know to develop custom view for your stream.

HLS Enabled Room

Even if HLS service is subscribed, the following Room Level “settings” needs to be done to have HLS Streaming in Video Session.

  • audiences: Numeric. Optional. Number of audience needed in the room. It can’t be greater than capping set at subscription. If any of the following settings are being set with room, audience count must be set to some positive number. 
  • send_audiences_stats: Boolean, true or false. Default false. Set it to true, if end-point needs to receive user-connected and user-disconnected event on entry and exit of an audience.
  • hls_view_url: String. URL. Optional. A custom view URL. If not passed, the default HLS Streaming View will be used. However, you may explicitly pass “DEFAULT” as value to this key.

Example: Room Definition JSON Payload to enable HLS Streaming.

{
  "name": "HLS Trial",
  "owner_ref": "XOXO",
  "settings": {
    "description": "HLS Trial",
    "mode": "group",
    "scheduled": false,
    "adhoc": false,
    "duration": 30,
    "moderators": "1",
    "participants": "2",
    "audiences": 6,
    "hls_view_url": "https://URL-DOMAIN/PATH/?token=",
    "send_audiences_stats": true,
    "auto_recording": false,
    "quality": "SD"
  }
}

Note: If HLS is not subscribed, room definition with HLS related settings is not permitted.  

Audience Token to join

A new role has been introduced for HLS Audience joining a room. It’s audience. Get a token for audience role to join a session. As soon as the first audience joins video room, HLS streaming gets initiated automatically. HLS Streaming stops when all audiences exit or disconnect from the video room.

Know how to create Token?

Example: Create Token JSON Payload for audience role

{
  "name": "John",
  "user_ref": "XOXO",
  "role": "audience"
}

HLS Player

HLS Stream URL is received through our Video SDK with an Event / Callback / Delegate Method needs to be played using HLS Player. You may use your own HLS Player, or you may find one online. Use the HLS Player of your choice to play the HLS Stream URL.

Read through different SDK for HLS Player explanation:

Room Notifications

HLS Streaming starts as soon as first audience joins the video room and it stops when last audience exits/disconnects from the room. So, code on the HLS notifications to handle UI and create user experience.

There are 4 notifications are sent to end-points, they are:

Event Listeners:

  • HLS Start: When HLS Stream gets started, it’s sent to publisher and logged in audiences. Subsequently it’s sent to new audience on room connection. It carries hls_url to play.
  • HLS Stop: When HLS Stream stops. It’s sent to the publisher when the last audience leaves video room.
  • HLS Failure: When HLS Stream fails to get started or failed during ongoing streaming. It’s sent to the publisher and audiences.
  • HLS Waiting: When HLS Stream initiation process is on and waiting to get started. It sent to audiences only.

Note: Event names/callbacks/delegate methods are differently named in SDKs. Refer to related SDK to know in detail:

Error Codes

Error Codes are received at end points with related Events/Callbacks/Delegate Methods.

ErrorDescription
On HLS Start
7501Start HLS Streaming input parameters missing, Internal Server Error
7502Start HLS Streaming timeout, Internal Server Error
7503 Start HLS Streaming request is in process
7504Start HLS Streaming request timeout, Internal Server Error
7505HLS Streaming request is in waiting, will be started
7506HLS Streaming can’t be started now, Please try after 2 minutes
7507Start HLS Streaming input parameters missing, Internal Server
7508Start HLS Streaming input parameters missing, Internal Server Error
On HLS Stop
7520HLS Streaming request was in waiting, successfully removed the request from waiting.
7521Stop HLS Streaming failed, Internal Server Error
7522Stop HLS Streaming timeout, Internal Server Error
On HLS Waiting
7509HLS Streaming cannot be started, Internal Server Error, please try after 2 minutes
7510HLS Streaming start failed, Internal Server Error, please try after 2 minutes
7511Last HLS streaming request is in waiting
7512HLS Streaming can’t be started, please try again. Internal Server Error
7513HLS Streaming failed to start, Internal Server Error
HLS Generic Error
7000Start HLS Streaming input parameters missing, Internal Server Error