generateSingleCoverThumbnail function

Future<CoverData> generateSingleCoverThumbnail(
  1. String filePath, {
  2. int timeMs = 0,
  3. int quality = 10,
})

Generate a cover at timeMs in video

return CoverData depending on timeMs milliseconds

Implementation

Future<CoverData> generateSingleCoverThumbnail(
  String filePath, {
  int timeMs = 0,
  int quality = 10,
}) async {
  final thumbData = await VideoThumbnail.thumbnailData(
    imageFormat: ImageFormat.JPEG,
    video: filePath,
    timeMs: timeMs,
    quality: quality,
  );

  return CoverData(thumbData: thumbData, timeMs: timeMs);
}