https://github.com/disjukr/soundcloud-badge-packed
soundcloud-badge webpack version. so you don't need browserify
https://github.com/disjukr/soundcloud-badge-packed
Last synced: 4 months ago
JSON representation
soundcloud-badge webpack version. so you don't need browserify
- Host: GitHub
- URL: https://github.com/disjukr/soundcloud-badge-packed
- Owner: disjukr
- License: other
- Fork: true (hughsk/soundcloud-badge)
- Created: 2015-11-08T08:57:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-08T10:41:50.000Z (over 9 years ago)
- Last Synced: 2025-01-17T14:08:53.605Z (4 months ago)
- Language: JavaScript
- Homepage: http://hughsk.github.io/soundcloud-badge/
- Size: 150 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# soundcloud-badge-packed [](http://github.com/hughsk/stability-badges) #
A [SoundCloud](http://soundcloud.com/) "now playing"-type thing.
Makes it easy to stream from SoundCloud and ensure you're giving the appropriate credit too.
It has no dependency.[](https://nodei.co/npm/soundcloud-badge-packed)
## Usage ##
``` javascript
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: 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.