Class: shaka.media.PreferenceBasedCriteria

Constructor

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

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

Members

(private) channelCount_ :number

Type:
  • number
Source:

(private) label_ :string

Type:
  • string
Source:

(private) language_ :string

Type:
  • string
Source:

(private) role_ :string

Type:
  • string
Source:

(private) type_ :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) filterVariantsByLabel_(variantsnon-null, preferredLabel) → (non-null) {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>

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

Filter Variants by role.
Parameters:
Name Type Description
variants Array.<shaka.extern.Variant>
preferredRole string
type 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