import AudioTrackController from 'hls.js/src/controller/audio-track-controller.js'AudioTrackController
Extends:
Implements:
Constructor Summary
| Public Constructor | ||
| public |  | |
Member Summary
| Public Members | ||
| public | audioGroupId: * | |
| public get |  | |
| public set | Select current track by index | |
| public get | audioTracks: AudioTrack[] | |
| public |  | |
| public | tracks: *[] | |
| Private Members | ||
| private |  | |
| private | _trackId: * | |
Method Summary
| Public Methods | ||
| public | doTick() | |
| public | onAudioTrackLoaded(data: *) Store track details of loaded track in our data-model. | |
| public | onAudioTrackSwitched(data: *) Update the internal group ID to any audio-track we may have set manually or because of a failure-handling fallback. | |
| public | onError(data: ErrorEventData) Handle network errors loading audio track manifests and also pausing on any netwok errors. | |
| public | onLevelLoaded(data: *) When a level gets loaded, if it has redundant audioGroupIds (in the same ordinality as it's redundant URLs) we are setting our audio-group ID internally to the one set, if it is different from the group ID currently set. If group-ID got update, we re-select the appropriate audio-track with this group-ID matching the currently selected one (based on NAME property). | |
| public | Reset audio tracks on new manifest loading. | |
| public | onManifestParsed(data: *) Store tracks data from manifest parsed data. | |
| Private Methods | ||
| private |  | |
| private | _loadTrackDetailsIfNeeded(audioTrack: AudioTrack) | |
| private | _needsTrackLoading(audioTrack: AudioTrack): boolean | |
| private | _selectAudioGroup(levelId: *) | |
| private | Select initial track | |
| private | _setAudioTrack(newId: number) | |
| private | _updateTrack(newId: number) | |
Public Constructors
public constructor() source
Public Members
public audioGroupId: * source
public get audioTracks: AudioTrack[] source
public trackIdBlacklist: * source
public tracks: *[] source
Private Members
private _trackId: * source
Public Methods
public doTick() source
public onAudioTrackLoaded(data: *) source
Store track details of loaded track in our data-model.
Set-up metadata update interval task for live-mode streams.
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onAudioTrackSwitched(data: *) source
Update the internal group ID to any audio-track we may have set manually or because of a failure-handling fallback.
Quality-levels should update to that group ID in this case.
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onError(data: ErrorEventData) source
Handle network errors loading audio track manifests and also pausing on any netwok errors.
Params:
| Name | Type | Attribute | Description | 
| data | ErrorEventData | 
public onLevelLoaded(data: *) source
When a level gets loaded, if it has redundant audioGroupIds (in the same ordinality as it's redundant URLs) we are setting our audio-group ID internally to the one set, if it is different from the group ID currently set.
If group-ID got update, we re-select the appropriate audio-track with this group-ID matching the currently selected one (based on NAME property).
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onManifestParsed(data: *) source
Store tracks data from manifest parsed data.
Trigger AUDIO_TRACKS_UPDATED event.
Params:
| Name | Type | Attribute | Description | 
| data | * | 
Private Methods
private _handleLoadError() source
private _loadTrackDetailsIfNeeded(audioTrack: AudioTrack) source
Params:
| Name | Type | Attribute | Description | 
| audioTrack | AudioTrack | 
private _needsTrackLoading(audioTrack: AudioTrack): boolean source
Params:
| Name | Type | Attribute | Description | 
| audioTrack | AudioTrack | 
private _selectAudioGroup(levelId: *) source
Params:
| Name | Type | Attribute | Description | 
| levelId | * | 
 
    
  