Javascript iTunes Song Preview player
Branch: master
Clone or download
Latest commit a38f638 Feb 15, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Edited README Feb 15, 2013
example.html Uses fragment + querySelector directly on document Feb 15, 2013
iTunesPreviewPlayer.css Improved CSS Feb 15, 2013
iTunesPreviewPlayer.js

README.md

iTunesPreviewPlayer

iTunesPreviewPlayer makes it easy to embed an iTunes Preview player of any iTunes Store track.

Demo : http://michaelvillar.s3.amazonaws.com/iTunesPreviewPlayer/example.html

How to use

<link href="iTunesPreviewPlayer.css" rel="stylesheet" type="text/css" />
<script src="iTunesPreviewPlayer.js" type="text/javascript"></script>
<script>
// Create the instance with search term. Use artist and song name
var player = new iTunesPreviewPlayer("coldplay viva la vida");
// Add the DOMElement to any element of your page
document.body.appendChild(player.DOMElement());
</script>

Support

<audio> is used to play AAC files gathered from the iTunes API.

A Flash audio player should be used for browsers not supporting AAC files.

More

Please read iTunes Song Previews guidelines : http://www.apple.com/itunes/affiliates/resources/blog/song-previews.html