Search packages, repositories and app categories

flutter_to_airplay cover
Package detailsv2.4.0

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.

iOS
30-day downloads
7K
Likes
49
Pub points
150

Install package

flutter pub add flutter_to_airplay

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter plugin for iOS that provides two widgets to play videos from a URL or file path using native AVPlayer. The second widget includes AirPlay integration, enabling users to stream video content to nearby Apple devices like Apple TV. Designed specifically for iOS, it leverages platform-specific capabilities for smooth playback and seamless AirPlay support. Ideal for media apps requiring high-quality video playback with streaming options.

Use cases

  • Streaming videos from URLs in apps
  • Playing local video files with AirPlay
  • Enabling screen mirroring to Apple TV
  • Integrating native video playback in Flutter apps
  • Building media player features for iOS

Key features

  • Native AVPlayer integration
  • AirPlay support on iOS
  • Two dedicated video playback widgets
  • URL and file path video sources
  • iOS-only platform targeting

Suitable for

  • iOS media applications
  • Video streaming apps
  • Apps requiring AirPlay functionality
  • Developers targeting Apple ecosystem
  • Flutter projects with video playback needs

Considerations

  • iOS only – not available on Android
  • Requires iOS 10+ for full AirPlay support
  • Limited to video playback – no audio-only mode
  • No support for background playback
  • Depends on device availability for AirPlay

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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

Categories

Source repository

Projects using this package