-
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
Not stable audio session, at first start. #6975
Comments
Please provide complete information as requested in the issue template. The issue template can be found here. If you're unable to share bug reports or test content publicly, please send them to dev.exoplayer@gmail.com using a subject in the format "Issue #1234", where "#1234" should be replaced with your issue number. Please also update this issue to indicate you’ve done this. |
@kim-vde [REQUIRED] Reproduction steps [REQUIRED] Link to test content [REQUIRED] A full bug report captured from the device [REQUIRED] Version of ExoPlayer being used [REQUIRED] Device(s) and version(s) of Android being used |
Could you please send a minimal piece of code that I could use to reproduce? Also, what is the type of mMediaPlayer? |
I tried to reproduce the issue but I couldn't. Here is the sample code that I used:
|
@kim-vde , I just checked. This problem only happens with Visualizer. I use SimpleExoPlayer. I tried to change all the settings and the bug is reproduced anyway. |
@kim-vde I just tried to add Visualizer to the Demo application and got the following errors:
|
@kim-vde This error is due to the fact that I did not add the permission to record the sound. Now I'm testing... |
@kim-vde It's hard to reproduce. I found the truth! An audio session doesn't work if it's generated when the application has no audio focus. Only in Visualizer. |
@kim-vde No. I get an audio focus, but the session still doesn't work. Testing. Don't close the bug. |
@kim-vde Perfect! I found the bug! And I was able to finish the demo application so it could reproduce it, too. |
And I've already won the bug with that logic: If you don't think it's a bug, you can close it. |
What happens is that the visualiser is configured while the audio track is being released and rebuilt. Sometimes, the audio track does not exist anymore when the visualiser accesses it, which causes the bug. To fix this, you have 2 possibilities:
We already have plans to avoid recreating audio tracks when possible. Hopefully, this will fix this bug. |
Issue: #6975 PiperOrigin-RevId: 299328798
The first start of the player gives the audio session ID, but once in 5-15 times it does not work. The ID comes through the onAudioSessionId(int id) event {}. Track in flac format.
ID comes correctly, but music is not transmitted through it.
At the same time mMediaPlayer.getAudioSessionId() returns the same, not working ID.
The player plays music correctly but does not pass it to audiosessionId.
Device: Samsung Galaxy s8+ Android 8.0
Version ExoPlayer 2.11.2
I checked the same scenario on other player modules. Classic player and VLC player do not have such a bug.
The text was updated successfully, but these errors were encountered: