Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Want to play original track in external player

Want to play original track in external player

Hii,

I'm using your api but I'm able to play the 30 sec demo the preview_url. But in api I do not get the original track link to play in my audio player. 
Please reply it's urgent. 

**bleep** /**bleep**

Reply
11 Replies

The Spotify link is in external_urls['spotify'] .

Additionally, if you mean "an audio player, other than Spotify" it's not going to work.

XimzendSpotify 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.

Hii thaks for reply So how do I play the songs in my portal?
here is a screenshot of my player where preview urls are working
Please check the attachment below.

Screenshot_2.png

Hii thanks for your reply.
I want to play the real track in external player in my portal. Please check the screenshot. How I do that using api? Do I need implement the spotify player in my portal? Have you link of that so please share.

Screenshot_2.png

I think I know what mean, but you need something else to play music from Spotify inside your application.

One way is to use the Web Playback SDK. The Web Playback SDK requires a Spotify Premium subscription.

XimzendSpotify 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.

Thanks for reply but is this sdk work with my current player? I have Premium account.

No, you have to rewrite parts of your player to make this work.

XimzendSpotify 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.

I forget to say that I don't think you can play a mix of local tracks and Spotify tracks this way.

I think you have to add the local tracks to a Spotify playlist first. Then your app can retrieve the URIs from that playlist and then play them.

There's a developers article about Local Files in Spotify Playlists.

Note: I haven't experience with the Spotify API together with local files, so my theory may not work.

XimzendSpotify 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.

Thanks for your reply.
I'm trying to implement the web SDK for my website but as per this tutorial it's not working (https://developer.spotify.com/documentation/web-playback-sdk/quick-start/#).
How to add this code inside of this source code?

const play = ({
  spotify_uri,
  playerInstance: {
    _options: {
      getOAuthToken
    }
  }
}) => {
  getOAuthToken(access_token => {
      method: 'PUT',
      body: JSON.stringify({ uris: [spotify_uri] }),
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${access_token}`
      },
    });
  });
};

play({
  playerInstance: new Spotify.Player({ name: "..." }),
  spotify_uri: 'spotify:track:7xGfFoTpQ2E7fRF5lN10tr',
});

 

Did you get any errors?

XimzendSpotify 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.

Hi,

No error get   
The Web Playback SDK successfully connected to Spotify!
player.connect().then(success => {
if (success) {
console.log('The Web Playback SDK successfully connected to Spotify!');
}
});
Now how do I play individual full track in my html?

Thank you

Screenshot_1.png

Hi, 
I did not get any error. Also sdk connected but unable to play full track.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random