diff --git a/package.json b/package.json index 8fc6cfd8..a76095d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "react-player", - "version": "0.5.5", + "name": "@blueberry/react-player", + "version": "0.5.6", "description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud and Vimeo", "main": "lib/ReactPlayer.js", "scripts": { diff --git a/src/ReactPlayer.js b/src/ReactPlayer.js index e6008c89..f7c0c1bf 100644 --- a/src/ReactPlayer.js +++ b/src/ReactPlayer.js @@ -54,6 +54,10 @@ export default class ReactPlayer extends Component { const active = Player.canPlay(this.props.url) const { youtubeConfig, soundcloudConfig, vimeoConfig, ...activeProps } = this.props const props = active ? { ...activeProps, ref: 'player' } : {} + + if (!active) + return null + return (