Subtitle not showing in AVPlayer for HLS with external webvtt

I used the resource loader to modify the master manifest to add EXT-X-MEDIA tags for the subtitle tracks


#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Subtitles",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="en",URI="subs.m3u8"


#EXT-X-STREAM-INF:BANDWIDTH=1118592,CODECS="mp4a.40.2, avc1.64001f",RESOLUTION=640x360,SUBTITLES="subs"


The subs.m3u8 looks like this:

#EXTM3U

#EXT-X-TARGETDURATION:28

#EXT-X-VERSION:3

#EXT-X-MEDIA-SEQUENCE:0

#EXTINF:28.00000,

http://...english.webvtt

#EXT-X-ENDLIST


The subtitles shows up in the cc selection menu but nothing shows when it is selected. Is there anything wrong in using a single webvtt? How can I look into what's wrong?

Replies

I would suspect something wrong in your WebVTT file.


Do you have an X-TIMESTAMP-MAP line in you WebVTT?

(To associate WebVTT cue times to an MPEG-2 timestamp for synchronization.)