hls_continuous

The `hls_continuous` directive enables or disables continuous HLS streaming in the NGINX RTMP module.

Syntaxhls_continuous on | off;
Defaultoff
Context
Arguments1

Description

The hls_continuous directive, when set to 'on', allows for continuous playback of video segments via HLS (HTTP Live Streaming). This means that once a live stream is initiated, the segments will be made available to clients in a continuous flow, ensuring that viewers receive uninterrupted content as it is being published. This is particularly useful for applications such as live broadcasts where maintaining a seamless viewing experience is crucial.

When the directive is set, NGINX will automatically handle segment creation in a manner that promotes continuous playback, minimizing the need for buffer pauses or interruptions between segments. Conversely, setting hls_continuous to 'off' will revert to traditional HLS behavior which may require additional handling on the client end to ensure that stream continuity is preserved. This director is especially useful in scenarios where viewers are expected to join and leave the stream frequently, as it reduces latency and enhances user experience.

As a parameter, this directive takes a single argument which can be either on (to enable continuous streaming) or off (to disable it). When implementing this directive, proper care must be taken to ensure that other HLS-related configurations are in accordance with the continuous streaming requirements, such as segment length and playlist adjustment settings.

Config Example

application myapp {
    live on;
    hls on;
    hls_continuous on;
    hls_fragment 10s;
    hls_playlist_length 60s;
}

Make sure to configure related HLS directives appropriately when enabling hls_continuous.

Disabling hls_continuous might cause playback issues if clients expect continuous streaming.

Ensure stream clients are capable of handling HLS streaming properly.

← Back to all directives