FLUTTER ECOSYSTEM

Dimolll/cached_video_preview

一個 Flutter 插件,可幫助您取得遠端或本機影片預覽影像並加以快取。

cached_video_preview 專案封面
Stars
8
Forks
9
最近推送(UTC)
2022年6月22日
專案狀態
未封存
Dmytro Bondarchuk GitHub avatar
GITHUB User

Dmytro Bondarchuk ↗

Flutter Developer

語言DartRubySwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 13 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 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

CachedVideoPreview(
  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

CachedVideoPreview(
  path: 'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
  type: SourceType.remote,
  httpHeaders: const <String, String>{},
  remoteImageBuilder: (BuildContext context, url) =>
      Image.network(url),
)

Get Local Video Image Preview from File path
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 and video_thumbnail.

Contact and bugs

Use Issue Tracker for any questions or bug reports.