Skip to content

OnePlus devices can't recover from IDLE state #3218

@Flyktsodan

Description

@Flyktsodan

We have noticed a strange pattern for OnePlus devices. When playing content, pausing and waiting for a certain amount of time (can be 10 mins up to several hours) the player will be stopped and put in a IDLE state.

When the users come back to the app and try to play content again, it works most of the time but in some cases the player simply goes silently from BUFFERING back to IDLE. The users end up in a "stale" player that can not resume playback. Shutting down the service and starting it again seems to be the only way to recover.
We have extensive logging across the player path, but none of the usual suspects fire: no onPlayerError, no onPlayWhenReadyChanged due to audio focus, no playback suppression, no onPlaybackResumption callback, no ForegroundServiceStartNotAllowedException, manifest still valid.

It is very difficult to reproduce this and usually one happens after the player has been in a IDLE state for a long period of time.

I know this might be difficult to answer but I was wondering if someone else has seen a similar pattern and if you have any advice on where to go from here.

Our setup follows the session_service demo closely: a MediaLibraryService (so we also serve Android Auto), hosting a ForwardingPlayer that wraps ExoPlayer with handleAudioFocus = true. The in-app MediaController connects via SessionToken. Standard MediaNotification.Provider, foreground service. Media3 1.9.2.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions