fix: 字幕数据过大时页面卡死

This commit is contained in:
guozhigq
2024-10-09 23:33:52 +08:00
parent e34a75f0f3
commit c634e602b9
2 changed files with 45 additions and 14 deletions

View File

@ -536,7 +536,8 @@ class VideoHttp {
// 获取字幕内容
static Future<Map<String, dynamic>> getSubtitleContent(url) async {
var res = await Request().get('https:$url');
final String content = SubTitleUtils.convertToWebVTT(res.data['body']);
final String content =
await SubTitleUtils.convertToWebVTT(res.data['body']);
final List body = res.data['body'];
return {'content': content, 'body': body};
}