Class: shaka.media.PreferenceBasedCriteria

Constructor

new PreferenceBasedCriteria(language, role, channelCount)

Parameters:
Name Type Description
language string
role string
channelCount number
Implements:
Source:

Members

(private) channelCount_ :number

Type:
  • number
Source:

(private) language_ :string

Type:
  • string
Source:

(private) role_ :string

Type:
  • string
Source:

Methods

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

Parameters:
Name Type Description
variants Array.<shaka.extern.Variant>
preferredLanguage string
Source:
Returns:
Type
Array.<shaka.extern.Variant>

(private, static) filterVariantsByRole_(variantsnon-null, preferredRole) → (non-null) {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) → (non-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