Skip to content

Playback remains stuck in loading state #2927

@galoway

Description

@galoway

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:

e8664db

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions