Hack Forums
[Spotify] Music player - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141)
+---- Forum: Website Showcase and Reviews (https://hackforums.net/forumdisplay.php?fid=172)
+---- Thread: [Spotify] Music player (/showthread.php?tid=5918905)



[Spotify] Music player - cardiak - Dec 14, 2018

Hey

Recently found out that Spotify published Web Playback SDK that allows you to play full songs on your own site (instead of the 30sec preview clips)

So I decided to make small website that just plays one song from Spotify as POC.
The POC is available on:
https://musicplayer.cypher.fi


What it does:

The javascript uses Spotify web API to create new player and authenicate
and then uses the web playback SDK (using ajax creates POST request to spotify api) to connect to that player and play the song specified in the POST data.

requirements:
Client ID from From spotify developer dashboard
User needs spotify premium account or otherwise the song wont play.


The source code is publicly available on Github licensed under GPL v3 and the API/SDK references are available on Spotifys site


If I have time I will probably make it look better and add more features. Currently it just displays album picture and track name using the data provided by spotify.
The website is served using Netlify


RE: [Spotify] Music player - Eveline - Dec 14, 2018

Good job. Thanks for sharing this!


RE: [Spotify] Music player - program.pxe - Jan 20, 2019

Will definitely be trying this out for my website! Thank you!


RE: [Spotify] Music player - sina2 - Jan 31, 2019

if that works will be very good