androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.59k stars 377 forks source link

ExoPlayer - Volume become suddenly noisy when it's playing while watching something else #516

Closed Wildyax closed 9 months ago

Wildyax commented 1 year ago

Version

Media3 1.1.0

More version details

No response

Devices that reproduce the issue

OnePlus Nord 2 5G OnePlus 7

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

1 : Play a song with any app that use ExoPlayer as player (I tried with the vlc player for android and the problem only happen with ExoPlayer) 2 : Go out of the app while the song still playing (background playing) 3 : Go on YouTube for example and stay on the home page, wait than a video launch the preview (the preview has no sound by default) and the volume will become suddenly noisy 4 : Scroll to quit the preview and the volume will become normal again

. It does not only occurs with youtube, same problem if I launch some games like Subway Surfers . Also the problem does not occur with some apps like on the video preview on twitter feed

Expected result

Audio should stay at the same volume when a video preview with no sound is playing.

Actual result

The volume become noisy and it can be scary sometimes.

Media

Not applicable

Bug Report

tonihei commented 1 year ago

I cannot observe this when testing on a Pixel 7a.

Wildyax commented 1 year ago

Oh, I see. Maybe this bug only occurs with OnePlus smartphones 🤔 I actually tried it with my brother's Huawei P30 phone and the bug doesn't occur, so for now, it only happens with the mentioned devices. Using VLC player is not required; I just wanted to make sure it doesn't happen with other players. The bug only occurs with an application using exoPlayer (including the demo application). Also I could precise that the OnePlus Nord is on Android 12 (SDK 31).

tonihei commented 1 year ago

Okay, thanks. Does the problem only occur with the YouTube preview? I wonder if either YouTube or the device is modifying the system volume automatically for some reason and then cause the issue you observe. It's also worth checking the system volume sliders for media to see if they change too.

In any case, it sounds like the problem is outside of our libraries and there is no much we can do about it with our code.

tonihei commented 9 months ago

Closing since there has been no further update.