ryanheise / audio_service

Flutter plugin to play audio in the background while the screen is off.
782 stars 458 forks source link

Basic Example Error on iOS #1069

Open kkh975 opened 1 month ago

kkh975 commented 1 month ago

Documented behaviour

MediaControl

Actual behaviour

I ran the default sample App in this project, but I can't see any buttons like play, pause, etc. in the control center.

  1. play the something Simulator Screenshot - iPhone 15 - 2024-05-05 at 22 36 23

  2. go to control center Simulator Screenshot - iPhone 15 - 2024-05-05 at 22 36 32

  3. button is there. but it isn't there. Simulator Screenshot - iPhone 15 - 2024-05-05 at 22 48 12

Minimal reproduction project

Official example: main.dart

Reproduction steps

  1. Play button click
  2. Show control pannel.

Output of flutter doctor


[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.88.1)
[✓] Connected device (3 available)
[✓] Network resources```

### Devices exhibiting the bug
iOS17.4
iPhone 15
devilbuddy commented 1 month ago

I have pretty much the same issue in my app as well. On Android everything is working great, but on iOS (Simulator, Iphone 15 Pro Max, ios 17.0) I have the same "invisible button" as @kkh975.

In addition to this, the position and duration is not showing.

`Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1 23E224 darwin-arm64, locale en-SE) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.3) [✓] IntelliJ IDEA Community Edition (version 2024.1.1) [✓] VS Code (version 1.89.1) [✓] Connected device (5 available) [✓] Network resources

• No issues found!`

image

ryanheise commented 1 month ago

One thing I could suggest is testing older versions of audio_service to see if it is a bug that was introduced recently. If that turns out to be the case, that may make it easier for me to implement a fix.

ryanheise commented 1 month ago

Also, I would suggest testing with precisely the sample apps in this repo to rule out anything in your own app causing the issue. There are known issues with the control center not display buttons directly in the Simulator, while working perfectly on a physical device. But since you are testing on a physical device, for you I would suggest the other points I listed.