HLS Stream
- class AzuracastPy.models.HLSStream(name: str, format: str, bitrate: int, listeners: int, id: int, links: Links, _station)
Represents a HTTP Live Streaming (HLS) Stream on a station.
- __init__(name: str, format: str, bitrate: int, listeners: int, id: int, links: Links, _station)
Initializes a
HLSStreamobject.Note
This class should not be initialized directly. Instead, obtain an instance via:
create(),__call__()orhls_streams().
- delete()
Deletes the HTTP Live Streaming (HLS) stream from the station.
Sets all attributes of the current
HLSStreamobject toNone.Usage:
hls_stream.delete()
- edit(name: str | None = None, format: Formats | None = None, bitrate: Bitrates | None = None)
Edits the HTTP Live Streaming (HLS) stream’s properties.
Updates all edited attributes of the current
HLSStreamobject.- Parameters:
name – (Optional) The new name of the hls stream. Default:
None.format – (Optional) The new format of the hls stream. Default:
None.bitrate – (Optional) The new bitrate of the hls stream. Default:
None.
Usage:
from AzuracastPy.enums import Formats, Bitrates hls_stream.edit( name="New name", format=Formats.OPUS, bitrate=Bitrates.BITRATE_128 )