react-simple-soundcloud-widget

react-simple-soundcloud-widget JS library on GitHub react-simple-soundcloud-widget JS library on npm Download react-simple-soundcloud-widget JS library

basic react wrapper around their widget

Version 0.0.5 License MIT
react-simple-soundcloud-widget has no homepage
react-simple-soundcloud-widget JS library on GitHub
react-simple-soundcloud-widget JS library on npm
Download react-simple-soundcloud-widget JS library

react-simple-soundcloud-widget

Basically this is a rewrite of the simple https://github.com/troybetz/react-soundcloud-widget, which was unfortunately not being maintained any more.

dependencies

This library assumes you are using React and manage the React dependency by yourself.

use

install:

npm i react-simple-soundcloud-widget

using:

import SoundCloudWidget from 'react-simple-soundcloud-widget'

<SoundCloudWidget
    url="https://soundcloud.com/timo-vaerigjarson/i-searched-myself"
/>

This is all that is truly necessary. Everything else is optional. Here is an example with all possible props for reference:

<SoundCloud
    url="https://soundcloud.com/timo-vaerigjarson/i-searched-myself"
    config={{
        auto_play: true // default
        visual: false // default
        buying: true // default
        liking: true // default
        download: true // default
        sharing: true // default
        show_artwork: true // default
        show_comments: true // default
        show_playcount: true // default
        show_user: true // default
        show_reposts: false // default
        hide_related: false // default
    }}
    onPlay={info => console.log('on play called', info)}
    onPause={info => console.log('on pause called', info)}
    onEnd={info => console.log('on end called', info)}
    onReady={() => console.log('on ready called')}
/>

develop

npm i
npm run start