0

Has anyone made a decentralized music player on ethereum using smart contracts? Say if I wanted to upload a mp3 file to IFPS and everytime someone plays the midi file the smart contract will deduct .0001 eth from the account. Has anyone done something like this?

1
  • The money would have to go back to the content creator/ whoever owns it's rights though, right?. – Vignesh Karthikeyan Jun 21 '18 at 20:25
1

IPFS' files are completely public, so there is no way to restrict the viewing of those files where users would have to pay. You could figure out a way to encrypt the file on IPFS and then reveal the key to anyone who paid, but there would still have to be some centralization.

2
  • When uploading files to IPFS, do I have to keep my IPFS server up in order for the files to stay on IPFS? Or do I get to just upload it once and it stays forever? – Patoshi パトシ Jun 29 '18 at 15:03
  • You can upload a file to IPFS and it will stay there. But it will NOT stay forever. It will only stay as long as people commonly access it. Look at the IPFS whitepaper here, specifically the BitSwap protocol section. – Nicholas Jul 4 '18 at 0:03
0

Not possible with IPFS alone. You can encrypt the music file and host it on IFPS so that if someone does get access to it then it will be gibberish. You will need a central server acting as a mediator. One possible flow is to have the user pay the smart contract which emits an event. The mediating server can have a listener on the events that the user has paid, which then it decrypts the music asset and streams it to that individual user.

2
  • isn't that just a centralized system? – Patoshi パトシ Jul 12 '18 at 14:52
  • @Patoshiパトシ pretty much, the encrypted storage is decentralized – Miguel Mota Jul 18 '18 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.