getFileThumbnail method
getByteThumbnail written to <video name>.jpg in the cache folder.
Implementation
Future<File> getFileThumbnail(
String path, {
int quality = 100,
int position = -1,
}) async {
final name = path.split('/').last;
final dot = name.lastIndexOf('.');
final base = dot > 0 ? name.substring(0, dot) : name;
return VideoCompressor.getThumbnailFile(
path,
position: position < 0 ? null : Duration(milliseconds: position),
quality: quality.clamp(1, 100),
maxSide: _thumbnailMaxSide,
outputPath: '${await VideoCompressor.cacheDirectory()}/$base.jpg',
);
}