-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Support choosing preferred audio device #1993
Comments
Hi! When this feature is going to be supported? |
Sadface... Just spent many days building a very specific exoPlayer only to discover that I can't setPreferredDevice. Any chance there is a known workaround to achieve this? |
I don't think there's a convenient workaround at the moment unless you fork/patch The original plan was to expose a compatibility wrapper for |
FWIW, I have a fork (it's a few versions behind) that added this capability for my own app. It's not really suitable for a pull request, but could be a decent starting point. https://github.com/keyboardr/ExoPlayer/tree/output-device |
Thanks so much for your replies, kind sirs. |
Hi @andrewlewis . I checked out the YouTube video of yours and @ojw28's presentation at io 2017 btw and thought it was great. @keyboardr I did try to implement the mods in your fork, but I was unable to get them to work. Again, it appears my skills are not quite that advanced... yet. ( ^ – ^ ) |
Hi every one once again! Sorry for off top, but is there a solid way to set preferred output device for an application sounds that it will not reroute, for example, sounds from third party apps like music app? AudioTrack#setPreferredDevice helps, but it doesn't work on some devices, especially, on Xiaomi Redmi x4 doesn't work, but on nexus 5x or nexus 6 it works. Maybe you can advise some sources to read and explore. Thanks in advance! |
Any movement on this? |
I'm afraid not. I'll plan to update this issue when we get round to it. |
FWIW, I was able to change how I do this in my app so that I don't need to fork the entirety of ExoPlayer anymore. I then have another class extend Now instead of a careful rebase with all of ExoPlayer, I only need to worry about updating two classes, one of which rarely needs anything changed. It would still be better if |
@andrewlewis Please update this. There are a lot of users on S/PDIF who are unable to get proper eac3 because exoplayer does not detect and allow passthrough via optical cable |
@andrewlewis we are working a number of issues with our customers around audio routing, not an easy problem. The universe of Android STB's we support includes everything from the simple (Xiaomi MI, with Bluetooth, Optical micro SPIDF, headphone, HDMI) to boxes that even include composite video connectors. Pass-thru is particularly tricky, we have experienced vendor and android platform code that did not support correctly reporting the user settings for Pass-thru, so this could be part of the issue. The bug cause the STB not to report correct (MediaCodecInfo) so ExoPlayer could not properly select the raw (pass-thru) codec. We have @sneelavara working this issue for us, we would be happy to contribute with testing as well as coding. Our preference would be to support a TrackSelection API to express the requested audio path, the decision for how to set this could come from watching the MediaRouter API's |
Expose
setPreferredDevice(AudioDeviceInfo)
inAudioTrack
on API 23+. This would allow developers to play audio on a specific output device.The text was updated successfully, but these errors were encountered: