AbstractBuild the ABR implementation, call compute to use it
ABR parameters
Optionalstream: MediaStreamIf set it can change dynamically the source resolution regarding the network quality
Get the current bitrate constraint
Get the maximum bitrate
Update the maximum bitrate
Get the minimum bitrate
Update the minimum bitrate
Get the configured initial bitrate
Update the initial bitrate
Get the MediaStream if set
Get the current bitrate
Protected Abstract_Implement this method to define your own congestion algorithm, the method must return the wanted bitrate or undefined to not change the current bitrate.
the current bitrate
OptionalbitrateConstraint: numberthe current bitrate constraint
OptionalmediaReport: MediaReportthe media report structure received from the server
the wanted bitrate or undefined to not change the current bitrate
Protected_Call this method regularly to control if we have to increase or decrease the stream bitrate depending on the network conditions.
the current bitrate
OptionalbitrateConstraint: numberthe current bitrate constraint
OptionalmediaReport: MediaReportthe media report structure received from the server
the wanted bitrate
Event subscription
Name of event without the on prefix (ex: log to onLog event declared)
Subscriber Function
Optionaloptions: { signal?: AbortSignal }Optionalsignal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
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
Optionaloptions: { signal?: AbortSignal }Optionalsignal?: AbortSignalOptional AbortSignal to stop this or multiple subscriptions in same time
Reset the ABR algorithm to its initial state
the current bitrate
ABRAbstract is the base class for adaptive bitrate algorithm used by Streamer when it has a controller connector.