import SubtitleTrackController from 'hls.js/src/controller/subtitle-track-controller.ts'SubtitleTrackController
Extends:
Constructor Summary
| Public Constructor | ||
| public |  | |
Member Summary
| Public Members | ||
| public |  | |
| public | groupId: * | |
| public | media: * | |
| public |  | |
| public |  | |
| public |  | |
| public get |  | |
| public set |  | |
| public |  | |
| public get | get/set index of the selected subtitle track (based on index in subtitle track lists) * | |
| public set |  | |
| public get | get alternate subtitle tracks list from playlist * | |
| public |  | |
| public |  | |
| public | tracks: * | |
| public |  | |
| public |  | |
| Private Members | ||
| private |  | |
Method Summary
| Public Methods | ||
| public | destroy() | |
| public | findTrackId(name: string): number | |
| public | loadPlaylist(hlsUrlParameters: HlsUrlParameters) | |
| public |  | |
| public | onLevelLoading(event: undefined, data: LevelLoadingData) | |
| public | onLevelSwitching(event: undefined, data: LevelSwitchingData) | |
| public |  | |
| public | onManifestParsed(event: undefined, data: ManifestParsedData) | |
| public | onMediaAttached(event: undefined, data: MediaAttachedData) | |
| public |  | |
| public | onSubtitleTrackLoaded(event: undefined, data: TrackLoadedData) | |
| public |  | |
| public | pollTrackChange(timeout: number) | |
| public |  | |
| public | setSubtitleTrack(newId: number, lastTrack: undefined) This method is responsible for validating the subtitle index and periodically reloading if live. | |
| public | switchLevel(levelIndex: number) | |
| public | toggleTrackModes(newId: number) Disables the old subtitleTrack and sets current mode on the next subtitleTrack. | |
| public |  | |
Public Constructors
public constructor() source
Public Members
public asyncPollTrackChange: * source
public groupId: * source
public media: * source
public get subtitleTrack: number source
get/set index of the selected subtitle track (based on index in subtitle track lists) *
public trackChangeListener: * source
public tracks: * source
public tracksInGroup: * source
Private Members
Public Methods
public destroy() source
public loadPlaylist(hlsUrlParameters: HlsUrlParameters) source
Params:
| Name | Type | Attribute | Description | 
| hlsUrlParameters | HlsUrlParameters | 
public onError(event: undefined, data: ErrorData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | ErrorData | 
public onLevelLoading(event: undefined, data: LevelLoadingData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | LevelLoadingData | 
public onLevelSwitching(event: undefined, data: LevelSwitchingData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | LevelSwitchingData | 
public onManifestLoading() source
public onManifestParsed(event: undefined, data: ManifestParsedData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | ManifestParsedData | 
public onMediaAttached(event: undefined, data: MediaAttachedData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | MediaAttachedData | 
public onMediaDetaching() source
public onSubtitleTrackLoaded(event: undefined, data: TrackLoadedData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | TrackLoadedData | 
public onTextTracksChanged() source
public registerListeners() source
public setSubtitleTrack(newId: number, lastTrack: undefined) source
This method is responsible for validating the subtitle index and periodically reloading if live. Dispatches the SUBTITLE_TRACK_SWITCH event, which instructs the subtitle-stream-controller to load the selected track.
public switchLevel(levelIndex: number) source
Params:
| Name | Type | Attribute | Description | 
| levelIndex | number | 
public toggleTrackModes(newId: number) source
Disables the old subtitleTrack and sets current mode on the next subtitleTrack. This operates on the DOM textTracks. A value of -1 will disable all subtitle tracks.
Params:
| Name | Type | Attribute | Description | 
| newId | number | 
 
    
  