Close Menu
geekfence.comgeekfence.com
    What's Hot

    Customer experience management (CXM) predictions for 2026: How customers, enterprises, technology, and the provider landscape will evolve 

    December 28, 2025

    What to Know About the Cloud and Data Centers in 2026

    December 28, 2025

    Why Enterprise AI Scale Stalls

    December 28, 2025
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook Instagram
    geekfence.comgeekfence.com
    • Home
    • UK Tech News
    • AI
    • Big Data
    • Cyber Security
      • Cloud Computing
      • iOS Development
    • IoT
    • Mobile
    • Software
      • Software Development
      • Software Engineering
    • Technology
      • Green Technology
      • Nanotechnology
    • Telecom
    geekfence.comgeekfence.com
    Home»Mobile»Android Developers Blog: Media3 1.9.0
    Mobile

    Android Developers Blog: Media3 1.9.0

    AdminBy AdminDecember 22, 2025No Comments8 Mins Read0 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    Android Developers Blog: Media3 1.9.0
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Media3 1.9.0 is out! Besides the usual bug fixes and performance improvements, the latest release also contains four new or largely rewritten modules:

    We also added caching and memory management improvements to PreloadManager, and provided several new ExoPlayer, Transformer and MediaSession simplifications. 

    This release also gives you the first experimental access to CompositionPlayer to preview media edits.  


    Read on to find out more, and as always please check out the full release notes for a comprehensive overview of changes in this release.

    Extract metadata and frames outside of playback

    There are many cases where you want to inspect media without starting a playback. For example, you might want to detect which formats it contains or what its duration is, or to retrieve thumbnails.

    The new media3-inspector module combines all utilities to inspect media without playback in one place:

    • MetadataRetriever to read duration, format and static metadata from a MediaItem.

    • FrameExtractor to get frames or thumbnails from an item. 

    • MediaExtractorCompat as a direct replacement for the Android platform MediaExtractor class, to get detailed information about samples in the file.

    MetadataRetriever and FrameExtractor follow a simple AutoCloseable pattern. Have a look at our new guide pages for more details.
    suspend fun extractThumbnail(mediaItem: MediaItem) {
      FrameExtractor.Builder(context, mediaItem).build().use {
        val thumbnail = frameExtractor.getThumbnail().await()
      } 
    }

    Build a basic Material3 Compose Media UI in just a few steps

    In previous releases we started providing connector code between Compose UI elements and your Player instance. With Media3 1.9.0, we added a new module media3-ui-compose-material3 with fully-styled Material3 buttons and content elements. They allow you to build a media UI in just a few steps, while providing all the flexibility to customize style. If you prefer to build your own UI style, you can use the building blocks that take care of all the update and connection logic, so you only need to concentrate on designing the UI element. Please check out our extended guide pages for the Compose UI modules.


    We are also still working on even more Compose components, like a prebuilt seek bar, a complete out-of-the-box replacement for PlayerView, as well as subtitle and ad integration.

    @Composable
    fun SimplePlayerUI(player: Player, modifier: Modifier = Modifier) {
      Column(modifier) {
        ContentFrame(player)  // Video surface and shutter logic
        Row (Modifier.align(Alignment.CenterHorizontally)) {                 
          SeekBackButton(player)   // Simple controls
          PlayPauseButton(player)
          SeekForwardButton(player)
        }
      }
    }

    Simple Compose player UI with out-of-the-box elements

    Automatically handle transitions between Cast and local playbacks

    The CastPlayer in the media3-cast module has been rewritten to automatically handle transitions between local playback (for example with ExoPlayer) and remote Cast playback.

    When you set up your MediaSession, simply build a CastPlayer around your ExoPlayer and add a MediaRouteButton to your UI and you’re done!

    // MediaSession setup with CastPlayer 
    val exoPlayer = ExoPlayer.Builder(context).build()
    val castPlayer = CastPlayer.Builder(context).setLocalPlayer(exoPlayer).build()
    val session = MediaSession.Builder(context, player)
    // MediaRouteButton in UI 
    @Composable fun UIWithMediaRouteButton() {
      MediaRouteButton()
    }

    New CastPlayer integration in Media3 session demo app

    Consistent AV1 playback with the rewritten extension based on dav1d

    The 1.9.0 release contains a completely rewritten AV1 extension module based on the popular dav1d library.

    As with all extension decoder modules, please note that it requires building from source to bundle the relevant native code correctly. Bundling a decoder provides consistency and format support across all devices, but because it runs the decoding in your process, it’s best suited for content you can trust. 

    Integrate caching and memory management into PreloadManager

    We made our PreloadManager even better as well. It already enabled you to preload media into memory outside of playback and then seamlessly hand it over to a player when needed. Although pretty performant, you still had to be careful to not exceed memory limits by accidentally preloading too much. So with Media3 1.9.0, we added two features that makes this a lot easier and more stable:

    1. Caching support – When defining how far to preload, you can now choose PreloadStatus.specifiedRangeCached(0, 5000) as a target state for preloaded items. This will add the specified range to your cache on disk instead of loading the data to memory. With this, you can provide a much larger range of items for preloading as the ones further away from the current item no longer need to occupy memory. Note that this requires setting a Cache in DefaultPreloadManager.Builder.

    2. Automatic memory management – We also updated our LoadControl interface to better handle the preload case so you are now able to set an explicit upper memory limit for all preloaded items in memory. It’s 144 MB by default, and you can configure the limit in DefaultLoadControl.Builder. The DefaultPreloadManager will automatically stop preloading once the limit is reached, and automatically releases memory of lower priority items if required.

    Rely on new simplified default behaviors in ExoPlayer

    As always, we added lots of incremental improvements to ExoPlayer as well. To name just a few:

    • Mute and unmute – We already had a setVolume method, but have now added the convenience mute and unmute methods to easily restore the previous volume without keeping track of it yourself.

    • Stuck player detection – In some rare cases the player can get stuck in a buffering or playing state without making any progress, for example, due to codec issues or misconfigurations. Your users will be annoyed, but you never see these issues in your analytics! To make this more obvious, the player now reports a StuckPlayerException when it detects a stuck state.

    • Wakelock by default – The wake lock management was previously opt-in, resulting in hard to find edge cases where playback progress can be delayed a lot when running in the background. Now this feature is opt-out, so you don’t have to worry about it and can also remove all manual wake lock handling around playback.

    • Simplified setting for CC button logic – Changing TrackSelectionParameters to say “turn subtitles on/off” was surprisingly hard to get right, so we added a simple boolean selectTextByDefault option for this use case.

    Simplify your media button preferences in MediaSession

    Until now, defining your preferences for which buttons should show up in the media notification drawer on Android Auto or WearOS required defining custom commands and buttons, even if you simply wanted to trigger a standard player method.

    Media3 1.9.0 has new functionality to make this a lot simpler – you can now define your media button preferences with a standard player command, requiring no custom command handling at all.

    session.setMediaButtonPreferences(listOf(
        CommandButton.Builder(CommandButton.ICON_FAST_FORWARD) // choose an icon
          .setDisplayName(R.string.skip_forward)
          .setPlayerCommand(Player.COMMAND_SEEK_FORWARD) // choose an action 
          .build()
    ))

    Media button preferences with fast forward button

    CompositionPlayer for real-time preview

    The 1.9.0 release introduces CompositionPlayer under a new @ExperimentalApi annotation. The annotation indicates that it is available for experimentation, but is still under development. 

    CompositionPlayer is a new component in the Media3 editing APIs designed for real-time preview of media edits. Built upon the familiar Media3 Player interface, CompositionPlayer allows users to see their changes in action before committing to the export process. It uses the same Composition object that you would pass to Transformer for exporting, streamlining the editing workflow by unifying the data model for preview and export.

    We encourage you to start using CompositionPlayer and share your feedback, and keep an eye out for forthcoming posts and updates to the documentation for more details.

    InAppMuxer as a default muxer in Transformer

    Transformer now uses InAppMp4Muxer as the default muxer for writing media container files. Internally, InAppMp4Muxer depends on the Media3 Muxer module, providing consistent behaviour across all API versions. 

    Note that while Transformer no longer uses the Android platform’s MediaMuxer by default, you can still provide FrameworkMuxer.Factory via setMuxerFactory if your use case requires it.

    New speed adjustment APIs

    The 1.9.0 release simplifies speed adjustments APIs for media editing. We’ve introduced new methods directly on EditedMediaItem.Builder to control speed, making the API more intuitive. You can now change the speed of a clip by calling setSpeed(SpeedProvider provider) on the EditedMediaItem.Builder:

    val speedProvider = object : SpeedProvider {
        override fun getSpeed(presentationTimeUs: Long): Float {
            return speed
        }
    
        override fun getNextSpeedChangeTimeUs(timeUs: Long): Long {
            return C.TIME_UNSET
        }
    }
    
    EditedMediaItem speedEffectItem = EditedMediaItem.Builder(mediaItem)
        .setSpeed(speedProvider)
        .build()

    This new approach replaces the previous method of using Effects#createExperimentalSpeedChangingEffects(), which we’ve deprecated and will remove in a future release.

    Introducing track types for EditedMediaItemSequence

    In the 1.9.0 release, EditedMediaItemSequence requires specifying desired output track types during sequence creation. This change ensures track handling is more explicit and robust across the entire Composition.

    This is done via a new EditedMediaItemSequence.Builder constructor that accepts a set of track types (e.g., C.TRACK_TYPE_AUDIO, C.TRACK_TYPE_VIDEO). 

    To simplify creation, we’ve added new static convenience methods:

    • EditedMediaItemSequence.withAudioFrom(List)

    • EditedMediaItemSequence.withVideoFrom(List)

    • EditedMediaItemSequence.withAudioAndVideoFrom(List)

    We encourage you to migrate to the new constructor or the convenience methods for clearer and more reliable sequence definitions.

    Example of creating a video-only sequence:

    EditedMediaItemSequence videoOnlySequence =
        EditedMediaItemSequence.Builder(setOf(C.TRACK_TYPE_VIDEO))
            .addItem(editedMediaItem)
            .build()

    —

    Please get in touch via the Media3 issue Tracker if you run into any bugs, or if you have questions or feature requests. We look forward to hearing from you!



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    ReMarkable has slipped into Reddit to learn what users want

    December 28, 2025

    HomeKit, Thread, Matter, and more

    December 27, 2025

    Gmail might finally let you switch to a new address without starting over

    December 26, 2025

    2025 Winners and losers: Apple

    December 25, 2025

    Trump administration’s ban on foreign-made drones starts this week — you can say goodbye to new DJI models

    December 24, 2025

    An Expert Explains 6 Common Laundry Mistakes That Are Killing Your Favorite Garments

    December 23, 2025
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 20258 Views

    Microsoft 365 Copilot now enables you to build apps and workflows

    October 29, 20258 Views

    Here’s the latest company planning for gene-edited babies

    November 2, 20257 Views
    Don't Miss

    Customer experience management (CXM) predictions for 2026: How customers, enterprises, technology, and the provider landscape will evolve 

    December 28, 2025

    After laying out our bold CXM predictions for 2025 and then assessing how those bets played out…

    What to Know About the Cloud and Data Centers in 2026

    December 28, 2025

    Why Enterprise AI Scale Stalls

    December 28, 2025

    New serverless customization in Amazon SageMaker AI accelerates model fine-tuning

    December 28, 2025
    Stay In Touch
    • Facebook
    • Instagram
    About Us

    At GeekFence, we are a team of tech-enthusiasts, industry watchers and content creators who believe that technology isn’t just about gadgets—it’s about how innovation transforms our lives, work and society. We’ve come together to build a place where readers, thinkers and industry insiders can converge to explore what’s next in tech.

    Our Picks

    Customer experience management (CXM) predictions for 2026: How customers, enterprises, technology, and the provider landscape will evolve 

    December 28, 2025

    What to Know About the Cloud and Data Centers in 2026

    December 28, 2025

    Subscribe to Updates

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2025 Geekfence.All Rigt Reserved.

    Type above and press Enter to search. Press Esc to cancel.