Play full spotify track inside my own website using spotify web api
Asked Answered
S

3

37

So I was taking a look at the spotify web api and it apparently allows you to play a preview of the song, but I was wondering if there is any way to play the full spotify song without having to open up the official spotify web player or desktop app. Thanks

Substantial answered 11/7, 2014 at 19:36 Comment(0)
D
34

Update: There is a now a way to play full tracks! Read more at Spotify's Developer site, and @arirawr's answer to this question.

Previous answer: No, there's currently no way to play the full song using the Web API. If you want full tracks to be playable from a website, you can use the Spotify Play Button. If you want to build a mobile application, you can do playback of full tracks using the Android and/or iOS SDK.

Dissimilation answered 11/7, 2014 at 23:56 Comment(2)
Is there a way to do so for HTML5 / cordova apps?Pignut
Well, there's no Javascript playback, but you can access playback from the mobile SDKs. I advise you to read the tutorials on those.Dissimilation
N
24

Update from the future: there is now a way to play full tracks in the web: https://beta.developer.spotify.com/documentation/web-playback-sdk/

The Web Playback SDK is client-side JavaScript library which allows you to create a new player in Spotify Connect and play any audio track from Spotify in the browser via Encrypted Media Extensions. It’s the same technology we use to power our Web Player experience.

Some things you can do with the Web Playback SDK:

  • Create a new player in Spotify Connect
  • Stream an audio track in supported browsers
  • Get metadata for the current track
  • Get metadata about the user’s listening session
  • Control local playback (pause, resume, volume, etc)
Nymphalid answered 9/1, 2018 at 9:41 Comment(1)
Can I do this for iOS app?Kannada
L
0

You can also use react-spotify-web-playback-sdk. It is a React wrapper for Spotify Web Playback SDK.

npm link: https://www.npmjs.com/package/react-spotify-web-playback-sdk

Leathern answered 18/3 at 11:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.