thumbnailFile method

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

Implementation

@override
Future<XFile> thumbnailFile({
  required String video,
  required Map<String, String>? headers,
  required String? thumbnailPath,
  required ImageFormat imageFormat,
  required int maxHeight,
  required int maxWidth,
  required int timeMs,
  required int quality,
}) async {
  final blob = await _createThumbnail(
    videoSrc: video,
    headers: headers,
    imageFormat: imageFormat,
    maxHeight: maxHeight,
    maxWidth: maxWidth,
    timeMs: timeMs,
    quality: quality,
  );

  return XFile(Url.createObjectUrlFromBlob(blob), mimeType: blob.type);
}