media icon indicating copy to clipboard operation
media copied to clipboard

Force reset ExoPlayer internals to generate new audioSessionId and clear audio tracks

Open Tolriq opened this issue 1 year ago • 1 comments

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.

Tolriq avatar May 25 '24 09:05 Tolriq

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.

Tolriq avatar Jun 12 '24 07:06 Tolriq