Skip to content

Commit

Permalink
Remove propTypes and defaultProps from players
Browse files Browse the repository at this point in the history
They were only added to keep `standard` happy, but are inherited by `Base` so are basically redundant now
  • Loading branch information
cookpete committed Dec 28, 2015
1 parent 682e7fb commit 796edd1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/players/FilePlayer.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React from 'react'

import { propTypes, defaultProps } from '../props'
import Base from './Base'

const VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm)$/
const AUDIO_EXTENSIONS = /\.(mp3|wav)$/

export default class FilePlayer extends Base {
static displayName = 'FilePlayer'
static propTypes = propTypes
static defaultProps = defaultProps
static canPlay (url) {
return VIDEO_EXTENSIONS.test(url) || AUDIO_EXTENSIONS.test(url)
}
Expand Down
3 changes: 0 additions & 3 deletions src/players/SoundCloud.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import loadScript from 'load-script'

import { propTypes, defaultProps } from '../props'
import Base from './Base'

const SDK_URL = '//connect.soundcloud.com/sdk-2.0.0.js'
Expand All @@ -11,8 +10,6 @@ const MATCH_URL = /^https?:\/\/(soundcloud.com|snd.sc)\/([a-z0-9-]+\/[a-z0-9-]+)

export default class SoundCloud extends Base {
static displayName = 'SoundCloud'
static propTypes = propTypes
static defaultProps = defaultProps
static canPlay (url) {
return MATCH_URL.test(url)
}
Expand Down
3 changes: 0 additions & 3 deletions src/players/Vimeo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import { stringify } from 'query-string'

import { propTypes, defaultProps } from '../props'
import Base from './Base'

const IFRAME_SRC = 'https://player.vimeo.com/video/'
Expand All @@ -19,8 +18,6 @@ const DEFAULT_IFRAME_PARAMS = {

export default class Vimeo extends Base {
static displayName = 'Vimeo'
static propTypes = propTypes
static defaultProps = defaultProps
static canPlay (url) {
return MATCH_URL.test(url)
}
Expand Down
3 changes: 0 additions & 3 deletions src/players/YouTube.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import loadScript from 'load-script'

import { propTypes, defaultProps } from '../props'
import Base from './Base'

const SDK_URL = '//www.youtube.com/iframe_api'
Expand All @@ -19,8 +18,6 @@ let count = 0

export default class YouTube extends Base {
static displayName = 'YouTube'
static propTypes = propTypes
static defaultProps = defaultProps
static canPlay (url) {
return MATCH_URL.test(url)
}
Expand Down

0 comments on commit 796edd1

Please sign in to comment.