Implement WebVTT support for HLS
Question for anyone following this issue - Do we envisage a case where we need to support both VTT and embedded EIA608 simultaneously (in a single playback)? Or if VTT is present, is it always safe to assume that we can just rely on VTT tracks? I'm hoping we can just rely on VTT if they're present.
From my experience, people is using EIA608 or VTT, never both at the same time.
Yes, same thing from my experience
We may download vtt files separately in the class 'HlsChunkSource'.
@ojw28 Yes, that's a good simplification, I don't see a case where you would need both at the same time. Subtitles declared in the playlist as separate downloads (VTT) supersedes subtitles embedded in the TS (EIA?08 and TTML), as I see it.
+1 for WebVTT support for HLS
@perchrh @ojw28 It seems like an over-simplification to me. The VTT track may not be subtitles but instead could be chapterisation or other metadata, intended to be additional to the embedded subtitles/captions rather than a replacement. Even if they are intended to be the same subtitle/caption content, there are likely to be differences in styling and positioning between the two available tracks. At least give the user the opportunity to select from the multiple tracks available even if only presenting one of them, rather than hard coding player prioritisation of available tracks.
it might be true that 80% of the time you'd want WebVTT over CEA-608/708, but it's not always true.
In an API that doesn't assume business use cases, you want to expose a list of TextTracks that are available, and allow each one to be activated/deactivated by the API.
Then it's up to the App using ExoPlayer to decide whether there's hard coded logic to pick CEA-608/708 over WebVTT or whether more than one track can be rendered at once.
@jlacivita Yes, and the API could expose mimetype or subtitle type together with the other TextTrack information. This way the API user can implement his or her own logic for subtitle preferences.
The implementation could still be done in two steps: first support both subtitle sources and prefer one of them, then make both available. The last step will be quick to implement, I think.
Hi guys. Any update on the priority of HLS support with WebVTT?
First pieces that we need for this were: https://github.com/google/ExoPlayer/commit/4bb8bea9528a803a201b809e8bd4abe3f0b460e8, https://github.com/google/ExoPlayer/commit/72f093c4f6d66cea021756e1cbe931b52f55a79e
This is now enabled on the dev branch.