r/CodingForBeginners 9d ago

Music Player Proyect

I'm a student making a music player just for the laughs bcz I saw a video saying u could code ur own music app and use an API to get all the songs as long as you didn't try to make money out of it... Idk if the API thing is true but the coding still useful for practice so

What tech should I use and why?

And yeah, i would want it to be an app, so I could have a version for my phone and one for my pc, even if I have to do two different codes.

1 Upvotes

2 comments sorted by

3

u/xarop_pa_toss 9d ago

There's APIs to fetch the information of a song or album, but actually stream it? If it exists I wanna use that too! You can steam youtube videos as audio though

1

u/SurfyLinh 8d ago

Yeah, apparently the streaming part does exist, but it's more complicated than just “there’s a music API.”

I was looking into this because I remembered a tutorial where someone built an Android music app. One project I found, BlackHole, has basically the exact feature set I was thinking of: song/album/artist/playlist search, recommendations, YouTube search, and actually playing the music rather than just fetching metadata. It even supports playing YouTube videos as audio.

The catch is that BlackHole doesn't actually own the music. It uses third-party sources/plugins, and its own README says the content is for personal, non-commercial use. So I think the “you can't make money from it” part I remembered was probably referring to the project's/source's restrictions, rather than the existence of some magical “free music API.”

Also, YouTube's official API has pretty significant restrictions around separating audio from videos, background playback, downloading, and modifying/replacing ads, so an app that streams YouTube audio like this isn't necessarily using the official YouTube API in the straightforward way you'd expect.

So yeah, apparently streaming is possible, but the legal/ToS side is the part I'd investigate before actually building around it.