androidx / androidx/media

Playback remains stuck in loading state

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

@microkatz is already working on this.

Since Dec 8, 2025.

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

Description

Version

Media3 main branch

More version details
Description of the Bug

We are encountering a regression where video playback occasionally stalls and remains in a perpetual loading state. This issue occurs approximately one out of four times when attempting to play a stream.

Reproduction Details and Specific Conditions

The bug is not reproducible using the manifests provided within the demo application. It appears to be highly dependent on a specific combination of stream characteristics and player initialization settings:

  • Hardware DRM: The video stream must be protected with Hardware DRM.
  • Default Subtitles: The stream must have a default subtitle track selected.
  • Start Position: Playback must be initiated at a specific, non-zero timecode (i.e., calling player.seekTo(timecode)).

When all three conditions are met, the player fails sometime (1/4) to transition from the loading state to the playing state

Version and Regression Identification

Version Introduced: The bug appeared after upgrading to version 1.5.1.

Suspected Commit: I was able to narrow down the regression to the following commit:

https://github.com/androidx/media/commit/e8664dbc8e796c7bc7d07161b69eca4da5d69a93

Workaround

We have found a temporary workaround that successfully mitigates the issue:

Before calling player.prepare(): Disable the default subtitle track.

After the player reaches the "prepared" state: Re-enable the subtitle track.

Devices that reproduce the issue

Nvidia shield tv

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes but with our manifest

Reproduction steps

None

Expected result

Playback always plays successfully

Actual result

Playback stuck sometime in loading state

Media

I am unable to share the specific manifest that reproduces this issue as it is protected by DRM.

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.