I am using the react-player component to play a movie with subtitle as it shows below:
import myVideo from '../media/test.mp4'
import React from 'react'
import ReactPlayer from 'react-player'
import './Video.css'
class Video extends React.Component {
render () {
return (
<div className='player-wrapper'>
<ReactPlayer
url={myVideo}
width='50%'
height='50%'
controls = {true}
className='react-player fixed-center'
config={{ file: {
tracks: [
{kind: 'subtitles', src: '../media/carol.vtt', srcLang: 'ro', default: true}
]
}}}
/>
</div>
)
}
}
export default Video
but the subtitle is not showed, even it is in the same folder with the movie
Best Regards, Aurelian