Announcements

Unity

Unity

herbert_rush

 

My goal to setup a play an Audio Stream from Spotify into the Unity Game Engine platform.   Unity has an AudioSource that usually likes url based audio files .wav,.mp3,.. but I don't how to feed Spotify End Point data info into the Audiosource.

 

Its a free account.

End Points work. Oauth is setup correct.

Catagories, Playlists, Tracks data in json format works fine.

 

I was hoping that somewhere in the Track data  - I could could grab a URL and feed it into the AudioSource.   Maybe it is not that simple.

 

Herb Rush

 

 

 

 

Reply
14 Replies

_milena
Hi!

Our playback API doesn't provide the audio file to the enduser, so not sure if doing what you want to do would be possible.

herbert_rush

Thanks for getting back to me.

 

I was hoping for a URL like 

http://www.spotify.com/....../greatsong.mp4

or .wav.   This is easiest possible case for me. 

 

If that is not how it works can you tell me how it does work. For Example

1) Get Information from Track JSON Object. or where ever

2) do ......

3) Set up the stream

I would guess this is a fairly common question because Spotify is all about music and  any one building on the spotify platform would want to stream  some music (is my guess).

 

Thanks for your Help.  I am fairly experienced with Unity but new to spotify so the question might come out a bit awkward. Sorry.

 

one quick question is the music delivered in mp4,wav,.... formats or is it something you unique to spotify???

 

Herb Rush

 

herbert_rush

Hi,

 

I really don't need much detail.  Just a link describing how to track information to setup a stream of music with spotify.  Just a rough description would be extremely helpful.

 

Thanks

Herb Rush

_milena
This is a good start documentation for using our playback api https://developer.spotify.com/documentation/web-playback-sdk/quick-start/

herbert_rush

Thanks for the reply.  I am not really interested in Spotify Connect or Browsers.

 

I am interested in using the End Points to interact with the Spotify Music System directly.  So Far I can traverse Catagories, Playlist & Tracks.   I can even take the Audio Preview Field in the Track Object (see attached) and play the preview music within Unity.    I would like to play the entire song but I do not see a String URL that provides me with that sort of access.   It must be there somewhere.

 

Herb Rush

preview.PNG

herbert_rush

 

I am a bit surprised with the lack of a response to the question of "how to setup a stream using the endpoints?".

 

It would seem to me that any 3rd party application would want to be able to stream stuff from Spotify.

 

Some of the answers that I was sort of expecting.

1) It cannot be done. 

2) We will tell you but you need to sign this agreement.

3) We use proprietary streaming technology to setup streaming.

4) Here is a document and an example to setup a stream to spotify.

 

But I have not heard anything to help me setup a stream with spotify using the end points.   I have the Preview_Url streaming but it is only 30 seconds.

 

Thanks

 

Herb Rush

 

 

 

 

herbert_rush
I have integrated Unity with the Spotify End Points and I am now in the process of building an application (in Unity). How do I obtain a commercial license from Spotify? How long does the process of getting a commerical license take? Thanks

Hubo

Hey @herbert_rush, sorry for the late reply here!

 

Let's get this cleared up! Right now, it's not possible to get a direct stream/link to music on Spotify. Music on Spotify is encoded in such a way that the audio files cannot be downloaded/streamed/ripped to protect the right holders.

 

The only way to stream a track is through the Web Playback API which @_milena mentioned in her reply (or you can use the 30s previews).

 

Let me know if you have any other questions!

 

Have a great day,

Hubo

HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Hubo

Hey @herbert_rush, thanks for posting your question here!

 

You can apply for a commercial license when creating your application on the Spotify for Developers Dashboard (Developers > Dashboard > Login > Create An App). There's a link to a form which you need to fill out and then the right folks will take a look! Let me know if you have any other questions.

 

Have a great day,

Hubo

HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

herbert_rush
Hi!
I have two apps that have been there some time - herbsoft and showtunes.   ShowTunes I am using from a Unity system butI don't see the form you suggesting.   I looked under edit settings but I did not see it.  Maybe under a different title.  I was looking for acommerical license link.
Sorry, It is probably right there but just did not see it.

Hubo
Hey! You can find the form when you click: “Create An App” on the Dashboard itself. No worries, you don’t have to create a new app, it’s where the link to the form can be found! 🙂 Let me know if you can find it!

Take care,
Hubo
HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

herbert_rush
I think, I have it thanks.
Apply to build a commercial app or a hardware device


|
|
|
| | |

|

|
|
| |
Apply to build a commercial app or a hardware device

Before you build or release a project that is 'commercial' or a 'hardware device' our license holders need Spoti...
|

|

|



Skvwalker

Can you explain step by step how you did this?

HarrzS
Hi Herb, I'm planning to do the same thing, would you be willing to share how you managed to get playback directly within Unity?
Thanks, Harry

Suggested posts

Env: prod