OGPlayerError

sealed class OGPlayerError

Sealed hierarchy of playback errors surfaced by the SDK.

Every error carries a stable numeric code (see Codes for the full table), a matching machine-readable codeName, a human-readable message, a retryable hint (true when retrying the same load has a reasonable chance of succeeding), and the underlying Media3 media3ErrorCode + cause for deep debugging. Codes are stable across SDK releases: new codes may be added, existing ones never change meaning.

Typical handling:

override fun onError(error: OGPlayerError) {
analytics.log("playback_error", error.code, error.codeName)
when (error) {
is OGPlayerError.Network -> if (error.retryable) scheduleRetry()
is OGPlayerError.Drm -> showEntitlementMessage(error.httpStatusCode)
else -> showGenericError(error.code)
}
}

Inheritors

Types

Link copied to clipboard
object Codes

The complete, stable OGplayer error code table.

Link copied to clipboard

DRM failure that survived the SDK's automatic recovery attempts.

Link copied to clipboard

Live-stream failure that survived automatic recovery.

Link copied to clipboard

Network-level failure while loading media (connectivity, HTTP).

Link copied to clipboard

Decoding/rendering failed on this device.

Link copied to clipboard

The media itself is malformed or unsupported (manifest, container).

Link copied to clipboard

Anything not covered above.

Properties

Link copied to clipboard
Link copied to clipboard
val code: Int

Stable OGplayer error code — full table in Codes.

Link copied to clipboard

Stable machine-readable name for code (log/analytics friendly).

Link copied to clipboard

Underlying androidx.media3 PlaybackException error code.

Link copied to clipboard

Human-readable detail for logs; not intended for end users.

Link copied to clipboard

True when retrying the same load may succeed (transient failures).

Functions

Link copied to clipboard
open override fun toString(): String