GitXplorerGitXplorer
r

spotify-previewbutton

public
7 stars
1 forks
1 issues

Commits

List of commits on branch master.
Unverified
8187de4db46ed60cfe5fe558914a9ec45533464e

0.3.0

rrafeca committed 11 years ago
Unverified
490ad6ea35ef67b5bd68743c7c3638beaf504d45

Update spotify-progresbar

rrafeca committed 11 years ago
Unverified
a81080e99c23ae557a26ead2805aee16b8057990

:lipstick: Codestyle fix

rrafeca committed 11 years ago
Unverified
d0f812229ef4f6ef0c6064861c10434bf9f850ee

Merge pull request #2 from JMPerez/master

rrafeca committed 11 years ago
Unverified
5fa49ac6c1002661140fb4facb0583ff56f6f350

Add spotify-coverart for responsive cover

JJMPerez committed 11 years ago
Unverified
7d13014ae6a871f6bb24d82a1b2f6964ae2a63fa

Simplify markup

rrafeca 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.