Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update opts PropTypes to allow passing callback for widget load #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/SoundCloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,22 @@ SoundCloud.propTypes = {
React.PropTypes.number,
]),

// widget parameters for appearance and auto play.
opts: React.PropTypes.objectOf(React.PropTypes.bool),
// widget parameters: appearance, auto play, and callback for SC.Widget.load()
opts: React.PropTypes.shape({
auto_play: React.PropTypes.bool,
visual: React.PropTypes.bool,
buying: React.PropTypes.bool,
liking: React.PropTypes.bool,
download: React.PropTypes.bool,
sharing: React.PropTypes.bool,
show_artwork: React.PropTypes.bool,
show_comments: React.PropTypes.bool,
show_playcount: React.PropTypes.bool,
show_user: React.PropTypes.bool,
show_reposts: React.PropTypes.bool,
hide_related: React.PropTypes.bool,
callback: React.PropTypes.func
}),

// event subscriptions
onPlay: React.PropTypes.func,
Expand Down