Class: shaka.util.CmsdManager

A CmsdManager maintains CMSD state as well as a collection of utility functions.

Constructor

new CmsdManager(config)

A CmsdManager maintains CMSD state as well as a collection of utility functions.

Parameters:
Name Type Description
config shaka.extern.CmsdConfiguration
Source:

Members

CMSD_DYNAMIC_HEADER_NAME_ :string

Type:
  • string
Source:

CMSD_STATIC_HEADER_NAME_ :string

Type:
  • string
Source:

KEYS_ :string

Type:
  • string
Properties:
Name Value Type Description
AVAILABILITY_TIME at string
DURESS du string
ENCODED_BITRATE br string
ESTIMATED_THROUGHPUT etp string
HELD_TIME ht string
INTERMEDIARY_IDENTIFIER n string
MAX_SUGGESTED_BITRATE mb string
NEXT_OBJECT_RESPONSE nor string
NEXT_RANGE_RESPONSE nrr string
OBJECT_DURATION d string
OBJECT_TYPE ot string
RESPONSE_DELAY rd string
ROUND_TRIP_TIME rtt string
STARTUP su string
STREAM_TYPE st string
STREAMING_FORMAT sf string
VERSION v string
Source:

dynamicParams_ :Map.<string, (boolean|number|string)>

Type:
  • Map.<string, (boolean|number|string)>
Source:

staticParams_ :Map.<string, (boolean|number|string)>

Type:
  • Map.<string, (boolean|number|string)>
Source:

Methods

configure(config)

Called by the Player to provide an updated configuration any time it changes.
Parameters:
Name Type Description
config shaka.extern.CmsdConfiguration
Source:

getBandwidthEstimate(defaultEstimate) → {number}

Gets the current bandwidth estimate.
Parameters:
Name Type Description
defaultEstimate number
Source:
Returns:
The bandwidth estimate in bits per second.
Type
number

getEstimatedThroughput() → {number}

Returns the estimated throughput in bits per second. If there is no estimated throughput or it's not enabled, it returns null.
Source:
Returns:
Type
number

getMaxBitrate() → {number}

Returns the max bitrate in bits per second. If there is no max bitrate or it's not enabled, it returns null.
Source:
Returns:
Type
number

getResponseDelay() → {number}

Returns the response delay in milliseconds. If there is no response delay or it's not enabled, it returns null.
Source:
Returns:
Type
number

getRoundTripTime() → {number}

Returns the RTT in milliseconds. If there is no RTT or it's not enabled, it returns null.
Source:
Returns:
Type
number

parseCMSDDynamic_(headerValue) → {Map.<string, (boolean|number|string)>}

Parameters:
Name Type Description
headerValue string
Source:
Returns:
Type
Map.<string, (boolean|number|string)>

parseCMSDStatic_(headerValue) → {Map.<string, (boolean|number|string)>}

Parameters:
Name Type Description
headerValue string
Source:
Returns:
Type
Map.<string, (boolean|number|string)>

parseParameterValue_(value) → {boolean|number|string}

Parameters:
Name Type Description
value string
Source:
Returns:
Type
boolean | number | string

processHeaders(headersnon-null)

Called by the Player to provide the headers of the latest request.
Parameters:
Name Type Description
headers Object.<string, string>
Source:

reset()

Resets the CmsdManager.
Source: