HLS Streaming

HLS (HTTP Live Streaming) lets you broadcast an ongoing EnableX video session to a large audience in real time. Unlike RTMP, which pushes a stream to an external CDN, HLS is managed entirely by EnableX — the infrastructure scales to handle large viewer counts, and adaptive bitrate ensures the best playback quality across varying network conditions.

Typical use cases include webinars, virtual conferences, live classes, concerts, and corporate town halls where a moderator-driven session needs to reach a large number of read-only viewers simultaneously.

HLS Streaming is a subscription-based service owned and managed by EnableX. Contact your EnableX Sales or Account Manager to enable it for your account before attempting to use any HLS room settings. You cannot define a room with HLS settings without an active subscription.
How It Works

A web-based Video UI is linked to the video room as the HLS streaming view. At the back end, EnableX automatically joins this view into the video session — without publishing any stream — and uses its rendered output to generate the HLS feed. When the HLS stream is ready, each connected audience member receives an HLS Stream URL to play in any compatible HLS player.

For streaming to platforms like YouTube, Facebook, Vimeo, or Twitch over RTMP, see RTMP Live Streaming.
Streaming View

The HLS feed is rendered from a web-based UI that joins the video room silently. You can use the built-in view or provide your own.

Default View

EnableX provides a ready-made default HLS view that requires no code. To use it, simply omit hls_view_url from the room settings, or explicitly pass "DEFAULT" as its value. The default view provides a standard multi-party tile layout and limited customisation options.

Custom View

For a branded or purpose-built layout, you can develop a web application, host it on an HTTPS URL, and pass that URL as hls_view_url in the room settings. The custom view must be able to join the video session using an EnableX token without publishing any audio or video stream.

For step-by-step guidance on building a custom streaming view, see Virtual Agent — Custom Streaming View.

Room Configuration

To enable HLS streaming in a video room, include HLS-specific settings in the room creation payload sent to the Video API.

Room Settings

Setting Type Description
audiences Number Maximum number of HLS audience slots. Must not exceed the cap defined in your subscription. Must be a positive number when any other HLS setting is specified.
send_audiences_stats Boolean Default false. Set to true to receive user-connected and user-disconnected events when audience members join or leave the room.
hls_view_url String (URL) The URL of your custom HLS streaming view. If omitted, or if you pass "DEFAULT", the EnableX default view is used.

Example room creation payload with HLS streaming enabled:

{
  "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://your-domain/hls-view/?token=",
    "send_audiences_stats": true,
    "auto_recording": false,
    "quality": "SD"
  }
}
Pass the hls_view_url without an actual token value. EnableX appends the generated token at runtime. Use a trailing ?token= or &token= at the end of the URL.
Audience Access

Audience Token

HLS audience members join using the audience role. Generate a token for each audience member using the Video API with the following payload:

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

Audience members do not publish audio or video and do not appear in the moderator's participant panel. They receive the HLS stream URL via an SDK event once the stream is active. Use any HLS-compatible player to play the stream URL — either your own or a third-party player.

HLS Player

The HLS stream URL is delivered to audience members through a room event, callback, or delegate method — depending on the platform SDK in use. Refer to the relevant SDK page for the exact event name and payload:

Room Notifications

EnableX sends four HLS-related notifications to connected endpoints. Handling these events lets you update the UI appropriately — for example, showing a "Stream is starting…" message while waiting, or displaying the player once the stream is live.

Event Sent To Description
HLS Start Publisher & all connected audiences Fired when the HLS stream becomes active. Carries the hls_url to play. Also sent to new audience members when they join mid-stream.
HLS Stop Publisher Fired when the HLS stream stops — typically when the last audience member leaves the room.
HLS Failure Publisher & audiences Fired when the HLS stream fails to start or encounters an error during an active stream.
HLS Waiting Audiences only Fired when the HLS stream initiation process is underway. The audience member should wait before attempting to play.
Event names, callback signatures, and delegate method names differ across SDKs. Refer to the SDK-specific documentation linked in the HLS Player section.
Error Codes

Error codes are delivered to endpoints alongside the corresponding HLS event. Use these to display meaningful messages or trigger retry logic in your application.

On HLS Start

CodeDescription
7501Input parameters to start HLS streaming are missing (internal server error).
7502HLS streaming timeout has been initiated (internal server error).
7503Request to start HLS streaming is currently being processed.
7504Request to start HLS streaming has timed out (internal server error).
7505HLS streaming request is queued and will start shortly.
7506HLS streaming cannot start right now. Try again after 2 minutes.
7507Input parameters to start HLS streaming are missing (internal server error).
7508Input parameters to start HLS streaming are missing (internal server error).

On HLS Stop

CodeDescription
7520A queued HLS streaming request encountered an error before starting and has been removed from the queue.
7521Failed to stop HLS streaming (internal server error).
7522HLS streaming timeout was stopped (internal server error).

On HLS Waiting

CodeDescription
7509HLS streaming cannot start due to an internal error. Try again after 2 minutes.
7510Failed to start HLS streaming (internal server error). Try again after 2 minutes.
7511The last HLS streaming request is still in the waiting queue.
7512HLS streaming cannot start due to an internal error. Try again.
7513Failed to start HLS streaming (internal server error).

Generic Error

CodeDescription
7000Input parameters to start HLS streaming are missing (internal server error).