Media 5 min read

Media3 1.12.0-rc01: Encrypted Sample Contract, OkHttp Error Codes and the Playback Fixes to Test Before Stable

Media3 1.12.0-rc01 shipped on Nov 25, 2026, two weeks after 1.12.0-beta01 (Nov 11). Unlike the beta, this release candidate has no new APIs to adopt and no removed symbols: it is a fixes release, plus one contract change for anyone who writes custom SampleStream implementations. Everything below comes from the official AndroidX release notes for Media3, retrieved today.

rc01
Nov 25, 2026, after beta01 on Nov 11
1 contract
change for custom SampleStream code
3 flags
opt-in or canary behavior changes

1. The one change that can bite: FLAG_OMIT_SAMPLE_DATA

SampleStream.FLAG_OMIT_SAMPLE_DATA now ensures that DecoderInputBuffer.cryptoInfo is populated for encrypted samples. The notes state that custom SampleStream implementations must be updated to adhere to this contract. If you only use the built-in extractors and ExoPlayer, nothing changes. If you wrote your own stream (for example, a DRM-aware proxy for a proprietary container), check the omit-data path.

// In a custom SampleStream.readData(...)
if (readFlags and SampleStream.FLAG_OMIT_SAMPLE_DATA != 0) {
    // rc01 contract: even with the payload omitted,
    // encrypted samples must still carry their crypto metadata
    if (sample.isEncrypted) {
        buffer.cryptoInfo = sample.cryptoInfo
    }
    return C.RESULT_BUFFER_READ
}

Treat this as a shape, not a copy-paste: the exact fields depend on your stream's sample model.

A related fix: CryptoInfo.numBytesOfEncryptedData was over-reporting the encrypted payload size for full-sample encrypted samples with supplemental data, such as encrypted WebM/Matroska streams with block additions.

2. Position and loading-state bugs

If your UI polls position for a seek bar, these are the bugs that show up as a scrubber that stops moving. They are worth a regression pass on any flow with ads or offloaded audio.

3. Metadata renderer: dynamic scheduling behind a flag

MetadataRenderer gains dynamic scheduling, which aligns work and CPU wake-cycles with when metadata samples can actually be read or output. It is not on by default. You enable it explicitly:

Flags.enableFlag(Flags.FLAG_METADATA_RENDERER_DURATION_TO_PROGRESS)

This is relevant if you play streams with timed metadata (ID3, EMSG) and care about background wake-ups. Measure battery before and after rather than assuming a gain.

4. Network and format fixes

when ((error.cause as? HttpDataSource.HttpDataSourceException)?.reason ?: error.errorCode) {
    PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT -> retryWithBackoff()
    PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED -> showOffline()
    else -> reportError(error)
}

Again a shape rather than a drop-in: the point is that timeouts used to be indistinguishable from "network down" on this path, and now they are not.

5. UI and Session fixes

Release-candidate checklist

  1. If you have custom SampleStream code, audit the FLAG_OMIT_SAMPLE_DATA path for encrypted samples.
  2. Search your error handling for ERROR_CODE_IO_NETWORK_CONNECTION_FAILED and confirm timeouts and cleartext blocks are handled as their own cases.
  3. Run a seek-during-ad and an offload-audio session and watch the position and isLoading() values.
  4. On Android 11 or older, check any SURFACE_TYPE_SURFACE_VIEW player embedded in a Compose layout with a background.
  5. If you have not tried the beta yet, read the beta01 post first: the minSdk 24, JSpecify and removed-API changes are still the real migration work.

No breaking API surface in rc01 beyond the sample-stream contract. If your branch already builds on beta01, bumping to rc01 should be low risk and picks up a useful set of playback-position and error-code fixes.

Related: Media3 1.12.0-beta01: JSpecify, minSdk 24 and the removed APIs.

Source: AndroidX Media3 release notes (1.12.0-rc01), developer.android.com, retrieved Nov 27, 2026.

Comments 0

No comments yet. Be the first to leave one!

Leave a comment