Use StreamMetadata to get real-time information on a server stream, including:

  • the list of tracks and their properties,
  • the list of availables sources and their properties,

Example

const streamMetadata = new StreamMetadata(Connect.buildURL(endPoint, streamName));
streamMetadata.onMetadata = metadata => {
console.log(metadata);
}

Hierarchy

Constructors

Properties

_connectParams: Params
_metadata?: Metadata
_streamState: StreamState
log: ILog

Start a log

Param

Returns

a Log object with the levels of log to call

Accessors

Methods

  • Event unsubscription

    Parameters

    • name: "state" | "metadata" | "close" | "Close" | "State" | "Metadata"

      Name of event without the 'on' prefix (ex: 'log' to 'onLog' event declared)

    • event: Function

      Unsubscriber Function, must be the one passed to on or once subscription methods

    Returns boolean

  • Event subscription

    Parameters

    • name: "state" | "metadata" | "close" | "Close" | "State" | "Metadata"

      Name of event without the on prefix (ex: log to onLog event declared)

    • event: Function

      Subscriber Function

    • Optional options: {
          signal?: AbortSignal;
      }
      • Optional signal?: AbortSignal

        Optional AbortSignal to stop this or multiple subscriptions in same time

    Returns void

  • Event subscription only one time, once time fired it's automatically unsubscribe

    Parameters

    • name: "state" | "metadata" | "close" | "Close" | "State" | "Metadata"

      Name of event without the on prefix (ex: log to onLog event declared)

    • event: Function

      Subscriber Function

    • Optional options: {
          signal?: AbortSignal;
      }
      • Optional signal?: AbortSignal

    Returns void

Events

Generated using TypeDoc