Class: shaka.media.AdaptationSet

Constructor

new AdaptationSet(root, candidatesopt, non-null, compareCodecsopt, enableAudioGroupsopt)

Parameters:
Name Type Attributes Default Description
root shaka.extern.Variant The variant that all other variants will be tested against when being added to the adaptation set. If a variant is not compatible with the root, it will not be added.
candidates Iterable.<shaka.extern.Variant> <optional>
Variants that may be compatible with the root and should be added if compatible. If a candidate is not compatible, it will not end up in the adaptation set.
compareCodecs boolean <optional>
true
enableAudioGroups boolean <optional>
false
Source:

Members

Methods

areAdaptable(a, b, compareCodecs, enableAudioGroups) → {boolean}

Parameters:
Name Type Description
a shaka.extern.Variant
b shaka.extern.Variant
compareCodecs boolean
enableAudioGroups boolean
Source:
Returns:
Type
boolean

areAudiosCompatible_(a, b, compareCodecs, enableAudioGroups) → {boolean}

Check if we can switch between two audio streams.
Parameters:
Name Type Description
a shaka.extern.Stream
b shaka.extern.Stream
compareCodecs boolean
enableAudioGroups boolean
Source:
Returns:
Type
boolean

areRolesEqual_(anon-null, bnon-null) → {boolean}

Check if two role lists are the equal. This will take into account all unique behaviours when comparing roles.
Parameters:
Name Type Description
a Iterable.<string>
b Iterable.<string>
Source:
Returns:
Type
boolean

areVideosCompatible_(a, b, compareCodecs) → {boolean}

Check if we can switch between two video streams.
Parameters:
Name Type Description
a shaka.extern.Stream
b shaka.extern.Stream
compareCodecs boolean
Source:
Returns:
Type
boolean

canTransitionBetween_(a, b) → {boolean}

Check if we can switch between two streams based on their codec and mime type.
Parameters:
Name Type Description
a shaka.extern.Stream
b shaka.extern.Stream
Source:
Returns:
Type
boolean

add(variant, compareCodecs, enableAudioGroups) → {boolean}

Parameters:
Name Type Description
variant shaka.extern.Variant
compareCodecs boolean
enableAudioGroups boolean
Source:
Returns:
Type
boolean

canInclude(variant, compareCodecsopt, enableAudioGroupsopt) → {boolean}

Check if |variant| can be included with the set. If |canInclude| returns |false|, calling |add| will result in it being ignored.
Parameters:
Name Type Attributes Default Description
variant shaka.extern.Variant
compareCodecs boolean <optional>
true
enableAudioGroups boolean <optional>
false
Source:
Returns:
Type
boolean

values() → {Iterable.<shaka.extern.Variant>}

Source:
Returns:
Type
Iterable.<shaka.extern.Variant>