audio_service icon indicating copy to clipboard operation
audio_service copied to clipboard

Basic Example Error on iOS

Open kkh975 opened this issue 1 year ago • 6 comments

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

kkh975 avatar May 05 '24 13:05 kkh975

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

devilbuddy avatar May 20 '24 15:05 devilbuddy

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 avatar May 20 '24 15:05 ryanheise

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.

ryanheise avatar May 20 '24 15:05 ryanheise

That seems to happen also on other versions of audio_service. Just tested it down to 18.0. Also happens on multiple iOS emulators, tested Iphone 15 Pro Max and iPhone SE 3rd gen, iOS: 17.5

GoranSustekJr avatar Jul 14 '24 12:07 GoranSustekJr

Having the same issue. The duration and progress on iOS is missing for some reason. I'm wondering what could be wrong as there's no API for the duration and everything else play / pause / skip / art works perfectly, just everything related to the progress is missing, e.g. I also can't seek as it always returns "0" as position ...

Anyone found a solution?

smn-snkl avatar Feb 26 '25 16:02 smn-snkl