GitXplorerGitXplorer
r

spotify-previewbutton

public
7 stars
1 forks
1 issues

Commits

List of commits on branch master.
Unverified
6092ad645c422090820bb45130bba9a5e3185f96

0.1.0

rrafeca committed 11 years ago
Unverified
e7cdc4793c408edb3bfcf1cc537f1f244550ff3d

Use spotify-progressbar

rrafeca committed 11 years ago
Unverified
d3c94cdaf0157c5722711661a9f2ff928c0ee725

Update Readme

rrafeca committed 11 years ago
Unverified
8662a046966a4211088aa65851ed0cba3871d731

Merge pull request #1 from JMPerez/master

rrafeca committed 11 years ago
Unverified
6d91b2e771fdc88a5fe3219fb42731f37699ba55

Flexible width

rrafeca committed 11 years ago
Unverified
4b5e84698e8b0135b0ebc75edf306eca0d9b2496

Update Readme.md

JJMPerez committed 11 years ago

README

The README file for this repository.

Spotify Polymer Element

This is an example of a Polymer Web Component that implements a simple widget for previewing Spotify tracks.

It uses the new Spotify Web API to get the track metadata, cover art and the preview MP3 file.

Usage

You just need to include the polymer platform and this element in the head of your html page.

Then, you can start using the spotify-previewbutton element as any other HTML element in your page:

<html>
<head>
  <script type="text/javascript" src="bower_components/platform/platform.js"></script>

  <link rel="import" href="bower_components/spotify-previewbutton/index.html">
</head>
<body>
  <spotify-previewbutton uri="spotify:track:0eGsygTp906u18L0Oimnem"></spotify-previewbutton>
</body>
</script>

Running the example

To launch the example, install the spotify-previewbutton bower component:

$ bower install spotify-previewbutton

Then launch a web server:

$ ruby -run -e httpd . -p 5000 # "python -m SimpleHTTPServer 5000" will also do the trick

Then, you only need to navigate to http://localhost:5000/bower_components/spotify-previewbutton/demo.html from any modern browser.