-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
140 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,36 @@ | ||
# thumbnails | ||
|
||
A Flutter Plugin to generate thumbnails from videos on Android devices | ||
A Flutter Plugin to generate thumbnails from videos. | ||
|
||
## Getting Started | ||
## Compatibility | ||
Android OS only | ||
|
||
For help getting started with Flutter, view our online | ||
[documentation](https://flutter.io/). | ||
## Usage | ||
|
||
For help on editing plugin code, view the [documentation](https://flutter.io/developing-packages/#edit-plugin-package). | ||
#### Depend on it | ||
add `thumbnails` as a dependency in your pubspec.yaml file. | ||
|
||
#### Add import statement | ||
Import the library via | ||
``` dart | ||
import 'package:thumbnails/thumbnails.dart'; | ||
``` | ||
|
||
#### Examples | ||
``` dart | ||
// Fetch thumbnail, store in a specified output folder and return file path | ||
String thumb = await Thumbnails.getThumbnail( | ||
thumbOutputFile: | ||
'[YOUR OUTPUT FILE HERE]', | ||
videoFile: '[VIDEO PATH HERE]', | ||
imageType: ThumbFormat.PNG, | ||
quality: 30); | ||
// Fetch thumbnail, store in app's Temporary directory output folder and return file path | ||
String thumb = await Thumbnails.getThumbnail( | ||
videoFile: 'VIDEO PATH HERE', | ||
imageType: ThumbFormat.JPEG, | ||
quality: 45); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import 'package:thumbnails/thumbnails.dart'; | ||
|
||
const DEFAULT_THUMB_QUALITY = 50; | ||
|