This repository was archived by the owner on Sep 28, 2025. It is now read-only.

Description
With the given VOD
https://senvuvod.azureedge.net/pvvodsoc-fl/_definst_/mp4:azrsoc/archives/PV750/2020/2020-06-25/9637_Senate%20sitting%20no.%2027_13-30-41_VL.mp4/playlist.m3u8?audioindex=2
HLSJS.Events.SUBTITLE_TRACK_LOADED is never triggered
HLSJS.Events.SUBTITLE_TRACKS_UPDATED gets triggered
Therefore the closed captions are never loaded. I tried removing this._playbackType === Playback.LIVE from the following code
// Live stream subtitle tracks detection hack (may not immediately available)
if (this._ccTracksUpdated && this._playbackType === Playback.LIVE && this.hasClosedCaptionsTracks)
this._onSubtitleLoaded()
but the hasClosedCaptionsTrack was still false when it ran. To fix my issue, I added the following to the _onTimeUpdate method
if (this._ccTracksUpdated && this.hasClosedCaptionsTracks)
this._onSubtitleLoaded();
Is there a better way to do this?