一个适用于 iOS 的 Flutter 插件,提供两个小部件,可使用原生 AVPlayer 从 URL 或文件路径播放视频。第二个小部件包含 AirPlay 集成,使用户能够将视频内容流式传输到附近的 Apple 设备(如 Apple TV)。专为 iOS 设计,利用平台特定功能实现流畅的播放和无缝的 AirPlay 支持。非常适合需要高质量视频播放和流媒体选项的媒体应用。
适合场景
在应用程序中从网址流式传输视频
使用 AirPlay 播放本地视频文件
启用屏幕镜像到 Apple TV
在Flutter应用中集成原生视频播放
为iOS构建媒体播放器功能
主要特点
原生 AVPlayer 集成
iOS 上的 AirPlay 支持
两个专用的视频播放小部件
URL 和文件路径视频源
仅限iOS平台的目标
适合对象
iOS 媒体应用
视频流媒体应用
需要 AirPlay 功能的应用程序
针对苹果生态系统的开发者
需要视频播放功能的Flutter项目
使用建议
仅限 iOS – Android 上不可用
需要 iOS 10+ 才能获得完整的 AirPlay 支持
仅限视频播放 – 无音频模式
不支持后台播放
取决于设备的 AirPlay 可用性
原始 README
以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。
flutter_to_airplay
Flutter plugin that offers two widgets, one to play a video for given url or file path using native AVPlayer and second with an option to airplay it on available Apple devices.
Sponsor/Support
If you like my work, and want to support me so that I can invest more time in improving it, please consider buying me a coffee.
Getting Started
This plugin provides two widgets,
1- AirPlayRoutePickerView
Its tintColor, activeTintColor and backgroundColor, can be set to suit the overall theme of application.