thumbnailFile method

  1. @override
Future<String?> thumbnailFile({
  1. required String video,
  2. Map<String, String>? headers,
  3. String? thumbnailPath,
  4. ImageFormat imageFormat = ImageFormat.png,
  5. int maxHeight = 0,
  6. int maxWidth = 0,
  7. int timeMs = 0,
  8. int quality = 10,
})
override

Implementation

@override
Future<String?> thumbnailFile(
    {required String video,
    Map<String, String>? headers,
    String? thumbnailPath,
    ImageFormat imageFormat = ImageFormat.png,
    int maxHeight = 0,
    int maxWidth = 0,
    int timeMs = 0,
    int quality = 10}) async {
  if (video.isEmpty) return null;
  final reqMap = <String, dynamic>{
    'video': video,
    'headers': headers,
    'path': thumbnailPath,
    'format': imageFormat.index,
    'maxh': maxHeight,
    'maxw': maxWidth,
    'timeMs': timeMs,
    'quality': quality
  };
  return await methodChannel.invokeMethod('file', reqMap);
}