Skip to content

Commit

Permalink
Add onError support
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Aug 27, 2015
1 parent a87cbc4 commit df8dc61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/players/SoundCloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export default class SoundCloud extends Base {
onbufferchange: function () {
if (this.player.isBuffering) this.props.onBuffer()
},
onfinish: this.props.onFinish
onfinish: this.props.onFinish,
ondataerror: this.props.onError
}
pause () {
if (!this.player) return
Expand Down
3 changes: 2 additions & 1 deletion src/players/YouTube.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export default class YouTube extends Base {
videoId: id,
playerVars: { autoplay: 1, controls: 0, showinfo: 0 },
events: {
onStateChange: this.onStateChange
onStateChange: this.onStateChange,
onError: this.props.onError
}
})
})
Expand Down

0 comments on commit df8dc61

Please sign in to comment.