Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Dimolll/cached_video_preview
Flutter plugin that can help you get remote or local video preview image and cache it.
https://github.com/Dimolll/cached_video_preview
Last synced: about 2 hours ago
JSON representation
Flutter plugin that can help you get remote or local video preview image and cache it.
- Host: GitHub
- URL: https://github.com/Dimolll/cached_video_preview
- Owner: Dimolll
- License: other
- Created: 2021-09-24T20:53:08.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T20:53:18.000Z (over 2 years ago)
- Last Synced: 2024-08-03T14:08:47.913Z (3 months ago)
- Language: Dart
- Size: 2.34 MB
- Stars: 8
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Introduction
Cached Video Preview can help you get remote or local video preview image and cache it.
## USAGE
This is example code how to implement this package.### Get Remote Video Image Preview extracting metadata in web pages
``` DartCachedVideoPreview(
path: 'https://www.youtube.com/watch?v=b_sQ9bMltGU',
type: SourceType.remote,
remoteImageBuilder: (BuildContext context, url) =>
Image.network(url),
)```
### Get Remote Video Image Preview from video url
``` DartCachedVideoPreview(
path: 'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
type: SourceType.remote,
httpHeaders: const {},
remoteImageBuilder: (BuildContext context, url) =>
Image.network(url),
)```
### Get Local Video Image Preview from File path
``` Dart
final File video = File('video.mp4');CachedVideoPreview(
path: video.path,
type: SourceType.local,
fileImageBuilder: (context, bytes) =>
Image.memory(bytes),
)```
## Acknowledgments
Thanks to the authors of these libraries [metadata_fetch][metadata_fetch_link] and [video_thumbnail][video_thumbnail_link].
[metadata_fetch_link]: https://pub.dev/packages/metadata_fetch
[video_thumbnail_link]: https://pub.dev/packages/video_thumbnail/install## Contact and bugs
Use [Issue Tracker][issue_tracker] for any questions or bug reports.[issue_tracker]: https://github.com/Dimolll/cached_video_preview/issues/