Streaming private tracks from Soundcloud's API using a Custom Player

被刻印的时光 ゝ 提交于 2019-12-06 09:53:29

问题


So I know there's plenty of SoundCloud documentation on creating custom players -- as well as streaming private sounds with their own player.

But I can't find a definitive answer to:

Can I stream private tracks through my own custom player using the API -- but WITHOUT requiring any SoundCloud login authentication?

--

Or in bullet form, I want to know if i can:

  • stream Soundcloud hosted tracks
  • these tracks must be private and NOT publicly available on SoundCloud
  • the player must be completely of our own design
  • no SoundCloud login is required for anyone to listen to these tracks

--

I realize this would just make SoundCloud into a music hosting service, so just wondering if anyone has done this.


回答1:


in theory, yes, you can do that.

first you'll need to gain access token for the users who has uploaded these private tracks. (this should happen on server side)

after that, you will impersonate every visitor on the site as this default user, and he will have access to the tracks.

but, this is not a good practice. you need to be worried about is that you need to hide this token pretty good, so the visitors can't abuse it.

my suggestion is to create a server code that will do all the job related to access token (getting tracks, getting tracks streams etc), and in client side just show the final results. this way, you'll keep your access token safe.



来源:https://stackoverflow.com/questions/20956812/streaming-private-tracks-from-soundclouds-api-using-a-custom-player

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!