react-soundplayer
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -67,2 +67,3 @@ 'use strict'; | ||
} | ||
if (value > 100) { | ||
@@ -69,0 +70,0 @@ value = 100; |
{ | ||
"name": "react-soundplayer", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Create custom SoundCloud players with React", | ||
@@ -18,4 +18,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"classnames": "^1.2.0", | ||
"object-assign": "^2.0.0", | ||
"classnames": "^2.1.2", | ||
"object-assign": "^3.0.0", | ||
"react": "^0.13.1", | ||
@@ -22,0 +22,0 @@ "soundcloud-audio": "^0.1.4" |
# <img src="http://www.officialpsds.com/images/thumbs/Soundcloud-Logo-psd47614.png" width="75" align="left"> react-soundplayer | ||
[![npm version](http://badge.fury.io/js/react-soundplayer.svg)](http://badge.fury.io/js/react-soundplayer) | ||
<!-- [![Dependency Status](http://david-dm.org/dmitri/react-soundplayer.svg)](http://david-dm.org/dmitri/react-soundplayer) --> | ||
<!-- [![Download Count](http://img.shields.io/npm/dm/react-soundplayer.svg?style=flat)](http://www.npmjs.com/package/react-soundplayer) --> | ||
[![Dependency Status](http://david-dm.org/soundblogs/react-soundplayer.svg)](http://david-dm.org/soundblogs/react-soundplayer) | ||
[![Download Count](http://img.shields.io/npm/dm/react-soundplayer.svg?style=flat)](http://www.npmjs.com/package/react-soundplayer) | ||
@@ -52,3 +52,3 @@ > Create highly-customizable SoundCloud players with React. | ||
ReactSoundPlayer depends on [React.js](http://facebook.github.io/react/index.html) 0.13.x (or higher) and [SoundCloudAudio](http://facebook.github.io/react/index.html) for managing HTML5 Audio. | ||
ReactSoundPlayer depends on [React.js](http://facebook.github.io/react/index.html) 0.13.x (or higher) and [SoundCloudAudio](https://github.com/voronianski/soundcloud-audio.js) for managing HTML5 Audio. | ||
@@ -146,8 +146,10 @@ # API | ||
As you see each component contains a set of self-descriptive properties. One of them is `className` which allows you to setup custom classnames as on regular DOM elements and style components as you wish. | ||
As you see each component contains a set of self-descriptive properties. One of them is `className` which allows you to setup custom class names as on regular DOM elements and style components as you wish. | ||
## SoundPlayerContainer | ||
`<SoundPlayerContainer />` is high level container that propagates its' children with all necessary [data](https://github.com/soundblogs/react-soundplayer#state) which you might need in order to design an audio player. When using it, just choose what kind of SoundCloud data you're consuming (via `resolveUrl` or `streamUrl`) | ||
`<SoundPlayerContainer />` is higher level container that propagates its' children with all necessary [props](https://github.com/soundblogs/react-soundplayer#state) which you might need in order to design an audio player. | ||
When using it, just choose what kind of SoundCloud data you're consuming (via `resolveUrl` or `streamUrl`) | ||
_If you're wondering "Why not mixin?", please read ["Why Component Is Better Than Mixin"](https://github.com/acdlite/flummox/blob/master/docs/docs/guides/why-flux-component-is-better-than-flux-mixin.md) by [@acdlite](https://github.com/acdlite)._ | ||
@@ -171,3 +173,3 @@ | ||
_(String)_ - pass here pure stream url as it's returned by [SoundCloud API](https://developers.soundcloud.com/docs/api/reference#tracks), it has higher priority than `resolveUrl`, example url: | ||
_(String)_ - pass here pure stream url as it's returned by [SoundCloud API](https://developers.soundcloud.com/docs/api/reference#tracks), it has higher priority than `resolveUrl`, example: | ||
@@ -180,3 +182,3 @@ ```javascript | ||
_(String)_ - your SoundCloud app's client ID, get at https://developers.soundcloud.com | ||
_(String)_ - your SoundCloud app's client ID, get it at https://developers.soundcloud.com | ||
@@ -214,2 +216,3 @@ [SoundCloudAudio](https://github.com/voronianski/soundcloud-audio.js) will be created per each component instance: | ||
- `currentTime` _(Number)_ - audio current time in seconds | ||
- `soundCloudAudio` _(instance of [SoundCloudAudio](https://github.com/voronianski/soundcloud-audio.js))_ | ||
@@ -282,2 +285,19 @@ As you can see it's really easy to create your own components from scratch and wrap them with `SoundPlayerContainer` which will provide all the necessary data to them. | ||
## Icon Components | ||
Icons for buttons and SoundCloud logo can be used on their own as well. All of them are pure [**SVG**](http://caniuse.com/#search=svg). | ||
```javascript | ||
import { Icons } from 'react-soundplayer/components'; | ||
// the list of available icons: | ||
const { | ||
SoundCloudLogoSVG, | ||
PlayIconSVG, | ||
PauseIconSVG, | ||
NextIconSVG, | ||
PrevIconSVG | ||
} = Icons; | ||
``` | ||
## SoundCloud API | ||
@@ -284,0 +304,0 @@ |
Sorry, the diff of this file is not supported yet
316
63362
29
+ Addedclassnames@2.5.1(transitive)
+ Addedobject-assign@3.0.0(transitive)
- Removedclassnames@1.2.2(transitive)
Updatedclassnames@^2.1.2
Updatedobject-assign@^3.0.0