Closed fadone closed 1 month ago
I was forced back to beta.3 using subtitle: 0.1.0-beta.3
(without the ^).
Or you can also use this lib instead https://pub.dev/packages/subtitle_wrapper_package
Same error!
I tried subtitle: 0.1.0-beta.3
,but the result of print(controller.subtitles)
became empty list: []
Here is my srt subtitle (it has double text lines):
14
00:00:45,520 --> 00:00:46,520
A:いいですか?
A:这样可以吗?
15
00:00:47,600 --> 00:00:49,160
B:はい、いいです。
B:嗯,可以的。
This package seems to have a serious flaw. It only handles English subtitles. For non-English subtitles, controller.subtitles becomes an empty list ([ ]). I guess he made a mistake using RegExp.
Solved with #12
I am getting this error when using asset subtitle,
Unhandled Exception: RangeError: Value not in range: 11
E/flutter (31902): #0 _RegExpMatch.group (dart:core-patch/regexp_patch.dart:95:7)
E/flutter (31902): #1 SubtitleParser._decodeSubtitleFormat subtitle_parser.dart:87
E/flutter (31902): #2 SubtitleParser.parsing subtitle_parser.dart:61
E/flutter (31902): #3 ISubtitleController.initial subtitle_controller.dart:5
Here is my code,
SubtitleController? _subtitleController;
_subtitleController = SubtitleController( provider: const AssetSubtitle('assets/videos/video.srt'), );
await _subtitleController!.initial();
And here is the subtitle line where the error is occuring,
1
00:00:00,009 --> 00:00:03,258
Let me give you the best analogy you've ever heard about the human body.