FLUTTER ECOSYSTEM

MrJai/flutter_to_airplay

Flutter 插件提供两个小部件,一个用于使用原生 AVPlayer 播放给定 URL 或文件路径的视频,另一个则可选择在可用的 Apple 设备上进行 AirPlay。

flutter_to_airplay 项目封面
Stars
38
Forks
55
最近推送(UTC)
2025年9月23日
项目状态
未归档
Junaid Rehmat GitHub avatar
GITHUB User

Junaid Rehmat ↗

Husband | Father | Developer | #flutter | #Swift | #objective-C | flutter | react native | collaborate, develop, contribute, and network.

语言DartSwiftRubyPythonObjective-C

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 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.

Buy 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.

AirPlayRoutePickerView(
                tintColor: Colors.white,
                activeTintColor: Colors.white,
                backgroundColor: Colors.transparent,
              )
2- FlutterAVPlayerView

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',
            ),

Screenshots

Video iPhone Airplay iPhone Video iPad Airplay iPad
iPhoneVideo_Butterfly iPadVideo_Butterfly AirPlayiPhone AirPlayiPad

TODO:

  • [x] Allow videos add to the Flutter project.
  • [ ] Allow videos from more sources, Youtube, etc.

Disclaimers:

  • Please suggest if you want a feature added to this utility
  • Please feel free to add any issues or open PRs, I will be actively looking to add to these utilities.

Credit: Inspired by Package

FlutterAirplayPlugin