Created
February 20, 2020 16:02
-
-
Save kraxarn/ad3f5fec24db5569c5174f3ddba4367c to your computer and use it in GitHub Desktop.
spotify-qt web player
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://sdk.scdn.co/spotify-player.js"></script> | |
<script> | |
window.onSpotifyWebPlaybackSDKReady = () => { | |
const token = location.href.substring(location.href.lastIndexOf("?token=") + 7) | |
const player = new Spotify.Player({ | |
name: "spotify-qt", | |
getOAuthToken: cb => { cb(token) } | |
}) | |
player.connect() | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment