v2.0.1flutter_playout
此外掛程式提供從 URL 播放音訊/影片的功能,支援背景音訊播放、鎖定畫面控制與播放器事件,適用於 iOS 與 Android。
Flutter 中的 AV 播放
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
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.
See below for example of apps using flutter_playout.
Send a pull request to list your app here.
| screenshot1 | screenshot4 | screenshot3 |
| screenshot5 | screenshot6 |
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.
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.
Please see example app on how to implement multi-audio for Android. On iOS multi-audio is provided natively by the AVPlayer.
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.