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

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

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