1.0.1 • Published 10 years ago
soundcloud-badge-packed v1.0.1
soundcloud-badge-packed 
A SoundCloud "now playing"-type thing. Makes it easy to stream from SoundCloud and ensure you're giving the appropriate credit too. It has no dependency.
Usage
require('soundcloud-badge-packed')({
client_id: 'your API client ID'
, song: 'https://soundcloud.com/dylan_king/modern-housing'
, dark: true
, getFonts: true
}, function(err, src, data, div) {
if (err) throw err
// Play the song on
// a modern browser
var audio = new Audio
audio.src = src
audio.play()
// Metadata related to the song
// retrieved by the API.
console.log(data)
})Just call soundcloud-badge-packed, these options should do these things:
client_id: your SoundCloud API client ID.song: the SoundCloud URL for your song: usingsoundcloud-resolveyou'll get the matching data for your song included.dark:truefor black text/icons, andfalsefor white. Defaults totrue.getFonts: by default, the badge will pull in fonts from Google Fonts. Set this tofalseif you'd rather it not do that.
