media
media copied to clipboard
Force reset ExoPlayer internals to generate new audioSessionId and clear audio tracks
Some devices have bugs with Android DynamicsProcessing and changing the output device.
At this point I'm pretty sure this is an OS / device but so I'm looking for ways to workaround that in the best possible way.
Attach the EQ when ExoPlayer gives the audioSessionId play something , connect or disconnect a BT device resume playback ExoPlayer plays and logs shows everything is working correctly but there's no sound. Detach EQ, attach EQ again and the sound can now be heard.
I tried to auto detach / attach the EQ on route change but this does not work, it seems it needs to be done with some delay or after the audiotrack is restarted by ExoPlayer.
Since I do not think this is ExoPlayer related I'm mostly looking for the best workaround to reset ExoPlayer without disposing and recreating if it's possible.
Bump on this, this is the same kind as https://github.com/androidx/media/issues/1410 or even https://github.com/androidx/media/issues/787 that what had 0 reaction since 2023. This is a big issue for the users.