From df8dc61582af5202e3eeb8d6141465be5ed1bf84 Mon Sep 17 00:00:00 2001 From: Pete Cook Date: Wed, 26 Aug 2015 09:46:52 +0100 Subject: [PATCH] Add onError support --- src/players/SoundCloud.js | 3 ++- src/players/YouTube.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/players/SoundCloud.js b/src/players/SoundCloud.js index d3c565aa..dd29b743 100644 --- a/src/players/SoundCloud.js +++ b/src/players/SoundCloud.js @@ -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 diff --git a/src/players/YouTube.js b/src/players/YouTube.js index 18fff827..2b0cb31d 100644 --- a/src/players/YouTube.js +++ b/src/players/YouTube.js @@ -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 } }) })