Giter Site home page Giter Site logo

Comments (6)

zachomedia avatar zachomedia commented on May 24, 2024

I've been thinking about this on and off recently.. I like having the artwork appear on the songs list, but for a large number of songs it becomes a problem.

There are two fixes, neither of which are ideal: not show artwork or paginate the page so only x songs are visible at a time.

I'm open to other possible solutions too.

from apple-music-webplayer.

 avatar commented on May 24, 2024

I'm not a web developer, so my suggestions may not be that useful.

Well, to be fair, the problem is really that you're being served 10.000 different copies of High-resolution, 1400x1400 images. Is there anyway to cache some data to disk?

I like having the artwork appearing on the songs list as well.

GPM, for example, deals with this problem by showing only low resolution images (for the small thumbnail), and only fetching them when they are in scrolled into view.

Besides pagination and not showing artwork, one way I can think is to only load the image for the first track of an album, and then, every other track on the album should show that image instead.

Another, is to group all the songs of an album together, instead of alphabetical order and only show 1 copy of the artwork.

Perhaps you could paginate with infinite scrolling? Or paginate grouping by letter? Or only show artwork when there is less than x number of songs in Library?

from apple-music-webplayer.

zachomedia avatar zachomedia commented on May 24, 2024

So the hardest part is that I have no control over the images (where they comes from, their actual size, the cache, etc.) because that's all controlled by Apple. I only ask MusicKit JS for a URL to an image for x pixels in size.

Now, I did some investigation just now - I'm seeing that apple is sending 40x40px images for the songs list and they're about ~1-2KB each. However, their are songs that have large PNGs for their artwork, with sizes of ~150-200KB each (now, this relates to #26, but I don't see duplication for the 40x40px images but I do for the large PNG images).

Thanks for some additional ideas. I'll look at prototyping some solutions.

from apple-music-webplayer.

 avatar commented on May 24, 2024

I only ask MusicKit JS for a URL to an image for x pixels in size.

Now, I did some investigation just now - I'm seeing that apple is sending 40x40px images for the songs list and they're about ~1-2KB each.

Is this implemented yet? When I right click the first song in the list, and open the image in a new tab, it shows the full artwork.

You should test with an uploaded song (with custom artwork) as well, because I only saw the 40x40 image for tracks added from Apple Music.

from apple-music-webplayer.

zachomedia avatar zachomedia commented on May 24, 2024

Yeah, tracks added from Apple Music give me actual images at 40x40px. But music that I'm guessing was matched / uploaded from my library does not - it gives me the full size images like you describe. It seems to affect artwork that gets loaded from Amazon S3 rather than mzstatic.com.

I'm in the process of writing this into a bug report with Apple.

from apple-music-webplayer.

zachomedia avatar zachomedia commented on May 24, 2024

Radar 42698851

from apple-music-webplayer.

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.