v2.1.0flutter_to_airplay
Flutter 插件提供兩個小部件,一個用於使用原生 AVPlayer 播放給定 URL 或檔案路徑的影片,另一個則可選擇將影片投射到可用的 Apple 設備上。
Flutter 插件提供兩個小部件,一個用於使用原生 AVPlayer 播放給定 URL 或檔案路徑的影片,另一個則可選擇在可用的 Apple 設備上進行 AirPlay。
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
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.
This plugin provides two widgets,
Its tintColor, activeTintColor and backgroundColor, can be set to suit the overall theme of application.
AirPlayRoutePickerView(
tintColor: Colors.white,
activeTintColor: Colors.white,
backgroundColor: Colors.transparent,
)
For now it supports either local file added to flutter project, or a video url.
To play a network video for given url:
FlutterAVPlayerView(
urlString:
'https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4',
),
To play a local video added to the flutter project:
child: FlutterAVPlayerView(
filePath: 'assets/videos/butterfly.mp4',
),
| Video iPhone | Airplay iPhone | Video iPad | Airplay iPad |
|---|---|---|---|
| iPhoneVideo_Butterfly | iPadVideo_Butterfly | AirPlayiPhone | AirPlayiPad |