You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update to audioplayers v5
* Update audioplayers impl:
Emit error if set source fails to set ready state
Implement new release method
Return NULL in align with audioplayers API
Fix playbin identification in on media state change
* Update note on supported version of audioplayers
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ If you encounter issues running flutter-pi on any of the supported platforms lis
42
42
2.2 [Building the App](#building-the-app-new-method-linux-only)
43
43
2.3 [Running your App with flutter-pi](#running-your-app-with-flutter-pi)
44
44
2.4 [gstreamer video player](#gstreamer-video-player)
45
+
2.5 [audioplayers](#audioplayers)
45
46
3.**[Performance](#-performance)**
46
47
3.1 [Graphics Performance](#graphics-performance)
47
48
3.2 [Touchscreen latency](#touchscreen-latency)
@@ -417,6 +418,18 @@ To use the gstreamer video player, just rebuild flutter-pi (delete your build fo
417
418
418
419
And then, just use the stuff in the official [video_player](https://pub.dev/packages/video_player) package. (`VideoPlayer`, `VideoPlayerController`, etc, there's nothing specific you need to do on the dart-side)
419
420
421
+
### audioplayers
422
+
As of current moment flutter-pi implements plugin for`audioplayers: ^5.0.0`.
423
+
There are several things you need to keep in mind:
424
+
- As flutter-pi is intended for use on constrained systems like raspberry pi, you should avoid creating multiple temporary instances and instead prefer to use one global instance of `AudioPlayer`. There is limit you can easily hit if you're going to spam multiple instances of `AudioPlayer`
425
+
- Plugin was tested to work with ALSA and `pulseaudio` might prevent the plugin from playing audio correctly:
426
+
- Hence please make sure you delete `pulseaudio` package from your system.
427
+
- Make sure you have `gstreamer1.0-alsa` package installed in addition to packages needed for gstreamer video player.
428
+
- Make sure you can list audio devices using command: `aplay -L`
429
+
- If there is error, please investigate why and fix it before using audio
430
+
- One of the common reasons is outdated ALSA config in which case you should delete existing config and replace it with up to date one
431
+
- Finally, if you want to verify your audio setup is good, you can use `gst-launch` command to invoke `playbin` on audio file directly.
432
+
420
433
## 📊 Performance
421
434
### Graphics Performance
422
435
Graphics performance is actually pretty good. With most of the apps inside the `flutter SDK -> examples -> catalog` directory I get smooth 50-60fps on the Pi 4 2GB and Pi 3 A+.
0 commit comments