Constructor
new PreferenceBasedCriteria(language, role, channelCount, hdrLevel, spatialAudio, videoLayout, audioLabel, videoLabel, codecSwitchingStrategy, enableAudioGroups, audioCodec)
Parameters:
Name | Type | Description |
---|---|---|
language |
string | |
role |
string | |
channelCount |
number | |
hdrLevel |
string | |
spatialAudio |
boolean | |
videoLayout |
string | |
audioLabel |
string | |
videoLabel |
string | |
codecSwitchingStrategy |
shaka.config.CodecSwitchingStrategy | |
enableAudioGroups |
boolean | |
audioCodec |
string |
- Implements:
- Source:
Members
codecSwitchingStrategy_ :shaka.config.CodecSwitchingStrategy
Type:
Methods
filterByLanguage_(variantsnon-null, preferredLanguage) → {Array.<shaka.extern.Variant>}
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
preferredLanguage |
string |
Returns:
- Type
- Array.<shaka.extern.Variant>
filterVariantsByAudioChannelCount_(variantsnon-null, channelCount) → {Array.<shaka.extern.Variant>}
Filter Variants by channelCount.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
channelCount |
number |
Returns:
- Type
- Array.<shaka.extern.Variant>
filterVariantsByAudioCodec_(variantsnon-null, audioCodec)
Filters variants according to the given audio codec.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
audioCodec |
string |
filterVariantsByAudioLabel_(variantsnon-null, preferredLabel) → {Array.<shaka.extern.Variant>}
Filter Variants by audio label.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
preferredLabel |
string |
Returns:
- Type
- Array.<shaka.extern.Variant>
filterVariantsByHDRLevel_(variantsnon-null, hdrLevel)
Filters variants according to the given hdr level config.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
hdrLevel |
string |
filterVariantsByRole_(variantsnon-null, preferredRole) → {Array.<shaka.extern.Variant>}
Filter Variants by role.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
preferredRole |
string |
Returns:
- Type
- Array.<shaka.extern.Variant>
filterVariantsBySpatialAudio_(variantsnon-null, spatialAudio)
Filters variants according to the given spatial audio config.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
spatialAudio |
boolean |
filterVariantsByVideoLabel_(variantsnon-null, preferredLabel) → {Array.<shaka.extern.Variant>}
Filter Variants by video label.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
preferredLabel |
string |
Returns:
- Type
- Array.<shaka.extern.Variant>
filterVariantsByVideoLayout_(variantsnon-null, videoLayout)
Filters variants according to the given video layout config.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> | |
videoLayout |
string |
create(variantsnon-null) → {shaka.media.AdaptationSet}
Take a set of variants, and return a subset of variants that can be
adapted between.
Parameters:
Name | Type | Description |
---|---|---|
variants |
Array.<shaka.extern.Variant> |
- Implements:
- Source: