StuckPlayerException


@UnstableApi
class StuckPlayerException : IllegalStateException


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

The type of stuck playback.

Constants

const Int

The player is stuck because it's in STATE_BUFFERING, needs to load more data to make progress, but is not loading.

const Int

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.

const Int

The player is stuck because it's in STATE_READY, but it's not able to end playback despite exceeding the declared duration.

const Int

The player is stuck because it's in STATE_READY, but no progress is made.

const Int

The player is stuck with a suppression reason other than PLAYBACK_SUPPRESSION_REASON_NONE or PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS.

Public constructors

StuckPlayerException(
    @StuckPlayerException.StuckType stuckType: Int,
    timeoutMs: Int
)

Creates an instance.

Public functions

Boolean
equals(obj: Any?)
Int

Public properties

Int

The type of stuck playback.

Int

The timeout after which the exception was triggered, in milliseconds.

Constants

STUCK_BUFFERING_NOT_LOADING

const val STUCK_BUFFERING_NOT_LOADING = 0: Int

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

const val STUCK_BUFFERING_NO_PROGRESS = 1: Int

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

const val STUCK_PLAYING_NOT_ENDING = 3: Int

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

const val STUCK_PLAYING_NO_PROGRESS = 2: Int

The player is stuck because it's in STATE_READY, but no progress is made.

STUCK_SUPPRESSED

const val STUCK_SUPPRESSED = 4: Int

The player is stuck with a suppression reason other than PLAYBACK_SUPPRESSION_REASON_NONE or PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS.

Public constructors

StuckPlayerException

StuckPlayerException(
    @StuckPlayerException.StuckType stuckType: Int,
    timeoutMs: Int
)

Creates an instance.

Parameters
@StuckPlayerException.StuckType stuckType: Int

The type of stuck playback.

timeoutMs: Int

The timeout after which the exception was triggered, in milliseconds.

Public functions

equals

fun equals(obj: Any?): Boolean

hashCode

fun hashCode(): Int

Public properties

stuckType

@StuckPlayerException.StuckType
val stuckTypeInt

The type of stuck playback.

timeoutMs

val timeoutMsInt

The timeout after which the exception was triggered, in milliseconds.