Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitles/ClosedCaptions never loaded for VOD #4

Open
Bubblesphere opened this issue Jul 14, 2020 · 3 comments
Open

Subtitles/ClosedCaptions never loaded for VOD #4

Bubblesphere opened this issue Jul 14, 2020 · 3 comments

Comments

@Bubblesphere
Copy link

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?

@phloxic
Copy link

phloxic commented Sep 25, 2020

I encountered this as well.

So far I believed this to be a regression with the 0.4.0 architecture change, as my test stream works (apart from neither DEFAULT nor AUTOSELECT not being recognized, probably different issue) in the demo which still uses the old architecture by loading https://cdn.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js whereas your stream fails in the demo as well, even in Mac Safari.

Your stream does work in the hls.js demo though.

@phloxic
Copy link

phloxic commented Sep 29, 2020

As the demo is now updated:

pre v0.4.x works - at least with some streams.

v0.4.x: does not show subs or rather does not show the selector.

Should this be filed for core?

@talaysa
Copy link

talaysa commented Oct 25, 2020

I faced with same problem. This looks like fixed.

if (this._ccTracksUpdated && this.hasClosedCaptionsTracks)
this._onSubtitleLoaded();

But also if hardcode has externalTrack in the same with manifest url, it is causing to bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants