I am trying to provide closed caption support with Chromecast for my iOS app. The files are in segmented WebVTT format(with .m3u8 extension). But the videos are hosted in a CDN and closed caption files hosted on a separate server. The URLs for these WebVTT files are provided separately and not part of video master playlist. These subtitles are working with native iOS player but not with Chromecast.
I tried hosting a normal WebVTT (non-segmented) file on the same server where segmented WebVTT file is hosted and it works fine. So, the problem is with the segmented WebVTT.
So, is it possible to get the segmented WebVTT files working with Chromecast if they are hosted separately. I am using a Custom receiver. Do I need to add anything to receiver file specifically to support this?
This is how I create the media track for closed caption :
GCKMediaTrack *track = [[GCKMediaTrack alloc] initWithIdentifier:1
contentIdentifier:@"https://domain_name/track_name.m3u8"
contentType:@"text/webvtt"
type:GCKMediaTrackTypeText
textSubtype:GCKMediaTextTrackSubtypeCaptions
name:@"English"
languageCode:@"en-US"
customData:nil];
If we pass an individual segment like this it works properly.
GCKMediaTrack *track = [[GCKMediaTrack alloc] initWithIdentifier:1
contentIdentifier:@"https://domain_name/segments/track_index.webvtt"
contentType:@"text/webvtt"
type:GCKMediaTrackTypeText
textSubtype:GCKMediaTextTrackSubtypeCaptions
name:@"English"
languageCode:@"en-US"
customData:nil];