How can I import subtitle files in a video in Flutter? like vtt files or srt files.
Asked
Active
Viewed 2,375 times
1 Answers
4
As a workaround, I am using mx_player_plugin for now. For ex.
await PlayerPlugin.openWithMxPlayer(String url, String subUrl);
this takes video url and srt url as a parameter and plays video using MX player.
Warning: phone must have MX Player installed.
UPDATE
Try subtitle_wrapper_package this supports vtt subtitles. Please check my complete answer here

Ravinder Kumar
- 7,407
- 3
- 28
- 54
-
Thanks, but i know that, I wish we have this feature in video player like Chewie. – Muhammad Hasan Alasady Nov 11 '19 at 08:10
-
Have you tried [subtitle_wrapper_package](https://pub.dev/packages/subtitle_wrapper_package#-example-tab-) this supports vtt subtitles.Please check my complete answer [here](https://stackoverflow.com/a/58798430/5734205) – Ravinder Kumar Nov 11 '19 at 09:13
-
I have tested, and it really works!!! if you find my answer helpful please accept and upvote:) – Ravinder Kumar Nov 18 '19 at 09:06
-
It's really helpful, I tried to accept and upvote, but this message showing to me :( Thanks for the feedback! Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score. – Muhammad Hasan Alasady Nov 18 '19 at 09:09