audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

does not work at flutter-pi

Open BigGitWorld opened this issue 2 years ago • 4 comments

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.

BigGitWorld avatar Jun 08 '22 15:06 BigGitWorld

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.

luanpotter avatar Jun 09 '22 00:06 luanpotter

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?

BigGitWorld avatar Jun 11 '22 05:06 BigGitWorld

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.

luanpotter avatar Jun 14 '22 04:06 luanpotter