Comments (6)
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.
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.
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.
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.
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.
Radar 42698851
from apple-music-webplayer.
Related Issues (20)
- Blank Page
- Add album to play next/play later. HOT 3
- skipToNextItem() produces PLAY_ACTIVITY error HOT 3
- Ability to output Song title, artist, album etc of now playing to polybar HOT 2
- Searching Library doesn't allow Album/Artists/Playlists to be selected, only Songs HOT 2
- Wrong copyright year HOT 1
- ITUNES!!!
- Play and pause icon width causes shaky top bar HOT 2
- Light theme HOT 1
- Album View - Show Year & Genre HOT 1
- Audio stops playing playing after some playback, requires refresh HOT 1
- Music stops
- Add a cast functions to Google home devices from iOS Chrome or Edge browsers
- ADMIN
- Add ability to go to an artist page by clicking on their name in the album HOT 1
- [Feature Request] Sort by recently added in songs library HOT 3
- Enhancement: option to disable localization HOT 3
- Music stops after a while in background HOT 10
- Is there any plan to make an electron app for a bit more native experience HOT 1
- Keyboard shortcuts for controlling playback HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apple-music-webplayer.