FlutterCompressWeb class

Web implementation backed by WebCodecs (VideoDecoder/VideoEncoder) with mp4box.js demuxing and mp4-muxer muxing — the browser-native parallel to Media3 (Android) and AVFoundation (iOS). No FFmpeg.

v1 transcodes video only (audio is dropped); trim is not yet applied on web.

Inheritance

Constructors

FlutterCompressWeb()

Properties

hashCode int
The hash code for this object.
no setterinherited
progressStream Stream<CompressionProgress>
Broadcast stream of progress events for all in-flight jobs.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel(String? id) Future<void>
override
clearCache() Future<void>
override
compress(String id, String path, VideoCompressConfig config, String? outputDir, String? outputName) Future<VideoCompressResult>
Compress path using config. id identifies the job (for progress correlation and cancellation). When outputPath is non-null the encoded file is written there; otherwise it lands in the plugin cache.
override
compressImage(String path, ImageCompressConfig config, String? outputDir, String? outputName) Future<ImageCompressResult>
override
estimate(String path, VideoCompressConfig config) Future<CompressionEstimate>
override
getImageInfo(String path) Future<ImageMeta>
override
getThumbnail(String path, {required int positionMs, required int quality, int? maxWidth}) Future<String>
override
getVideoInfo(String path) Future<VideoInfo>
override
isCompressing() Future<bool>
override
isSupported() Future<bool>
Whether this platform can compress video at all. Always true on native; on web it reports WebCodecs + demux/mux availability.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseOutput(String path) Future<void>
Release a single output. No-op on native (files live until clearCache); on web it revokes the blob: URL so the browser can free the bytes.
override
saveToDownloads(String path, String? fileName) Future<String>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

registerWith(Registrar registrar) → void