Constructor
new AudioTrack(id, bandwidthnullable, langnullable)
Creates a new AudioTrack.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | ||
bandwidth |
number |
<nullable> |
|
lang |
string |
<nullable> |
- Source:
Members
-
active :boolean
-
True if this is currently the active track.
Type:
- boolean
- Source:
-
bandwidth :number
-
The bandwidth required in bits per second.
Type:
- number
- Source:
-
id :number
-
A unique ID for the track.
Type:
- number
- Source:
-
lang :string
-
The track's language, a BCP 47 language tag.
Type:
- string
- Source:
Methods
-
(static) compare(audioTrack1non-null, audioTrack2non-null) → {number}
-
Compares two AudioTrack objects: first by language, and then by bandwidth.
Parameters:
Name Type Description audioTrack1
shaka.player.AudioTrack audioTrack2
shaka.player.AudioTrack - Source:
Returns:
- Type
- number