Constructs a new Streamer instance, optionally with a custom connector This doesn't start the broadcast, you must call start() method
Optional Connector: (new (connectParams, stream) => IConnector)Connector class to use for signaling, can be determined automatically from URL in the start() method
Private Optional ConnectorConnector class to use for signaling, can be determined automatically from URL in the start() method
Private Optional _connectorPrivate Optional _controllerPrivate Optional _mediaPrivate Optional _rtpPrivate Optional _videoPrivate Optional _videoPrivate _videoStart a log
a Log object with the levels of log to call
The current audio track of the stream, or null if audio track is disabled.
Returns the IConnector instance, or undefined if stream is not starting.
Returns the IController instance when starting with a connector with controllable ability, or undefined if stream is not starting or stream is not controllable.
Last MediaReport statistics
Returns true when streamer is running (between a Streamer.start and a Streamer.stop)
Camera media stream as specified by MediaStream
Stream name, for example as+bc3f535f-37f3-458b-8171-b4c5e77a6137
Video bitrate configured by the server, can be undefined on start or when there is no controllable connector
Use connectionInfos to get the current precise audio or video bitrate
Configure the video bitrate from the server, possible only if your Streamer instance is built with a controllable connector Set undefined to remove this configuration
Video bitrate constraint configured by the server, can be undefined on start or when there is no controllable connector
Use connectionInfos to get the current precise audio or video bitrate
The current video track of the stream, or null if video track is disabled.
Private _computePrivate _replaceReplace a single track while streaming.
replaceTrack(kind, track) method,
this will hot-swap the sender track (no full restart).'audio' | 'video'
A MediaStreamTrack, a MediaStream (first track of kind is used), or null to remove/mute that kind.
Returns connection info, such as round trip time, requests sent and received, bytes sent and received, and bitrates NOTE: This call is resource-intensive for the CPU.
A promise for a ConnectionInfos
Event subscription
Name of event without the on prefix (ex: log to onLog event declared)
Subscriber Function
Optional options: { Optional signal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
Event fired to report media statistics
Event fired when an RTP setting change occurs
Event subscription only one time, once time fired it's automatically unsubscribe
Name of event without the on prefix (ex: log to onLog event declared)
Subscriber Function
Optional options: { Optional signal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
Sets server properties for packet error (nack) and delayed packet loss (drop) and fires an onRTPProps event if changed successfully. NOTE: Method can also retrieve current server values if called without arguments.
Optional nack: numberWaiting period before declaring a packet error
Optional drop: numberWaiting period before considering delayed packets as lost
Starts broadcasting the stream The connector is determined automatically from Connect.Params.endPoint if not forced in the constructor.
The adaptiveBitrate option can take three different types of value:
MediaStream instance to stream
Connection parameters
Adaptive bitrate implementation or ABRParams to configure the default implementation
Stop streaming the stream
Optional error: StreamerErrorerror description on an improper stop
Event fired when the stream has stopped
Optional error: StreamerErrorerror description on an improper stop
Generated using TypeDoc
Use Streamer to broadcast to a WebRTC server.
You can use a controllable version using a
WSControlleras connector, or change it to use aHTTPConnector(HTTP WHIP). By default it uses aWSControllerexcepting if on Streamer.start you use a Connect.Params.endPoint prefixed with ahttp://protocol. With a controllable connector you can change video bitrate during the streaming, what is not possible with a HTTP(WHIP) connector.Example