ryanheise / audio_service

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

No sound when playing an audio. #824

Closed wilson-christian closed 3 years ago

wilson-christian commented 3 years ago

Which API doesn't behave as documented, and how does it misbehave? Issue occurs when trying to play audio, slider position changes but the audio isn't audible i.e. you won't hear any sound as if its mute.

Minimal reproduction project Provide a link here using one of two options:

  1. Fork this repository and modify the example to reproduce the bug, then provide a link here.
  2. If the unmodified official example already reproduces the bug, just write "The example".

To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:

  1. Try to play audio on real iPhone device

Error messages

Ignoring setPlaybackState because application does not contain entitlement com.apple.mediaremote.set-playback-state for platform

Expected behavior Audio plays and is audible on all devices.

Screenshots N/A

Runtime Environment (please complete the following information if relevant):

Flutter SDK version

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel unknown, 2.6.0-5.1.pre, on Microsoft Windows [Version 10.0.19042.1237], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.2)
[√] Connected device (2 available)

Additional context

ryanheise commented 3 years ago

You still missed the minimal reproduction project section. Leaving in the section heading but neglecting to fill in the section does not actually fix what was wrong with your last issue.

SarvagyaVaish commented 3 years ago

@ryanheise I think we figured out the issue and why we were unable to reproduce it consistently.

On iOS, if the phone is muted the audio won't play. Looking through the documentation now to see if there's a way to set the streams/channels on iOS. If you have any suggestions or if you can point me to the right place in the docs, I would really really appreciate it. Wilson and I are working on a podcast app and this is a critical bug preventing our users from being able to play episodes while their phones are muted.

Thanks in advance!! Really appreciate any help at all you can provide.

ryanheise commented 3 years ago

Although I would help if I could, I don't understand how you can expect help when you closed the issue and you also never provided a minimal reproduction project and correct reproduction steps. If I can't even reproduce the problem, how am I going to help?

SarvagyaVaish commented 3 years ago

Thanks for the quick reply :) I am realizing that the right place for this question might be SO, since it's not really an issue (hopefully) and more of a question about how to configure the package so that the audio isn't stopped by the iOS Silent switch.

I created a Stack Overflow post here. Do you think this is better? Let me know if there's any additional information I should add.

Also, great work on this package! To show my appreciation, I have become a "sponsor" of your work and will continue to help out in a small way as long as my company continues to use your packages :)

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.