Guest, before posting your code please take these rules into consideration:
It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
Don't share a wall of code. All we want is the problem area, the code related to your issue.
Do you have any Idea on how difficult and insane of a Project that is for just one Person to undertake? A Streaming-Service will be difficult to manage and create. You'd have to put a Subscription-Price on it, manage User-Accounts and try to get Licenses for Music to be on the App.
Besides, there are plenty of decent Streaming-Services out there like Spotify and a lot of People use it. There isn't really a need for a new Music Streaming-Service. It's already been done and you'll go under a lot of stress and burn-outs.
Forget about it. Try something much simpler than a Music Streaming-Service.
If it's a streaming service that you're after then it's impossible. I don't really like saying that when someone has an idea but Spotify are losing millions at the moment. How are you going to manage to fund it?
Advertising isn't really going to make you much. An Webmaster-Forum that I used to be a part of, ForumPromotion.net(https://www.forumpromotion.net) from what I heard, hadn't made that much Money from Ads.
What you're going to need is a Subscription-Model. So something among the Ranks of Netflix and Spotify. You charge a User around £4-7/Month and with this Subscription-Model, make it so that the User gets Special-Benefits(Like no Ads).
Well, again. You aren't going to make much Money through Ads. You could do things like Sponsors but I'm not sure about how much they will make. As far as I know(Note: This is from how Ads work on Youtube), 1000 Views = $1.00
But that's how it works on Youtube anyway. It might be different for you but I can't say for sure how much you will earn via Ads.
That doesn't matter. Once you do start rolling in the Money, it will get to your head and you'll want more and more. And back to you using Ads, I'll say that you should use a Subscription-Service as Ads won't earn you much and you'll go bankrupt in probably a few days or maybe a week or two.
If you're actually serious, here's what needs to be done...
Database creation with tables for: accounts, song info, album info, artist info, playlist info, and relationship tables for: artistID-albumID-songID, playlistID-songID, accountID-playlistID, etc
Pages for: sign up, log in, list of songs, search results, artist list, artist's album list, album's song list, user's listening history, user's playlists, playlist's songs, etc
Store audio files on server, make sure they can load gradually instead of forcing user to download entire mp3 first before it can play
User clicks song to listen to it - add functionality to "Like" song, add to play list, etc
Add account features such as: password reset, email verification, info changing, etc
Do all of this with a server-side language to validate/sanitize user data & ensure permissions are followed
Create client-side code to retrieve data from server & display or play to user
Make sure your entire audio library can't be downloaded/viewed except through your site/app dashboard - aka one song played at a time, no auto-downloads, prevent AFK streaming, etc
Put advertising on the pages / every X minutes force user to watch/listen to ad before song plays
Track data about what music the user likes, what ads they watch (versus when they're AFK or not touching their phone), etc to offer more data to advertisement companies
And that's just the main things... All of those can take hours and hours to code from scratch & test properly.
It's not impossible, but it's very hard to make money. Actually creating the service won't be too difficult. Even Spotify is using a wrapper API to create their app/software instead of coding it in a core language. They may have changed that, but that's how they started (using Electron / Chromium basically)... So, it is NOT impossible to create the software/app/service. It can be done in less than a month with constant programming. However, it will take a while to make it run fast, securely, and with profits too. You will most likely end up spending more money on running your servers than you can make with ads... so be careful!