Class: shaka.media.PreferenceBasedCriteria

Constructor

new PreferenceBasedCriteria(language, role, channelCount, hdrLevel, labelopt)

Parameters:
Name Type Attributes Description
language string
role string
channelCount number
hdrLevel string
label string <optional>
Implements:
Source:

Members

channelCount_ :number

Type:
  • number
Source:

hdrLevel_ :string

Type:
  • string
Source:

label_ :string

Type:
  • string
Source:

language_ :string

Type:
  • string
Source:

role_ :string

Type:
  • string
Source:

Methods

filterByLanguage_(variantsnon-null, preferredLanguage) → {Array.<shaka.extern.Variant>}

Parameters:
Name Type Description
variants Array.<shaka.extern.Variant>
preferredLanguage string
Source:
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
Source:

filterVariantsByLabel_(variantsnon-null, preferredLabel) → {Array.<shaka.extern.Variant>}

Filter Variants by label.
Parameters:
Name Type Description
variants Array.<shaka.extern.Variant>
preferredLabel string
Source:
Returns:
Type
Array.<shaka.extern.Variant>

filterVariantsByRole_(variantsnon-null, preferredRole) → {Array.<shaka.extern.Variant>}

Filter Variants by role.
Parameters:
Name Type Description
variants Array.<shaka.extern.Variant>
preferredRole string
Source:
Returns:
Type
Array.<shaka.extern.Variant>

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:
Returns:
Type
shaka.media.AdaptationSet