soundcloud / api

A public repo for our Developer Community to engage about bugs and feature requests on our Public API
143 stars 22 forks source link

Parameter for full sized artwork while embedding playlist? #228

Open Vrezerino opened 1 year ago

Vrezerino commented 1 year ago

Is there a parameter to get the full sized artwork when embedding a playlist? By default, a request to api.soundcloud.com/playlists/ returns artwork with 500x500 resolution.

Example with imaginary parameter "artwork_resolution":

<iframe 
 width="30%" 
 height="500" 
 scrolling="no" 
 frameborder="no"
 allow="autoplay"
 src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/1445109625&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true&artwork_resolution=3000">
</iframe>
alexweinstein commented 1 year ago

EDIT: Just realized @Vrezerino asked for a parameter for the iframe embed, which my comment doesn't address. My apologies. Leaving my answer up, in case it helps.


I don't believe there is a parameter for the full sized artwork. However, if you get artwork_url from the /track or /playlist endpoint, you can do a find/replace string to get the 500px version. Just replace large with t500x500.

For example: https://i1.sndcdn.com/artworks-Tn4ZUlTHPLxQvAdU-zI54aA-large.jpg link will return the thumbnail version.

and https://i1.sndcdn.com/artworks-Tn4ZUlTHPLxQvAdU-zI54aA-t500x500.jpg link will return the 500x500 version.

Vrezerino commented 1 year ago

Hi,

500x500 is the default I get with this:

<iframe src="
https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/1445109625&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"></iframe>

I'm trying to get the original artwork which in my case is a 3000x3000 resolution. Adding an artwork_url parameter doesn't seem to work:

<iframe src="
https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/1445109625&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true&artwork_url=
"https://i1.sndcdn.com/artworks-sOdEZjxQLU6Uw0qX-ZdNkyg-t3000x3000.jpg"></iframe>
dpreussler commented 1 year ago

Try https://i1.sndcdn.com/artworks-Tn4ZUlTHPLxQvAdU-zI54aA-original.jpg

Vrezerino commented 1 year ago

Try https://i1.sndcdn.com/artworks-Tn4ZUlTHPLxQvAdU-zI54aA-original.jpg

And use what parameter in the embed?

dpreussler commented 1 year ago

Sorry I also didnt ready thoroughly. Same as Alex. Sorry about that.

There is currently no such way. Will mark as feature request to consider in the future

Vrezerino commented 1 year ago

Sorry I also didnt ready thoroughly. Same as Alex. Sorry about that.

There is currently no such way. Will mark as feature request to consider in the future

Thanks👍