Home Reference Source
import AudioTrackController from 'hls.js/src/controller/audio-track-controller.ts'
public class | source

AudioTrackController

Extends:

src/controller/base-playlist-controller.js~BasePlaylistController → AudioTrackController

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set
public get
public

groupId: *

public
public
public
public

tracks: *[]

public

Method Summary

Public Methods
public
public
public

loadPlaylist(hlsUrlParameters: HlsUrlParameters)

public

onAudioTrackLoaded(event: undefined, data: AudioTrackLoadedData)

public

onError(event: undefined, data: ErrorData)

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
public

onManifestParsed(event: undefined, data: ManifestParsedData)

public
public
public
public

Public Constructors

public constructor() source

Public Members

public get audioTrack: number source

public set audioTrack: number source

public get audioTracks: * source

public groupId: * source

public retryCount: number source

public selectDefaultTrack: boolean source

public trackId: number source

public tracks: *[] source

public tracksInGroup: *[] source

Public Methods

public destroy() source

public findTrackId(name: string): number source

Params:

NameTypeAttributeDescription
name string

Return:

number

public loadPlaylist(hlsUrlParameters: HlsUrlParameters) source

Params:

NameTypeAttributeDescription
hlsUrlParameters HlsUrlParameters

public onAudioTrackLoaded(event: undefined, data: AudioTrackLoadedData) source

Params:

NameTypeAttributeDescription
event undefined
data AudioTrackLoadedData

public onError(event: undefined, data: ErrorData) source

Params:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
event undefined
data LevelLoadingData

public onManifestLoading() source

public onManifestParsed(event: undefined, data: ManifestParsedData) source

Params:

NameTypeAttributeDescription
event undefined
data ManifestParsedData

public registerListeners() source

public selectInitialTrack() source

public setAudioTrack(newId: number) source

Params:

NameTypeAttributeDescription
newId number

public unregisterListeners() source