getThumbnail method

  1. @override
Future<Uint8List> getThumbnail({
  1. String? url,
})
override

Get Screenshot of the player. Returns a Future that resolves to a Uint8List representing the path of the screenshot.

Implementation

@override
Future<Uint8List> getThumbnail({
  String? url,
}) async {
  try {
    final data = await _methodChannel.invokeMethod("getScreenshot", {
      "url": url,
    });
    return Uint8List.fromList(List<int>.from(data));
  } catch (e) {
    log(e.toString());
    throw Exception("Unable to get the screenshot [Get Screenshot]");
  }
}