ryanheise / just_audio

Audio Player
1.03k stars 638 forks source link

[linux] just_audio_background/example #1199

Open jwinarske opened 6 months ago

jwinarske commented 6 months ago

Which API doesn't behave as documented, and how does it misbehave? functional unit test case

Minimal reproduction project just_audio_background/example

To Reproduce (i.e. user steps, not code)

cd just_audio_background/example
flutter create .
flutter run -d linux

Error messages

Loading swirl is permanently shown. Flutter log output indicates mpv is running:

flutter: MPV 40acd426-b1bf-41d1-9c02-fad0f27549e4 loaded track

Expected behavior Load track and play...

Desktop (please complete the following information):

Flutter SDK version

[!] Flutter (Channel [user-branch], 3.19.2, on Fedora Linux 39 (Workstation Edition) 6.7.7-200.fc39.x86_64, locale en_US.UTF-8)
    ! Flutter version 3.19.2 on channel [user-branch] at /mnt/raid10/workspace-automation/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 7482962148 (6 days ago), 2024-02-27 16:51:22 -0500
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6 (Fedora 17.0.6-2.fc39)
    • cmake version 3.27.7
    • ninja version 1.11.1
    • pkg-config version 1.9.5

[✓] VS Code (version 1.87.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.84.0

[✓] Connected device (2 available)
    • Linux (desktop)            • linux              • linux-x64 • Fedora Linux 39 (Workstation Edition) 6.7.7-200.fc39.x86_64
    • Toyota homescreen (mobile) • desktop-homescreen • linux-x64 • homescreen x86_64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Additional context

jwinarske commented 6 months ago

Screencast of issue. Screencast from 2024-03-04 17-39-18.webm

ryanheise commented 6 months ago

Can you test audio_service directly to narrow down the issue? just_audio_background is sort of an umbrella project that brings together a large number of other projects. If the issue exists with audio_service, then it's best to investigate it in that repository.

jwinarske commented 6 months ago

testing audio_service/example behaves identical to just_audio/example.

Track feedback indicates it's playing, no sound. Log output:

flutter: Configure AudioServiceLinux.
flutter: setQueue() has not been implemented.
flutter: Get org.mpris.MediaPlayer2.Player.Volume not implemented
flutter: GetPosition(): 0:00:00.000000
flutter: Get org.mpris.MediaPlayer2.Player.Volume not implemented
flutter: GetPosition(): 0:00:00.000000
flutter: MPV 3fa9facd-1563-49ce-aff7-73f745bccc5a started
flutter: MPV 3fa9facd-1563-49ce-aff7-73f745bccc5a loading track...
flutter: {type: progressive, id: b7eb14fb-44d5-4c62-957d-f95c373ea194, uri: https://s3.amazonaws.com/scifri-episodes/scifri20181123-episode.mp3, headers: null, options: null}
flutter: MPV 3fa9facd-1563-49ce-aff7-73f745bccc5a loaded track
Syncing files to device Linux...                                    51ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Linux is available at: http://127.0.0.1:40771/Am_rK1oA4U4=/
The Flutter DevTools debugger and profiler on Linux is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:40771/Am_rK1oA4U4=/

https://github.com/bleonard252/just_audio_mpv/issues/15

ryanheise commented 6 months ago

The mpv readme also suggests just_audio_media_kit. Have you tried it?