搜尋套件、儲存庫與 APP 分類

flutter_to_airplay 封面
套件詳情v2.4.0

flutter_to_airplay

Flutter 插件提供兩個小部件,一個用於使用原生 AVPlayer 播放給定 URL 或檔案路徑的影片,另一個則可選擇將影片投射到可用的 Apple 設備上。

iOS
近 30 天下載
6970
喜歡數
49
Pub 分數
150

安裝套件

flutter pub add flutter_to_airplay

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個適用於 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.

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

所屬分類

原始碼儲存庫

使用此套件的專案