fast4x / RiMusic

A multilingual Android application for streaming music from YouTube Music.
https://rimusic.xyz
GNU General Public License v3.0
2.1k stars 107 forks source link

Load blurred small thumbnail until the large thumbnail is loaded. #2574

Closed aneesh1122 closed 2 months ago

aneesh1122 commented 3 months ago

Description

Right now the app uses 'loader' drawable as a placeholder until the thumbnail is fully loaded.

Maybe load the blurred image and use it as a placeholder

Suggested Solution

The small thumbnails are loaded pretty quickly. So, take these small thumbnails, blur them and then use them as a placeholder until the big thumbnails are fully loaded.

Screenshot_2024-07-01-16-58-12-824_it fast4x rimusic-edit This is the small thumbnails. It barely take Seconds to load.

Alternatives

No response

Additional Context

No response

fast4x commented 3 months ago

But it does not give the sense that it is loading...

aneesh1122 commented 3 months ago

But it does not give the sense that it is loading...

https://github.com/fast4x/RiMusic/assets/45353488/989f2b4d-1551-49e8-b096-28f591fc2b8c

This is how images are loaded in my device. The images are not even 1MB but they do take some seconds to load. My internet speed is around 100 Mbps so it's not an issue of slow conection.

What I've also observed is background cover loads faster than the thumbnail cover. They should load at the same time since they are the same image.

https://github.com/fast4x/RiMusic/assets/45353488/27df434e-1c29-4500-8bef-8bf71a55a3b6

This is youtube music. The thumbnail loads instantly for me.

Loughty commented 3 months ago

This would be great, with the generic logo sometimes I think the song doesn't have a cover, when really it's just taking a long time to load!

@fast4x

But it does not give the sense that it is loading...

A blurry cover would give me more of a "it exists, but it's still loading" feeling, like when you are on a webpage that uses progressive jpg images. If you want to make it more explicit, you could put fade-in/fade-out animation:

test-ezgif com-optimize

fast4x commented 3 months ago

I can not use the same one that is about to be loaded...

aneesh1122 commented 3 months ago

I can not use the same one that is about to be loaded...

YouTube provides both small thumbnail(much smaller in size) and the big thumbnail. Right?

Please use small thumbnails as a placeholder until the large thumbnail is loaded.

fast4x commented 3 months ago

Both must be loaded...

aneesh1122 commented 3 months ago

Both must be loaded...

Okay, I got what you are saying now.

Is it possible to do it this way

Use 'loader' as a placeholder until the small thumbnail is loaded

Use 'small thumbnail' as a placeholder until the big thumbnail is loaded.

This will improve user experience for a lot of people since small thumbnail will load instantly for most of the people and they won't even notice the 'loader'

fast4x commented 3 months ago

Ok, not in priority...

fast4x commented 2 months ago

It’s a weight, it’s not good

aneesh1122 commented 2 months ago

It’s a weight, it’s not good

Don't worry. I'm working on something bigger. this won't be required anyways

ghost commented 2 months ago

@aneesh1122 You have enabled blur for song cover even without lyrics. I want blur only for lyrics background but if I choose blur intensity from slider it also blur song cover even when lyrics are not shown. It was working fine in previous version, Blur slider was affecting only for lyrics background. Please have a look.