Compress extension

The methods of video_compress.

on

Methods

cancelCompression() → Future<void>

Available on IVideoCompress, provided by the Compress extension

Stops the running compression; compressVideo then returns null.
compressVideo(String path, {VideoQuality quality = VideoQuality.DefaultQuality, bool deleteOrigin = false, int? startTime, int? duration, bool? includeAudio, int frameRate = 30}) → Future<MediaInfo?>

Available on IVideoCompress, provided by the Compress extension

Compresses the video at path. startTime and duration are in seconds; frameRate is a cap, a slower video is not sped up.
deleteAllCache() → Future<bool?>

Available on IVideoCompress, provided by the Compress extension

Deletes the plugin's cache folder contents, compressed videos included.
dispose() → void

Available on IVideoCompress, provided by the Compress extension

Drops the plugin object; the next use of VideoCompress makes a new one with a new IVideoCompress.compressProgress$. A running compression goes on.
getByteThumbnail(String path, {int quality = 100, int position = -1}) → Future<Uint8List?>

Available on IVideoCompress, provided by the Compress extension

JPEG bytes of the frame at position milliseconds (-1 for a representative frame), at JPEG quality 1 to 100. Null if the frame cannot be read.
getFileThumbnail(String path, {int quality = 100, int position = -1}) → Future<File>

Available on IVideoCompress, provided by the Compress extension

getByteThumbnail written to <video name>.jpg in the cache folder.
getMediaInfo(String path) → Future<MediaInfo>

Available on IVideoCompress, provided by the Compress extension

The size, length and metadata of the video at path. Throws VideoCompressException if it cannot be read.
setLogLevel(int logLevel) → Future<void>

Available on IVideoCompress, provided by the Compress extension

Kept for source compatibility; the plugin has no log levels.