Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-ios headset not able to pause when playback speed more than 1.0 #1016

Open
mhassan772 opened this issue May 2, 2023 · 5 comments
Open

Comments

@mhassan772
Copy link

mhassan772 commented May 2, 2023

Documented behaviour

You encapsulate your audio code in an audio handler which implements standard callbacks on Android, iOS and the web that allow it to respond to playback requests coming from your Flutter UI, headset buttons, the lock screen, notification, iOS control center, car displays and smart watches, even when the app is in the background:

Actual behaviour

when you click on pause on the headset nothing happens. the audio just keeps playing

Minimal reproduction project

Official example: example_playlist.dart

Reproduction steps

  1. Connect your non-ios Bluetooth headset. (I tested with Bose)
  2. Start playing the audio and notice that you can start and pause using the headset with no problem.
  3. Increase the speed to more than 1.0.
  4. Start the player and notice that you are not able to pause with the headset anymore.

Output of flutter doctor

│ A new version of Flutter is available!                  │
│                                                         │
│ To update to the latest version, run "flutter upgrade". │
└─────────────────────────────────────────────────────────┘
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.8, on macOS 13.3.1 22E261 darwin-x64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.77.3)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Devices exhibiting the bug

iPhone 11 with Bose headset

@ryanheise
Copy link
Owner

Minimal reproduction project

Official example: main.dart

That example, specifically?

Increase the speed to more than 1.0

That example does not include any feature to change the speed. If you're expecting me to change the code, then you haven't read the instructions for submitting a bug report. The reproduction steps are "user steps", i.e. things in the user interface that I should click on. Please fix your bug report accordingly.

I am also curious why the speed needs to be changed. Are you saying that your Bose headset's button will successfully play/pause if the speed is 1.0, and only fails when it is > 1.0? Please clarify. Also, are you saying that your Bose headset's button does work successfully on other apps when changing the speed to more than 1.0? Please clarify.

Do you have access to other headsets? Different headsets may have different capabilities and compatibilities with iOS devices, also, so it may turn out that this is a Bose issue and not an audio_service issue. Please clarify.

@mhassan772
Copy link
Author

mhassan772 commented May 2, 2023 via email

@mhassan772
Copy link
Author

If you are okay for me to skip changing the changlog and follow the other instructions and just do the pull request with the code change I can do that now. I am sure it is working 100%.
But I am happy to follow the instructions but it will take me some time.

@ryanheise
Copy link
Owner

Definitely a pull request would be welcome. After seeing your PR I may have a better idea of what the issue might be, given that I don't have a Bose headset myself to test on. After that, editing this bug report may still be helpful so that other people who have the same Bose headset will be able to follow the same reproduction steps.

I think you ought to be able to use the example_playlist.dart example instead of the main.dart example since that one contains a UI element for adjusting the speed.

@mhassan772 mhassan772 mentioned this issue May 3, 2023
7 tasks
ddfreiling added a commit to Notalib/audio_service that referenced this issue Sep 28, 2023
@mhassan772
Copy link
Author

Hey I know you must be busy but I have been using this in my app since then and it is working like a charm. Is there a reason why it is not migrated into the main branch?
Also I am thinking of investing a lot of time to get the iOS in parity with the skip silence and audio boost but I am worried it won’t be merged like this one. I just want a confirmation from you that it will be treated differently. Thanks for understanding
@ryanheise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants