Giter Site home page Giter Site logo

Notification Image Not Updating about media HOT 1 CLOSED

Tr736 avatar Tr736 commented on June 20, 2024
Notification Image Not Updating

from media.

Comments (1)

tianyif avatar tianyif commented on June 20, 2024

Hi @Tr736,

Thanks for reporting! For me, on Android 14, the issue was reproducible with the test controller app connecting with the demo session app.

After the artworkUri was changed at the controller, things worked fine to replace the MediaItem to the session, and session triggered onMediaMetadataChanged event. While in updateMediaMetadataIfChanged in MediaSessionLegacyStub (which is going to update the System UI notification), I found that the artworkData coming with the newMediaMetadata was not null. Thus, the default implementation of the BitmapLoader would decode the artworkData instead of loading from artworkUri.

In fact, this artworkData is coming from the media itself. The ApicFrame got decoded and populated to the MediaMetadata. When the ExoPlayer updates the playbackInfo, it will build a MediaMetadata based on the metadata from the media and the metadata from the MediaItem. The strategy is, the metadata from the MediaItem will be prioritized, as long as they are non-null.

The MediaItem I have was not set with artworkData, thus the artworkData was filled with the data from the ApicFrame. This probably be your situation as well I assume? Actually this means that when you have a MediaItem with only artworkUri set, which corresponds to bitmap A, yet in the presence of the artworkData from the media which corresponds to bitmap B, you won't see the bitmap A showing on the notification, without needing to go through the replaceMediaItem step.

This is a bug that we should fix our side. I'm not sure if your app mostly uses artworkUri as the bitmap information for the session, if yes, as a temporary mitigation step, you can customize you BitmapLoader by overriding this method with prioritizing the loading from artworkUri.

We will provide a solution to this and update this issue. Thanks for reporting this bug!

from media.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.