import AudioTrackController from 'hls.js/src/controller/audio-track-controller.js'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 |
trackId: * |
|
Method Summary
| Public Methods | ||
| public |
doTick() |
|
| public |
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 |
Select initial track |
|
| private |
_updateTrack(newId: number) |
|
Inherited Summary
| From class EventHandler | ||
| public |
|
|
| public |
hls: * |
|
| public |
|
|
| public |
destroy() |
|
| public |
isEventHandler(): * |
|
| public |
onEvent(event: *, data: *) arguments: event (string), data (any) |
|
| public |
onEventGeneric(event: *, data: *) |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| From class TaskLoop | ||
| private |
_boundTick: * |
|
| private |
|
|
| private |
|
|
| private |
_tickTimer: * |
|
| public |
|
|
| public |
|
|
| public abstract |
doTick() For subclass to implement task logic |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
setInterval(millis: number): boolean |
|
| public |
tick() Will call the subclass doTick implementation in this main loop tick or in the next one (via setTimeout(,0)) in case it has already been called in this tick (in case this is a re-entrant call). |
|
Public Constructors
Public Members
public audioGroupId: * source
public get audioTracks: AudioTrack[] source
public trackIdBlacklist: * source
public tracks: *[] source
Private Members
private trackId: * source
Public Methods
public onAudioTrackLoaded() source
Store track details of loaded track in our data-model.
Set-up metadata update interval task for live-mode streams.
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 |
