react-soundplayer
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -88,3 +88,3 @@ 'use strict'; | ||
soundCloudAudio.on('seeked', this.onSeekedTrack.bind(this)); | ||
soundCloudAudio.on('pause', this.onAudioEnded.bind(this)); | ||
soundCloudAudio.on('pause', this.onAudioPaused.bind(this)); | ||
soundCloudAudio.on('ended', this.onAudioEnded.bind(this)); | ||
@@ -151,2 +151,11 @@ } | ||
}, { | ||
key: 'onAudioPaused', | ||
value: function onAudioPaused() { | ||
var onPauseTrack = this.props.onPauseTrack; | ||
this.setState({ playing: false }); | ||
onPauseTrack && onPauseTrack(this.soundCloudAudio); | ||
} | ||
}, { | ||
key: 'onAudioEnded', | ||
@@ -206,3 +215,4 @@ value: function onAudioEnded() { | ||
onStartTrack: PropTypes.func, | ||
onStopTrack: PropTypes.func | ||
onStopTrack: PropTypes.func, | ||
onPauseTrack: PropTypes.func | ||
}; | ||
@@ -209,0 +219,0 @@ |
{ | ||
"name": "react-soundplayer", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Create custom SoundCloud players with React", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
61551
1091