parse static method
Implementation
static Future<PipFlutterPlayerAsmsDataHolder> parse(
String data, String masterPlaylistUrl) async {
List<PipFlutterPlayerAsmsTrack> tracks = [];
List<PipFlutterPlayerAsmsSubtitle> subtitles = [];
List<PipFlutterPlayerAsmsAudioTrack> audios = [];
try {
final List<List<dynamic>> list = await Future.wait([
parseTracks(data, masterPlaylistUrl),
parseSubtitles(data, masterPlaylistUrl),
parseLanguages(data, masterPlaylistUrl)
]);
tracks = list[0] as List<PipFlutterPlayerAsmsTrack>;
subtitles = list[1] as List<PipFlutterPlayerAsmsSubtitle>;
audios = list[2] as List<PipFlutterPlayerAsmsAudioTrack>;
} catch (exception) {
PipFlutterPlayerUtils.log("Exception on hls parse: $exception");
}
return PipFlutterPlayerAsmsDataHolder(
tracks: tracks, audios: audios, subtitles: subtitles);
}