搜索插件、代码仓与 APP 分类

插件详情v2.0.4

cached_video_player

一个全新的Flutter插件,几乎完全复制了官方的video_player插件,但支持缓存(Android和iOS)

AndroidiOSWeb
近 30 天下载
518
喜欢数
227
Pub 分数
140

安装插件

flutter pub add cached_video_player

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

cached_video_player 是一个 Flutter 插件,通过为 Android、iOS 和 Web 添加内置的缓存支持,扩展了官方 video_player 的功能。它通过将下载的媒体本地存储,实现视频内容的高效播放,减少带宽使用,并加快重复查看时的加载时间。作为 video_player 的即插即用替代品,它保持与现有代码的兼容性,同时在流媒体或离线场景中提升性能。

适合场景

  • 离线视频播放
  • 减少视频流的数据使用量
  • 更快地重新播放经常观看的视频
  • 在移动应用中缓存视频
  • 在低网络条件下提升性能

主要特点

  • 内置视频缓存
  • 跨平台支持(Android、iOS、Web)
  • video_player 的即插即用替代品
  • 高效的本地存储管理
  • 支持在线和离线视频访问

适合对象

  • 需要离线视频访问的应用
  • 频繁回看的流媒体平台
  • 移动应用的有限数据连接
  • 寻求提升视频性能的开发者
  • 使用 video_player 需要缓存的项目

使用建议

  • 需要在 Android 上额外的存储权限
  • 缓存大小管理可能需要手动配置
  • 未经优化,不适合非常大的视频文件
  • Web 支持与原生平台相比可能存在局限性
  • 初始设置需要了解缓存策略

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Cached Video Player

A flutter plugin that has been forked from the official video_player package except that it supports caching in Android and iOS. Web plugin will work like official video_player i.e. without caching support.

Installation

First, add cached_video_player as a dependency in your pubspec.yaml file.

Follow the Android and iOS configuration steps of the official video_player package. This plugin won't work in Desktop.

Issues
  • maxFileSize and maxCacheSize are hardcoded at 100MiB and 1GiB respectively in Android.
Contributors

所属分类

依赖

依赖清单 3 项

  • meta^1.7.0
  • video_player_platform_interface^5.1.2
  • video_player_web^2.0.10

源码仓库

使用此插件的项目