ryanheise / just_audio

Audio Player
1.05k stars 672 forks source link

[just_audio_background] buttons not visible in Android in case of single audio source #1186

Open mbenci opened 8 months ago

mbenci commented 8 months ago

Which API doesn't behave as documented, and how does it misbehave? Using just_audio_background package and in Android platform only, control Buttons previous / play / pause / next that generally appear on the background running player if I reproduce only one audio or a playlist made of only one audio

Minimal reproduction project Provide a link here using one of two options: Modify the just_audio_background/example/lib/main.dart leaving only one audio in playlist then execute it The same problem appears if instead of playlist as AudioSource I set a single AudioSource.uri

To Reproduce (i.e. user steps, not code) Execute just_audio_background/example/lib/main.dart in Android device Start any song from a playlist with one element o ar single AudioSource Drag background running player from the top. You'll notice control buttons are not visible.

Error messages None on the debug console

Expected behavior As in iOS, all buttons must be visible. In particulary in case of single song next buttons must be disabled and play/pause button active.

Screenshots just_audio_background_3 just_audio_background_2 just_audio_background_1

Desktop (please complete the following information): OS: Mac OS

Smartphone (please complete the following information): Device: Oppo A96 OS: Android 13

Flutter SDK version Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.8, on macOS 14.2.1 23C71 darwin-arm64, locale it-IT) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 15.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.85.2) [✓] Connected device (3 available) [✓] Network resources

Additional context None

JensTaken commented 5 months ago

Any progress here? Or should we just fill a playlist with random songs or smth?

ryanheise commented 5 months ago

I'm sorry, I'm unable to reproduce this issue on my Pixel. If it is an issue specifically with Oppo devices, someone with that device may want to consider experimenting with the code and contributing a fix.

JensTaken commented 5 months ago

I'm sorry, I'm unable to reproduce this issue on my Pixel. If it is an issue specifically with Oppo devices, someone with that device may want to consider experimenting with the code and contributing a fix.

Hmmm, it seems to be an IOS issue only i can confirm. I also want to thank you for your efforts on this project, just as a kind reminder :) keep it up!

ryanheise commented 5 months ago

This issue regards Android specifically. Would you like to report a new bug regarding iOS?