how can i pull a picture directly from song album ?
so the idea is to put a song album picture in this box but is it possible that i can directly pull that picture from song's link ? or something like this ?
24 Replies
that's literally unanswerable without more information
the API you're using may or may not supply cover images
i'm not using any api
it's a section on my portfolio website
where i'm shoing what i'm listning to and what i'm reading so i don't want to put picture there manually that's why i was thinking that if it's there any way that i can use default album art by link
what do you mean by default album art?
just the same picture for everything?
and what link?
this is the default album art on apple music
no
apple music link
this is how it suppose to look
you'd have to use the apple music api https://developer.apple.com/documentation/applemusicapi
Apple Developer Documentation
Apple Music API | Apple Developer Documentation
Integrate streaming music with catalog and personal content.
it's likely not safe to use on the frontend, so you'd have to do the fetching on the backend
no way to do that with just HTML and SASS though
oh dang
i'm afraid of backend
what exactly i will have to do ?
create an API yourself that your frontend will consume, and have that API proxy requests to the apple music service so your access tokens aren't exposed to your end users
there's some services online that do that for you I think? You can also use edge functions for that, or so I've heard. But yeah, you generally shouldn't use third party APIs on the frontend directly unless it's very explicitly stated in the documentation of the API that it is safe to do so
so enlighten me with back end which language i will be using ?
entirely up to you and the host you pick
php, javascript, python, perl, go, rust, java, whichever you prefer
pure C
it's portfolio website. and i only know html scss that's it never been to backend so what do you think which language i should be using ?
I'd honestly recommend just not including that feature then
php and javascript are the most common backend languages, with PHP far outpacing the adoption of javascript still
you can use javascript on the frontend too though, so there's something to be said for using that rather than php
i'll do one thing i'ma get my whole website ready as that's the first priority then i will improve the whole website bit by bit
well, instead of trying to do your own and possibly showing that you may be committing copyright infringement, how about you just use spotify?
spotify can be embed into a website
I mean, using apple music's api isn't committing copyright infringement
I'd personally be careful about a "now listening" on my portfolio though
you never know what kind of weird prejudices hiring managers have
i know, but he's trying to avoid doing backend stuff
and by not using the api, and going around it, it can be illegal redistribution of the album art and music
even if it is a sample
copyright is hell, so, better not risk it
that is fair, yeah
that is why i suggested a spotify playlist
the result is the same, minus copyright infringement
Aight then i’ll try spotify
try it, but make a playlist specific for it
Okay, i’ll post update here
alright, and good luck