VideoCompressUtil class
视频压缩工具类 使用v_video_compressor库进行视频压缩
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- compressor → VVideoCompressor
-
no setter
Static Methods
-
cancelCompression(
) → Future< void> - 取消视频压缩
-
compressProgressListener(
void onData(VideoCompressEvent event)) → StreamSubscription< VideoCompressEvent> - 添加全局视频压缩进度监听
-
compressVideo(
String videoPath, {VideoCompressConfig config = const VideoCompressConfig.medium(), VideoCompressAdvancedConfig? advancedConfig, String? id, void onProgress(double progress)?}) → Future< VideoCompressionResult?> - 压缩视频
-
estimateCompressed(
String videoPath, {VideoCompressQuality quality = VideoCompressQuality.medium, VideoCompressAdvancedConfig? advancedConfig}) → Future< VideoCompressionEstimate?> - 预估视频压缩结果
-
getThumbnail(
String videoPath, {List< int> timeMs = const [5000], int maxWidth = 150}) → Future<List< String> > - 获取缩略图
-
isCompressing(
) → Future< bool> - 检查视频压缩是否正在进行
-
listen(
void onEvent(VideoCompressEvent event)) → void - Full event callback
-
listenToBatchProgress(
void onBatchProgress(double progress, int currentIndex, int total)) → void - Batch progress callback
-
listenToProgress(
dynamic onProgress, {Function? onError, void onDone()?, bool? cancelOnError}) → void - Simple progress callback