Global

Methods

addQualityLevel(representation) → {QualityLevel}

Adds a quality level to the list.

Parameters:
Name Type Description
representation Representation | Object

The representation of the quality level

Properties
Name Type Attributes Description
id string

Unique id of the QualityLevel

width number <optional>

Resolution width of the QualityLevel

height number <optional>

Resolution height of the QualityLevel

bandwidth number

Bitrate of the QualityLevel

enabled function

Callback to enable/disable QualityLevel

Source:
Returns:

the QualityLevel added to the list

Type
QualityLevel

dispose()

Resets the list of QualityLevels to empty

Source:

get() → {boolean}

Get whether the QualityLevel is enabled.

Source:
Returns:

True if the QualityLevel is enabled.

Type
boolean

getQualityLevelById(id) → {QualityLevel|null}

Searches for a QualityLevel with the given id.

Parameters:
Name Type Description
id string

The id of the QualityLevel to find.

Source:
Returns:

The QualityLevel with id, or null if not found.

Type
QualityLevel | null

initPlugin(player, options)

Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and event handlers.

Parameters:
Name Type Description
player Player

Player object.

options Object

Plugin options object.

Source:

qualityLevels(options)

A video.js plugin.

In the plugin function, the value of this is a video.js Player instance. You cannot rely on the player being in a "ready" state here, depending on how the plugin is invoked. This may or may not be important to you; if not, remove the wait for "ready"!

Parameters:
Name Type Description
options Object

Plugin options object

Source:

removeQualityLevel(remove) → {QualityLevel|null}

Removes a quality level from the list.

Parameters:
Name Type Description
remove QualityLevel

QualityLevel to remove to the list.

Source:
Returns:

the QualityLevel removed or null if nothing removed

Type
QualityLevel | null

set(enable)

Enable or disable the QualityLevel.

Parameters:
Name Type Description
enable boolean

true to enable QualityLevel, false to disable.

Source: