-1

The spotify player button doesn't play when I click on the play button , instead it redirects me to the spotify site even though the documention was intended to make it play when it's on your website ... Here's the documentation https://developer.spotify.com/technologies/widgets/spotify-play-button/#introduction

And a sample of the code is this one , I would like to be able to make it play on my website without being redirected to another site .

<iframe src="https://embed.spotify.com/?uri=spotify:track:4bz7uB4edifWKJXSDxwHcs" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
Stack One
  • 95
  • 2
  • 12

1 Answers1

0

The Spotify Play button requires that the user hitting play to have a Spotify account to hear music. Once the user is signed in, it will use either the Web Player at play.spotify.com or the desktop client to play music.

One of these two Spotify clients be active in order for you to hear music. That's why you're getting redirected to the Spotify site. If the user has the desktop client open, that will play music instead and no redirection will occur.

iKenndac
  • 18,730
  • 3
  • 35
  • 51