getVideoStreams method

  1. @override
Future<List<Map<String, dynamic>>> getVideoStreams(
  1. String videoId, {
  2. String quality = '1080p',
})
override

Gets video streams for a YouTube video

Implementation

@override
Future<List<Map<String, dynamic>>> getVideoStreams(
  String videoId, {
  String quality = '1080p',
}) async {
  try {
    final result = await methodChannel.invokeMethod<List<dynamic>>(
      'getVideoStreams',
      {'videoId': videoId, 'quality': quality},
    );
    return _convertList(result);
  } on PlatformException catch (e) {
    throw PlatformException(
      code: e.code,
      message: e.message,
      details: e.details,
    );
  }
}