I went through the react-native props and come to know they added selectedTextTrack for subtitle support. But, how exactly it can be added I'm unable to write code. Can I add a file(.SRT) as input for a subtitle?
<Video
source={{uri: ''}}
resizeMode={this.state.resizeMode}
style={mediaPlayerStyle.player}
rate={this.state.rate}
volume={this.state.volume}
paused={this.state.paused}
onLoad={this.onLoad}
onProgress={this.onProgress}
onEnd={this.onEnd}
repeat={true}
selectedTextTrack={{
type: 'index',
value: 0
}}
textTracks={[
{
index: 0,
title: "English CC",
language: "en",
type: TextTrackType.VTT, // "text/vtt"
uri: "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt"
},
{
index: 1,
title: "Spanish Subtitles",
language: "es",
type: TextTrackType.SRT, // "application/x-subrip"
uri: "https://durian.blender.org/wp-content/content/subtitles/sintel_es.srt"
}
]}
/>
So basically i want to add subtitles for one video in various languages, If it is .srt file that would be a great help