Web API - Play tracks directly on the page instead

Solved!
Reply
Highlighted

Web API - Play tracks directly on the page instead

Music Fan

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
}
}
}
}
}
}

```

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution!

Re: Web API - Play tracks directly on the page instead

Spotify
Spotify

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
Highlighted
Solution!

Re: Web API - Play tracks directly on the page instead

Spotify
Spotify

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

Highlighted

Re: Web API - Play tracks directly on the page instead

Music Fan
Thanks for making that clear @spotifyjosh.
SUGGESTED POSTS