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

flutter_playout 封面
套件詳情v2.0.1

flutter_playout

此外掛程式提供從 URL 播放音訊/影片的功能,支援背景音訊播放、鎖定畫面控制與播放器事件,適用於 iOS 與 Android。

AndroidiOS
近 30 天下載
165
喜歡數
234
Pub 分數
140

安裝套件

flutter pub add flutter_playout

套件介紹

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

flutter_playout 是一個 Flutter 插件,可從 URL 播放音訊和影片,並具備強大的背景音訊支援、鎖定畫面控制以及在 Android 和 iOS 上的即時播放器事件處理。專為串流應用設計,即使應用程式被最小化或裝置被鎖定,也能確保無縫的媒體播放。此插件與 Flutter 生態系統順暢整合,為即時串流和點播內容提供可靠效能。特別適用於廣播應用、影片點播平台,以及任何需要持續媒體播放的應用程式。

適用情境

  • 即時廣播流
  • 按需影片播放
  • 播客背景音頻
  • 具有鎖屏控制的媒體應用
  • 跨平台媒體播放器

主要特色

  • 背景音頻播放
  • 鎖屏控制
  • 即時玩家事件
  • 跨平台(iOS 與 Android)
  • 基於URL的媒體來源支援

適合對象

  • 串流應用
  • 音訊/影片播放器
  • 播客應用
  • 媒體豐富的 Flutter 應用
  • 需要持續播放的應用

使用建議

  • 需要平台特定的設定
  • 僅限基於URL的來源
  • 可能需要額外的權限才能在背景中播放音頻
  • 依賴於底層原生媒體框架
  • 未經自訂,不適用於本機檔案播放

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

AVPlayer for Flutter

pub package

Audio & Video player in Flutter. This plugin provides audio/video playback with background audio support, text tracks and lock screen controls for both iOS & Android. It also provides player events such as onPlay, onPause, onTime etc. See example for more details.

  • Video supports HLS and Progressive Steaming for both iOS & Android with multi-audio support.

  • Audio supports playback from URL only.

Apps Using flutter_playout

See below for example of apps using flutter_playout.

  1. MTA International (iOS - Android)

Send a pull request to list your app here.

iOS Example
screenshot1 screenshot4 screenshot3
Android Example
screenshot5 screenshot6

Getting Started

Android

Uses ExoPlayer with PlatformView for Video playback and MediaPlayer for audio playback.

When using this plugin, please make sure you have included a notification icon for your project in drawable resource directory named ic_notification_icon. This plugin will use this icon to show lock screen controls for playback.

iOS

Uses AVPlayer with PlatformView for video playback and AVPlayer with Flutter MethodChannels for audio playback.

Please make sure you've enabled background audio capability for your project. Please also note that the player might not function properly on a simulator.

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.

HLS MultiAudio Support

Please see example app on how to implement multi-audio for Android. On iOS multi-audio is provided natively by the AVPlayer.

Text Tracks Support

To display subtitles, pass in an array of TextTrack sources to the Video widget. You can select a track by providing preferredTextLanguage to the Video widget with a language ISO code for example en or fr. This setup only applies to Android. For iOS please embed text tracks in the HLS manifest.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。