Media 6 min read

Media3 1.12.0-beta01: JSpecify Nullability, minSdk 24, CodecDB and the Removed APIs to Fix Before You Upgrade

Media3 1.12.0-beta01 shipped on Nov 11, 2026, following 1.12.0-alpha01 (Oct 21) and alpha02 (Oct 26). A beta usually means "safe to try"; this one also carries a batch of source-breaking changes, a new build floor, and a clean-up of long-deprecated APIs. Everything below comes from the official AndroidX release notes for Media3, retrieved today.

minSdk 24
new Gradle minSdk for the library
65520
new DEFAULT_BUFFER_SEGMENT_SIZE (was 65536)
JSpecify
replaces NonNullApi / NullableType / UnknownNull

1. Breaking changes first

If you only read one section, read this one. These are the changes that can fail a build or change behavior:

// Before: nullable result inferred loosely
class MyTask : RunnableFutureTask<Void, Exception>()

// After: say the result is nullable
class MyTask : RunnableFutureTask<Void?, Exception>()

// Custom composite source with nullable child IDs
class MySource : CompositeMediaSource<Void?>() { /* ... */ }

Alpha01 also removed the experimental DefaultMediaCodecAdapterFactory.setAsyncCryptoSynchronizationEnabled(boolean), and the four FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES / _H265 flags on Mp4Extractor and FragmentedMp4Extractor. That parsing is now always on for H.264 and H.265, so delete any code passing those flags.

2. Removed deprecated symbols and their replacements

Beta01 deletes a set of deprecated APIs. Each one has a documented replacement:

3. Memory: a 16-byte change that matters

C.DEFAULT_BUFFER_SEGMENT_SIZE drops from 65536 to 65520 so segments fit ART large-object-space pages. According to the notes, this cuts sample buffer memory by about 6% on 4 KiB-page devices and about 20% on 16 KiB-page devices. If you hardcoded 65536 anywhere to size your own buffers around the default, revisit it.

4. New in the Compose player UI

Beta01 adds a subtitles composable slot to ContentFrame and Player, with default bitmap and horizontal-text cue rendering in media3-ui-compose-material3. Alpha01 laid the groundwork: CuesState and rememberCuesState, TrackSelectionState, PlaybackState, a standalone BufferingIndicator, a LiveButton, and alignment on ContentFrame. Slots no longer receive the player or visibility as parameters, so capture them from the calling scope:

Player(
    player = player,
    topControls = {            // now a BoxScope.() -> Unit
        Text(title, modifier = Modifier.align(Alignment.TopStart))
    },
    subtitles = { /* optional: default cue rendering is provided */ },
)

Treat the snippet as a shape, not a copy-paste: the Compose UI artifacts are flagged unstable in these notes, so check the exact parameter list against your version.

5. CodecDB for Transformer

Transformer gets androidx.media3.transformer.codecdb, which recommends video encoder configurations (codec, encoder settings, bitrate) for the device, based on measured encoder quality data. For apps that export user video, this is a principled alternative to hand-tuned bitrate tables per device tier. Alpha02 also added a media3-effect-play-services module with EnhancementSessionDecorator for video enhancement and StudioSoundAudioProcessor for audio source separation.

6. Playback fixes worth knowing

Upgrade checklist

  1. Confirm your own minSdk is 24 or higher.
  2. Build once and fix JSpecify and Kotlin nullable-type errors in custom MediaSource or task subclasses.
  3. Grep for the removed symbols in section 2 and the removed MP4 extractor flags.
  4. If you use the Compose Player, re-check custom control slots against the new signatures.
  5. Audit muxer code for calls after close().
  6. Run on a 16 KiB-page device or emulator image to see the memory change for yourself.

This is a beta. If you ship a media app, move a branch to 1.12.0-beta01 now: the breaking changes are mechanical, and finding them early beats finding them at stable.

Source: AndroidX Media3 release notes (1.12.0-beta01, 1.12.0-alpha02, 1.12.0-alpha01), developer.android.com, retrieved Nov 13, 2026.

Comments 0

No comments yet. Be the first to leave one!

Leave a comment