https://github.com/hughsk/soundcloud-badge
A SoundCloud 'now-playing' badge you can just drop into browserify demos
https://github.com/hughsk/soundcloud-badge
Last synced: 2 months ago
JSON representation
A SoundCloud 'now-playing' badge you can just drop into browserify demos
- Host: GitHub
- URL: https://github.com/hughsk/soundcloud-badge
- Owner: hughsk
- License: other
- Created: 2013-09-25T07:27:42.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-29T02:45:35.000Z (about 9 years ago)
- Last Synced: 2025-02-21T09:45:44.760Z (4 months ago)
- Language: CSS
- Homepage: http://hughsk.github.io/soundcloud-badge/
- Size: 12.7 KB
- Stars: 31
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# soundcloud-badge [](http://github.com/hughsk/stability-badges) #
A [SoundCloud](http://soundcloud.com/) "now playing"-type thing that you can
drop into [browserify](http://browserify.org/) demos. Makes it easy to stream
from SoundCloud and ensure you're giving the appropriate credit too.[](https://nodei.co/npm/soundcloud-badge)
## Usage ##
``` javascript
require('soundcloud-badge')({
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`, these options should do these things:
* `client_id`: your SoundCloud API client ID.
* `song`: the SoundCloud URL for your song: using
[`soundcloud-resolve`](http://github.com/hughsk/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.