Abstract
Build the ABR implementation, call compute to use it
ABR parameters
Optional
stream: MediaStreamIf set it can change dynamically the source resolution regarding the network quality
Private
_appreciationPrivate
Optional
_bitratePrivate
Optional
_bitratePrivate
_maximumPrivate
_minimumPrivate
_recoveryPrivate
_startupPrivate
Optional
_streamStart a log
a Log object with the levels of log to call
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
_computeImplement 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
Optional
bitrateConstraint: numberthe current bitrate constraint
Optional
mediaReport: MediaReportthe media report structure received from the server
the wanted bitrate or undefined to not change the current bitrate
Protected
_updatePrivate
_upgradeCall this method regularly to control if we have to increase or decrease the stream bitrate depending on the network conditions.
the current bitrate
Optional
bitrateConstraint: numberthe current bitrate constraint
Optional
mediaReport: 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
Optional
options: { Optional
signal?: 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
Optional
options: { Optional
signal?: AbortSignalGenerated using TypeDoc
ABRAbstract is the base class for adaptive bitrate algorithm used by Streamer when it has a controller connector.