fix: 视频播放异常

This commit is contained in:
guozhigq
2023-07-15 16:26:33 +08:00
parent cd3bb41e71
commit c7b67c3a10
2 changed files with 5 additions and 2 deletions

View File

@ -78,7 +78,9 @@ class Dash {
duration = json['duration'];
minBufferTime = json['minBufferTime'];
video = json['video'].map<VideoItem>((e) => VideoItem.fromJson(e)).toList();
audio = json['audio'].map<AudioItem>((e) => AudioItem.fromJson(e)).toList();
audio = json['audio'] != null
? json['audio'].map<AudioItem>((e) => AudioItem.fromJson(e)).toList()
: [];
dolby = json['dolby'];
flac = json['flac'] ?? '';
}