Station HLS Stream Helper

class AzuracastPy.models.helpers.HLSStreamHelper(_station)

Provides a set of functions to interact with hls streams.

__call__(id: int) HLSStream

Retrieves a specific HTTP Live Streaming (HLS) stream from the station.

Parameters:

id – The numerical ID of the HLS stream to be retrieved.

Returns:

A HLSStream object.

Usage:

hls_stream = station.hls_stream(1)
__init__(_station)

Initializes a HLSStreamHelper instance.

Note

This class should not be initialized directly. Instead, obtain an instance via: hls_stream.

create(name: str, format: Formats = Formats.AAC, bitrate: Bitrates = Bitrates.BITRATE_128) HLSStream

Adds an HTTP Live Streaming (HLS) stream to the station.

param name:

The name of the HLS stream.

param format:

The format of the HLS stream. Default: Formats.AAC.

param bitrate:

The bitrate of the HLS stream. Default: Bitrates.BITRATE_128.

returns:

A HLSStream object for the newly created HLS stream.

Usage:

from AzuracastPy.enums import Formats, Bitrates

hls_stream = station.hls_stream.create(
    name="New HLS Stream",
    format=Formats.MP3,
    bitrate=Bitrates.BITRATE_32
)