Open vishalhyperspace opened 1 year ago
Hello I am implementing react-native-video in my tvOS app and need to display subtitle. but even after set text tracks it does not display subtitles and a subtitle buttons. here is my code for video player
<Video ref={setPlayer} subtitle={true} source={{ uri: configuration.url, }} style={[styles.playerLoaded]} controls={true} paused={pausedRef.current} onLoad={handleLoad} resizeMode={'contain'} rate={playerRate} onProgress={handleProgress} onError={onError} onLoadStart={onLoadStart} onSeek={handleSeek} onReadyForDisplay={onReadyForDisplay} onEnd={onEndVideo} playInBackground={false} playWhenInactive={false} selectedTextTrack={{ type: 'language', value: 'en', }} textTracks={[ { title: 'English CC', language: 'en', type: TextTrackType.VTT, // "text/vtt" uri: 'https://captions.cloud.vimeo.com/captions/13026836.vtt?expires=1676898663&sig=429c369ce4b16ca4786bc94a6a893eb245363ebd', }, { title: 'Spanish Subtitles', language: 'es', type: TextTrackType.SRT, // "application/x-subrip" uri: 'https://captions.cloud.vimeo.com/captions/13026836.vtt?expires=1676898663&sig=429c369ce4b16ca4786bc94a6a893eb245363ebd', }, ]} />
here is my URI for subtitle files: "https://captions.cloud.vimeo.com/captions/13026836.vtt?expires=1676898663&sig=429c369ce4b16ca4 786bc94a6a893eb245363ebd"
you can see button is not showing in my video players:
I am using react-native-video version 5.2.1 Please help me to figure it out. Thanks in advance.
This will help https://www.youtube.com/watch?v=vVI7ZAZq5e0
Hello I am implementing react-native-video in my tvOS app and need to display subtitle. but even after set text tracks it does not display subtitles and a subtitle buttons. here is my code for video player
here is my URI for subtitle files: "https://captions.cloud.vimeo.com/captions/13026836.vtt?expires=1676898663&sig=429c369ce4b16ca4 786bc94a6a893eb245363ebd"
you can see button is not showing in my video players:
I am using react-native-video version 5.2.1 Please help me to figure it out. Thanks in advance.