getAudioStreams method
Gets audio streams for a YouTube video
Implementation
@override
Future<List<Map<String, dynamic>>> getAudioStreams(
String videoId, {
int bitrate = 192,
String? codec,
}) async {
try {
final result = await methodChannel.invokeMethod<List<dynamic>>(
'getAudioStreams',
{
'videoId': videoId,
'bitrate': bitrate,
if (codec != null) 'codec': codec,
},
);
return _convertList(result);
} on PlatformException catch (e) {
throw PlatformException(
code: e.code,
message: e.message,
details: e.details,
);
}
}