@ceeblue/webrtc-client
    Preparing search index...

    Class ABRAbstractAbstract

    ABRAbstract is the base class for adaptive bitrate algorithm used by Streamer when it has a controller connector.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    log: ILog

    Start a log

    a Log object with the levels of log to call

    Accessors

    • get constraint(): number | undefined

      Get the current bitrate constraint

      Returns number | undefined

    • get maximum(): number

      Get the maximum bitrate

      Returns number

    • set maximum(value: number): void

      Update the maximum bitrate

      Parameters

      • value: number

      Returns void

    • get minimum(): number

      Get the minimum bitrate

      Returns number

    • set minimum(value: number): void

      Update the minimum bitrate

      Parameters

      • value: number

      Returns void

    • get startup(): number

      Get the configured initial bitrate

      Returns number

    • set startup(value: number): void

      Update the initial bitrate

      Parameters

      • value: number

      Returns void

    Methods

    • Implement this method to define your own congestion algorithm, the method must return the wanted bitrate or undefined to not change the current bitrate.

      Parameters

      • bitrate: number

        the current bitrate

      • OptionalbitrateConstraint: number

        the current bitrate constraint

      • OptionalmediaReport: MediaReport

        the media report structure received from the server

      Returns number

      the wanted bitrate or undefined to not change the current bitrate

    • Parameters

      • videoBitrate: number

      Returns void

    • Call this method regularly to control if we have to increase or decrease the stream bitrate depending on the network conditions.

      Parameters

      • bitrate: number | undefined

        the current bitrate

      • OptionalbitrateConstraint: number

        the current bitrate constraint

      • OptionalmediaReport: MediaReport

        the media report structure received from the server

      Returns number

      the wanted bitrate

    • Event unsubscription

      Parameters

      • name: never

        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: never

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

      • event: Function

        Subscriber Function

      • Optionaloptions: { signal?: AbortSignal }
        • Optionalsignal?: 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: never

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

      • event: Function

        Subscriber Function

      • Optionaloptions: { signal?: AbortSignal }
        • Optionalsignal?: AbortSignal

          Optional AbortSignal to stop this or multiple subscriptions in same time

      Returns void