- Implementations:
 - Source:
 
Methods
chooseVariant(preferFastSwitchingopt) → {shaka.extern.Variant}
    Chooses one variant to switch to.  Called by the Player.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
preferFastSwitching | 
            
            boolean | 
                
                    <optional> | 
            
            
            If not provided meant "avoid fast switching if possible". | 
- Source:
 
Returns:
- Type
 - shaka.extern.Variant
 
configure(config)
    Sets the ABR configuration.
It is the responsibility of the AbrManager implementation to implement the
restrictions behavior described in shaka.extern.AbrConfiguration.
    Parameters:
| Name | Type | Description | 
|---|---|---|
config | 
            
            shaka.extern.AbrConfiguration | 
- Source:
 
disable()
    Disables automatic Stream suggestions. After this, the AbrManager may not
call switchCallback().
- Source:
 
enable()
    Enables automatic Variant choices from the last ones passed to setVariants.
After this, the AbrManager may call switchCallback() at any time.
- Source:
 
getBandwidthEstimate() → {number}
    Gets an estimate of the current bandwidth in bit/sec.  This is used by the
Player to generate stats.
- Source:
 
Returns:
- Type
 - number
 
init(switchCallback)
    Initializes the AbrManager.
    Parameters:
| Name | Type | Description | 
|---|---|---|
switchCallback | 
            
            shaka.extern.AbrManager.SwitchCallback | 
- Source:
 
playbackRateChanged(rate)
    Updates manager playback rate.
    Parameters:
| Name | Type | Description | 
|---|---|---|
rate | 
            
            number | 
- Source:
 
release()
    Request that this object release all internal references.
- Source:
 
segmentDownloaded(deltaTimeMs, numBytes, allowSwitch, requestopt, contextopt)
    Notifies the AbrManager that a segment has been downloaded (includes MP4
SIDX data, WebM Cues data, initialization segments, and media segments).
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
deltaTimeMs | 
            
            number | The duration, in milliseconds, that the request took to complete. | |
numBytes | 
            
            number | The total number of bytes transferred. | |
allowSwitch | 
            
            boolean | Indicate if the segment is allowed to switch to another stream. | |
request | 
            
            shaka.extern.Request | 
                
                    <optional> | 
            
            
            A reference to the request | 
context | 
            
            shaka.extern.RequestContext | 
                
                    <optional> | 
            
            
            A reference to the request context | 
- Source:
 
setCmsdManager(cmsdManager)
    Set CMSD manager.
    Parameters:
| Name | Type | Description | 
|---|---|---|
cmsdManager | 
            
            shaka.util.CmsdManager | 
- Source:
 
setMediaElement(mediaElement)
    Set media element.
    Parameters:
| Name | Type | Description | 
|---|---|---|
mediaElement | 
            
            HTMLMediaElement | 
- Source:
 
setVariants(variantsnon-null) → {boolean}
    Updates manager's variants collection.
Returns true if the variants are updated. Returns false if the variants
are equal.
    Parameters:
| Name | Type | Description | 
|---|---|---|
variants | 
            
            Array<!shaka.extern.Variant> | 
- Source:
 
Returns:
- Type
 - boolean
 
stop()
    Stops any background timers and frees any objects held by this instance.
This will only be called after a call to init.
- Source:
 
trySuggestStreams()
    Notifies the ABR that it is a time to suggest new streams. This is used by
the Player when it finishes adding the last partial segment of a fast
switching stream.
- Source:
 
Type Definitions
Factory
    A factory for creating the abr manager.
    Type:
- function(): !shaka.extern.AbrManager
 
- Source:
 
SwitchCallback
    A callback into the Player that should be called when the AbrManager decides
it's time to change to a different variant.
The first argument is a variant to switch to.
The second argument is an optional boolean. If true, all data will be removed
from the buffer, which will result in a buffering event. Unless a third
argument is passed.
The third argument in an optional number that specifies how much data (in
seconds) should be retained when clearing the buffer. This can help achieve
a fast switch that doesn't involve a buffering event. A minimum of two video
segments should always be kept buffered to avoid temporary hiccups.
    Type:
- function(shaka.extern.Variant, boolean=, number=)
 
- Source: