Skip to content
A SoundCloud 'now-playing' badge you can just drop into browserify demos
CSS JavaScript HTML
Latest commit 72c5106 Mar 29, 2016 @hughsk 1.1.0
Failed to load latest commit information.
package.json 1.1.0 Mar 29, 2016

soundcloud-badge experimental

A SoundCloud "now playing"-type thing that you can drop into browserify demos. Makes it easy to stream from SoundCloud and ensure you're giving the appropriate credit too.



    client_id: 'your API client ID'
  , song: ''
  , 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

  // Metadata related to the song
  // retrieved by the API.

Just call soundcloud-badge, these options should do these things:

  • client_id: your SoundCloud API client ID.
  • song: the SoundCloud URL for your song: using soundcloud-resolve you'll get the matching data for your song included.
  • dark: true for black text/icons, and false for white. Defaults to true.
  • getFonts: by default, the badge will pull in fonts from Google Fonts. Set this to false if you'd rather it not do that.
Something went wrong with that request. Please try again.