androidx / androidx/media

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

Open
#1,397 1 comment 0 reactions 1 assignee View on GitHub

@rohitjoins is already working on this.

Since May 31, 2024.

needs triage question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.