Announcements

Help Wizard

Step 1

NEXT STEP

Web API - Play tracks directly on the page instead

Solved!

Web API - Play tracks directly on the page instead

I'm using the Web API and Nuxt to return tracks from my playlists onto a web page. I'd like the tracks to play directly on the page. I thought wrapping them inside the uri would suffice. Instead it opens the standalone player on desktop or app on the phone. I also tried wrapping the track name using externalURLs/spotify, but that just opens up the track on https://open.spotify.com. 

 

So, how do you get the tracks to play inline? Set up a custom event trigger?

 

BTW, this has nothing to do with my listening preferences. 

 

Here is my GraphQL query: 

 

```

{
spotify {
me {
id
playlists(limit: 1) {
name
tracks {
name
uri
externalUrls {
spotify
}
}
}
}
}
}

```

 

Reply

Accepted Solutions
Marked as solution

Hi @djmtype! If you're interested in playing audio on a website then I would recommend checking out our Web Playback SDK or Widgets. On its own our Web API does not support streaming full tracks.

View solution in original post

2 Replies
Marked as solution

Hi @djmtype! If you're interested in playing audio on a website then I would recommend checking out our Web Playback SDK or Widgets. On its own our Web API does not support streaming full tracks.

Thanks for making that clear @spotifyjosh.

Suggested posts