StuckPlayerException
@UnstableApi
public final class StuckPlayerException extends IllegalStateException
| java.lang.Object | |||||
| ↳ | kotlin.Throwable | ||||
| ↳ | java.lang.Exception | ||||
| ↳ | java.lang.RuntimeException | ||||
| ↳ | java.lang.IllegalStateException | ||||
| ↳ | androidx.media3.common.util.StuckPlayerException |
Exception thrown when the player is stuck in STATE_READY or STATE_BUFFERING while getPlayWhenReady is true without observable progress and no means of unblocking itself.
Summary
Nested types |
|---|
@DocumentedThe type of stuck playback. |
Constants |
|
|---|---|
static final int |
The player is stuck because it's in |
static final int |
The player is stuck because it's in |
static final int |
The player is stuck because it's in |
static final int |
The player is stuck because it's in |
static final int |
STUCK_SUPPRESSED = 4The player is stuck with a suppression reason other than |
Public fields |
|
|---|---|
final int |
The type of stuck playback. |
final int |
The timeout after which the exception was triggered, in milliseconds. |
Public constructors |
|---|
StuckPlayerException(Creates an instance. |
Inherited methods |
|---|
Constants
STUCK_BUFFERING_NOT_LOADING
public static final int STUCK_BUFFERING_NOT_LOADING = 0
The player is stuck because it's in STATE_BUFFERING, needs to load more data to make progress, but is not loading.
STUCK_BUFFERING_NO_PROGRESS
public static final int STUCK_BUFFERING_NO_PROGRESS = 1
The player is stuck because it's in STATE_BUFFERING, but no loading progress is made and the player is also not able to become ready.
STUCK_PLAYING_NOT_ENDING
public static final int STUCK_PLAYING_NOT_ENDING = 3
The player is stuck because it's in STATE_READY, but it's not able to end playback despite exceeding the declared duration.
STUCK_PLAYING_NO_PROGRESS
public static final int STUCK_PLAYING_NO_PROGRESS = 2
The player is stuck because it's in STATE_READY, but no progress is made.
STUCK_SUPPRESSED
public static final int STUCK_SUPPRESSED = 4
The player is stuck with a suppression reason other than PLAYBACK_SUPPRESSION_REASON_NONE or PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS.
Public fields
timeoutMs
public final int timeoutMs
The timeout after which the exception was triggered, in milliseconds.
Public constructors
StuckPlayerException
public StuckPlayerException(
@StuckPlayerException.StuckType int stuckType,
int timeoutMs
)
Creates an instance.
| Parameters | |
|---|---|
@StuckPlayerException.StuckType int stuckType |
|
int timeoutMs |
The timeout after which the exception was triggered, in milliseconds. |