Skip to content

Commit

Permalink
Remove legacy Soundcloud player
Browse files Browse the repository at this point in the history
Causes more problems than it solves, and people can just install older versions of ReactPlayer if they really need to
Reverts commit 4399d1d
  • Loading branch information
cookpete committed Sep 8, 2017
1 parent c16207a commit a55ef3c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 99 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"whatwg-fetch": "^2.0.1"
},
"dependencies": {
"fetch-jsonp": "^1.0.2",
"load-script": "^1.0.0",
"lodash.omit": "^4.5.0",
"prop-types": "^15.5.6"
Expand Down
9 changes: 2 additions & 7 deletions src/ReactPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import omit from 'lodash.omit'
import { propTypes, defaultProps } from './props'
import YouTube from './players/YouTube'
import SoundCloud from './players/SoundCloud'
import SoundCloudLegacy from './players/SoundCloudLegacy'
import Vimeo from './players/Vimeo'
import Facebook from './players/Facebook'
import FilePlayer from './players/FilePlayer'
Expand Down Expand Up @@ -82,16 +81,12 @@ export default class ReactPlayer extends Component {
}
renderPlayers () {
// Build array of players to render based on URL and preload config
const { url, youtubeConfig, vimeoConfig, dailymotionConfig, soundcloudConfig } = this.props
const { url, youtubeConfig, vimeoConfig, dailymotionConfig } = this.props
const players = []
if (YouTube.canPlay(url)) {
players.push(YouTube)
} else if (SoundCloud.canPlay(url)) {
if (soundcloudConfig.legacy) {
players.push(SoundCloudLegacy)
} else {
players.push(SoundCloud)
}
players.push(SoundCloud)
} else if (Vimeo.canPlay(url)) {
players.push(Vimeo)
} else if (Facebook.canPlay(url)) {
Expand Down
85 changes: 0 additions & 85 deletions src/players/SoundCloudLegacy.js

This file was deleted.

8 changes: 2 additions & 6 deletions src/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export const propTypes = {
hidden: bool,
className: string,
soundcloudConfig: shape({
options: object,
legacy: bool,
clientId: string
options: object
}),
youtubeConfig: shape({
playerVars: object,
Expand Down Expand Up @@ -75,9 +73,7 @@ export const defaultProps = {
progressFrequency: 1000,
playsinline: false,
soundcloudConfig: {
options: {},
legacy: false,
clientId: 'e8b6f84fbcad14c301ca1355cae1dea2'
options: {}
},
youtubeConfig: {
playerVars: {},
Expand Down

0 comments on commit a55ef3c

Please sign in to comment.