thumbnailFile static method
Generates a thumbnail file under specified thumbnail folder or given full path and name which matches expected ext. The video can be a local video file, or an URL repreents iOS or Android native supported video format. If the thumbnailPath is ommited or null, a thumbnail image file will be created under the same folder as the video file. Specify the maximum height or width for the thumbnail or 0 for same resolution as the original video. The lower quality value creates lower quality of the thumbnail image, but it gets ignored for PNG format.
Implementation
static Future<XFile> thumbnailFile({
required String video,
Map<String, String>? headers,
String? thumbnailPath,
ImageFormat imageFormat = ImageFormat.PNG,
int maxHeight = 0,
int maxWidth = 0,
int? timeMs,
int quality = 10,
}) async {
assert(video.isNotEmpty);
return VideoThumbnailPlatform.instance.thumbnailFile(
video: video,
headers: headers,
thumbnailPath: thumbnailPath,
imageFormat: imageFormat,
maxHeight: maxHeight,
maxWidth: maxWidth,
timeMs: timeMs,
quality: quality,
);
}