import AudioTrackController from 'hls.js/src/controller/audio-track-controller.ts'AudioTrackController
Extends:
Implements:
- EventHandler
Constructor Summary
| Public Constructor | ||
| public |
|
|
Member Summary
| Public Members | ||
| public |
audioGroupId: * |
|
| public get |
|
|
| public set |
|
|
| public get |
audioTracks: * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
tracks: *[] |
|
| Private Members | ||
| private |
|
|
Method Summary
| Public Methods | ||
| public |
destroy() |
|
| public |
loadPlaylist(hlsUrlParameters: HlsUrlParameters) |
|
| public |
onAudioTrackLoaded(event: undefined, data: AudioTrackLoadedData) Store track details of loaded track in our data-model. |
|
| public |
onAudioTrackSwitched(event: undefined, data: TrackSwitchedData) Update the internal group ID to any audio-track we may have set manually or because of a failure-handling fallback. |
|
| public |
|
|
| public |
onLevelLoading(event: undefined, data: LevelLoadingData) When a level is loading, 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(event: undefined, data: ManifestParsedData) Store tracks data from manifest parsed data. |
|
| public |
recoverTrack(errorEvent: ErrorData, trackId: number) |
|
| Private Methods | ||
| private |
|
|
| private |
_selectAudioGroup(levelId: number) |
|
| private |
|
|
| private |
_setAudioTrack(newId: number) |
|
| private |
|
|
Public Constructors
public constructor() source
Public Members
public audioGroupId: * source
public get audioTracks: * source
public restrictedTracks: * source
public tracks: *[] source
Private Members
Public Methods
public destroy() source
public loadPlaylist(hlsUrlParameters: HlsUrlParameters) source
Params:
| Name | Type | Attribute | Description |
| hlsUrlParameters | HlsUrlParameters |
public onAudioTrackLoaded(event: undefined, data: AudioTrackLoadedData) 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 |
| event | undefined | ||
| data | AudioTrackLoadedData |
public onAudioTrackSwitched(event: undefined, data: TrackSwitchedData) 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 |
| event | undefined | ||
| data | TrackSwitchedData |
public onError(event: undefined, data: ErrorData) source
Params:
| Name | Type | Attribute | Description |
| event | undefined | ||
| data | ErrorData |
public onLevelLoading(event: undefined, data: LevelLoadingData) source
When a level is loading, 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 |
| event | undefined | ||
| data | LevelLoadingData |
public onManifestParsed(event: undefined, data: ManifestParsedData) source
Store tracks data from manifest parsed data.
Trigger AUDIO_TRACKS_UPDATED event.
Params:
| Name | Type | Attribute | Description |
| event | undefined | ||
| data | ManifestParsedData |
public recoverTrack(errorEvent: ErrorData, trackId: number) source
Params:
| Name | Type | Attribute | Description |
| errorEvent | ErrorData | ||
| trackId | number |
Private Methods
private _registerListeners() source
private _selectAudioGroup(levelId: number) source
Params:
| Name | Type | Attribute | Description |
| levelId | number |
