androidx / androidx/media

ExoPlayer device volume handling relies on non-public, unreliable API

Open
#2,396 0 comments 0 reactions 1 assignee View on GitHub

@tianyif is already working on this.

Since May 7, 2025.

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

Description

Version

Media3 1.6.1

More version details

No response

Devices that reproduce the issue

N/A

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

No

Reproduction steps

ExoPlayer tracking of device volume for Player.COMMAND_GET_DEVICE_VOLUME relies on a non-public and evidently unreliably framework API: android.media.VOLUME_CHANGED_ACTION. This prevents reasonable and dependable implementation of COMMAND_GET_DEVICE_VOLUME.

https://github.com/androidx/media/blob/839c4a90f2ab36e48be73e1b5e907f3283dce72e/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/StreamVolumeManager.java#L52-L54

The referenced issuetracker entry is non-public, but I found another: https://issuetracker.google.com/issues/333967641. The issue is P4, so in its present state it will likely be closed as "obsolete" and re-filed a dozen more times.

Can the media3 team raise the issue's urgency via internal Google channels to address the problem?

Evidence of the non-public Intent's lack of reliability stems from the linked stackoverflow issue and similar ones: https://stackoverflow.com/questions/11318933/listen-to-volume-changes-events-on-android/

Looking at the non-public Intent in AudioManager reveals that there may be a need to make another Intent public, android.media.STREAM_MUTE_CHANGED_ACTION. Documentation for VOLUME_CHANGED_ACTION does not suggest that it reflects changes in stream mute state.

Expected result

N/A

Actual result

N/A

Media

N/A

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

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.