audioplayers
audioplayers copied to clipboard
does not work at flutter-pi
Hi!
I'm using the [1.0.0-rc.4](https://pub.dev/packages/audioplayers/versions/1.0.0-rc.4)
that works fine in an Linux ubuntu desktop.
but when I use it in a flutter-pi project, it shows me the below error:
[compositor] Preferred framebuffer depth for hardware cursor is not supported by flutter-pi.
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method setSourceUrl on channel xyz.luan/audioplayers)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:165:7)
<asynchronous suspension>
#1 AudioPlayer.play (package:audioplayers/src/audioplayer.dart:112:5)
<asynchronous suspension>
Do I have to do something to work in raspberrypi by flutter-pi? Note: sound is enabled in my raspberry pi.
No implementation found for method setSourceUrl
That is very interesting, it appears Flutter is not recognizing your flutter-pi as "linux" in order for audioplayers to use the correct binding. Could you please try using any other flutter dependencies with native linux code? I wonder if this is an issue with Flutter itself.
That is very interesting, it appears Flutter is not recognizing your flutter-pi as "linux" in order for audioplayers to use the correct binding.
But why this has to be happened?
Could you please try using any other flutter dependencies with native linux code? I wonder if this is an issue with Flutter itself.
What do you mean exactly? Do you mean I use audioplayers_linux
package directly in my project? or use another flutter package with a native linux code?
if the second is right, I'm using other packages such as flutter_libserialport
in my flutter-pi project and it is working fine.
I found a similar issue in the flutter-pi
page: flutter-pi sound support.
Can you clarify how do I have to use it?
or use another flutter package with a native linux code
yes that is what I meant. interesting, I don't understand why flutter_libserialport
works and AP doesn't. I compared our configurations for the linux binding; the only difference is that libserialport does not use federation and we do. But that should not affect anything.
I just tried running our example (packages/audioplayers/example
) on my Arch Linux and it worked. Could you please try clonning the repo and running that on your raspberry pi? I wonder if something else is causing interference.