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

Force setting the audio output device #9694

Closed
Romantic-LiXuefeng opened this issue Nov 16, 2021 · 2 comments
Closed

Force setting the audio output device #9694

Romantic-LiXuefeng opened this issue Nov 16, 2021 · 2 comments
Assignees
Labels

Comments

@Romantic-LiXuefeng
Copy link

In the application scene, When I'm playing the movie with ExoPlayer on Phone, normally the sound output through the speaker. When a headphone is plugged into the jack, the sound directly to the headphone. I hope even if a headphone is plugged into the jack, I still need to force output through the phone speaker. At the same time, I want to use the headphone to communicate with other guys. Is there any way to implement this?

@Romantic-LiXuefeng
Copy link
Author

Romantic-LiXuefeng commented Nov 16, 2021

forcing-sound-output-through-speaker-in-android This worked to force sound output through speaker when ExoPlayer playing the movie if a headphone is plugged into the jack. But at the same time, to open the audio player app, the audio's sound also output through speaker, not headphone.

@krocard
Copy link
Contributor

krocard commented Nov 17, 2021

Media Routing supports changing the output device, but I believe speaker and wired headphones are considered the same device, so your use-case doesn't seem supported.

They are other ways to control the audio routing but are either system APIs or too crude to support your use-case (eg: setSpeakerphoneOn).

Closing as this is not related to ExoPlayer but media routing APIs in general.

@krocard krocard closed this as completed Nov 17, 2021
@google google locked and limited conversation to collaborators Jan 17, 2022
@ojw28 ojw28 removed the needs triage label Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants