CrossPlatformVideoThumbnails class
Main class for cross-platform video thumbnail generation.
This class provides a unified API for generating video thumbnails across all supported platforms (Android, iOS, Web, Windows, macOS, Linux).
The class uses static methods and automatically detects and initializes the appropriate platform-specific implementation.
Usage
// Initialize the package
await CrossPlatformVideoThumbnails.initialize();
// Generate a thumbnail
final thumbnail = await CrossPlatformVideoThumbnails.generateThumbnail(
videoPath,
ThumbnailOptions(timePosition: 5.0),
);
Constructors
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 Methods
-
generateThumbnail(
String videoPath, ThumbnailOptions options) → Future< ThumbnailResult> - Generate a single thumbnail from a video file
-
generateThumbnails(
String videoPath, List< ThumbnailOptions> optionsList) → Future<List< ThumbnailResult> > - Generate multiple thumbnails from a video file
-
getSupportedOutputFormats(
) → List< ThumbnailFormat> - Get the list of supported output formats for the current platform
-
getSupportedVideoFormats(
) → List< String> - Get the list of supported video formats for the current platform
-
initialize(
) → Future< void> - Initialize the platform-specific implementation
-
isPlatformAvailable(
) → Future< bool> - Check if the current platform is available and ready to use
-
isVideoFormatSupported(
String videoPath) → Future< bool> - Check if the platform supports the given video format