generateSingleCoverThumbnail function
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);
}