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

Ability to play sound from the earpiece #382

Open
jesusrp98 opened this issue Apr 18, 2021 · 5 comments
Open

Ability to play sound from the earpiece #382

jesusrp98 opened this issue Apr 18, 2021 · 5 comments
Assignees
Labels
1 backlog enhancement New feature or request

Comments

@jesusrp98
Copy link

Is your feature request related to a problem? Please describe.
Make possible to play audio from the device's earpiece (if available), rather than the main speaker.

Describe the solution you'd like
This is a sample implementation:

final service = AudioPlayer();
service.setSpeaker(AudioPlayerSpeaker.earpiece);
...
@ryanheise
Copy link
Owner

Maybe this needs to be implemented in audio_session.

@jesusrp98
Copy link
Author

Hey @ryanheise! This feature has now been implemented in the latest version of the audio_session package.

Could you take a look at this? The referenced issue is the one from the session package.

@ryanheise
Copy link
Owner

My thinking was that the appropriate location for this feature was the audio_session package rather than to implement it as a feature of just_audio. Are you able to achieve what you want by directly using audio_session?

@vanyasem
Copy link

@ryanheise I'm not the author of the issue, but I was indeed able to achieve my desired result by using audio_session together with just_audio

While it'd surely be convenient to have such functionality built-in just_audio itself, I see the point of it being just audio, to avoid any bloat in the code

I guess this issue can be closed

The only comment I might add is that it's worth to provide an example of using audio_session together with just_audio for less experienced developers, as I've seen a lot of people struggling with that in the comments of other issues

@ryanheise
Copy link
Owner

Thanks for letting me know of your success. Would you mind sharing your recipe notes here in this issue or in an issue on audio_session?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 backlog enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants