Methods
configure(config)
Sets the AdaptationSetCriteria configuration.
Parameters:
| Name | Type | Description |
|---|---|---|
config |
shaka.extern.AdaptationSetCriteria.Configuration |
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> |
Returns:
getConfiguration() → {shaka.extern.AdaptationSetCriteria.Configuration}
Gets the current AdaptationSetCriteria configuration.
Returns:
getLastAdaptationSet() → {shaka.media.AdaptationSet}
Return the result of last create call.
Returns:
Type Definitions
Configuration
Type:
- {preferredAudio: !Array<!shaka.extern.AudioPreference>, preferredVideo: !Array<!shaka.extern.VideoPreference>, language: string, role: string, videoRole: string, channelCount: number, hdrLevel: string, spatialAudio: boolean, videoLayout: string, audioLabel: string, videoLabel: string, preferredAudioCodecs: !Array<string>, preferredAudioChannelCount: number, codecSwitchingStrategy: shaka.config.CodecSwitchingStrategy, audioCodec: string, activeAudioCodec: string, activeAudioChannelCount: number, keySystem: string}
Properties:
| Name | Type | Description |
|---|---|---|
preferredAudio |
Array<!shaka.extern.AudioPreference> | An ordered list of audio preferences used to filter variants. |
preferredVideo |
Array<!shaka.extern.VideoPreference> | An ordered list of video preferences used to filter variants. |
language |
string | Deprecated. Use preferredAudio instead. The language used to filter variants. Populated from preferredAudio[0].language. |
role |
string | Deprecated. Use preferredAudio instead. The adaptation audio role used to filter variants. Populated from preferredAudio[0].role. |
videoRole |
string | Deprecated. Use preferredVideo instead. The adaptation video role used to filter variants. Populated from preferredVideo[0].role. |
channelCount |
number | Deprecated. Use preferredAudio instead. The audio channel count used to filter variants. Populated from preferredAudio[0].channelCount. |
hdrLevel |
string | Deprecated. Use preferredVideo instead. The HDR level used to filter variants. Populated from preferredVideo[0].hdrLevel. |
spatialAudio |
boolean | Deprecated. Use preferredAudio instead. Whether should prefer audio tracks with spatial audio. Populated from preferredAudio[0].spatialAudio. |
videoLayout |
string | Deprecated. Use preferredVideo instead. The video layout used to filter variants. Populated from preferredVideo[0].layout. |
audioLabel |
string | Deprecated. Use preferredAudio instead. The audio label used to filter variants. Populated from preferredAudio[0].label. |
videoLabel |
string | Deprecated. Use preferredVideo instead. The video label used to filter variants. Populated from preferredVideo[0].label. |
preferredAudioCodecs |
Array<string> | Deprecated. Use preferredAudio instead. The ordered list of audio codecs to filter variants. Populated from preferredAudio[*].codec. |
preferredAudioChannelCount |
number | Deprecated. Use preferredAudio instead. The preferred audio channel count to filter variants. Populated from preferredAudio[0].channelCount. |
codecSwitchingStrategy |
shaka.config.CodecSwitchingStrategy | The codec switching strategy used to filter variants. |
audioCodec |
string | The codec of the audio track selected at runtime (e.g. with
selectAudioTrack()), used to filter variants. Unlike the
codec of an audio preference, which must match exactly, any
codec of the same family matches (e.g. HE-AAC and AAC-LC). |
activeAudioCodec |
string | The codec of the audio being played, used to filter variants. Any codec of the same family matches. |
activeAudioChannelCount |
number | The active audio channel count used to filter variants. |
keySystem |
string | Current used key system or empty if not used. |
Factory
A factory for creating the AdaptationSetCriteria.
Type:
- function(): !shaka.extern.AdaptationSetCriteria