cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
9.14k stars 1.14k forks source link

Use srt format as subtitle #1110

Closed riky177 closed 3 years ago

riky177 commented 3 years ago

hi, In the readme section I just see vtt format in the subtitle, can I use srt format as a subtitle? I have tried srt format and it's not working, If I Can't use srt format, is there any way to play srt format in react-player?

cookpete commented 3 years ago

SRT files are not supported by HTML5 media, but can be converted: https://stackoverflow.com/questions/26968759/does-html5-video-support-srt-texttrack

Angelk90 commented 3 years ago

Hi @cookpete , I tried to add subtitles as per example, but it is not working for me. Can you give me a hand?

Link: https://codesandbox.io/s/exciting-sinoussi-hyd8h?file=/src/App.js