0

I'm using ExoPlayer v2.1.1, (SimpleExoPlayer and SimpleExoPlayerView) in an Android tv app to stream HLS video on demand. I'm getting the video from m3u8 files, some of which contain WebVtt as well, for subtitles.

There are loads of questions online on how to sideload the WebVtt from a url, but I don't want to sideload them. There must be something obvious that I'm missing since this must be a common use case, but I can't find any questions about it online

Can anyone tell me how to tell ExoPlayer (V2) to show the subtitles? I can see that the subtitles track is there when I call SimpleExoplayer.getCurrentTrackGroups and getCurrentTrackSelections.

ninjachippie
  • 410
  • 1
  • 5
  • 14
  • how did you solve this problem? – orlandocr May 29 '17 at 21:11
  • @orlandocr So as it turned out there was no problem with my code. The issue was in Vimeo's srt to webvtt converter. It output a file with a small syntax error that didn't break the iOS player because it does not parse strictly, but Exoplayer does parse strictly so it caused the player to error out. Vimeo have since fixed the issue, so you shouldn't be seeing the same issue for the same reason as me. To test if you have a similar syntax error, you could play the stream in safari. If it plays, but the subs are out of sync, check your webvtt file for syntax errors. – ninjachippie May 30 '17 at 10:15

0 Answers0