old_contents: import { Component } from 'react'
  
  import { propTypes, defaultProps } from '../props'
  
  export default class Base extends Component {
    static propTypes = propTypes
    static defaultProps = defaultProps
    componentDidMount () {
      if (this.props.url) {
        this.load(this.props.url)
      }
    }
    componentWillUnmount () {
      this.stop()
    }
    componentWillReceiveProps (nextProps) {
      // Invoke player methods based on incoming props
      if (this.props.url !== nextProps.url && nextProps.url) {
        this.load(nextProps.url, nextProps.playing)
        this.props.onProgress({ played: 0, loaded: 0 }) // Needed?
      } else if (this.props.url && !nextProps.url) {
        this.stop()
        clearTimeout(this.updateTimeout)
      } else if (!this.props.playing && nextProps.playing) {
        this.play()
      } else if (this.props.playing && !nextProps.playing) {
        this.pause()
      } else if (this.props.volume !== nextProps.volume) {
        this.setVolume(nextProps.volume)
      }
    }
    shouldComponentUpdate (nextProps) {
      return this.props.url !== nextProps.url
    }
    isReady = false
    onReady = () => {
      this.setVolume(this.props.volume)
      if (this.props.playing || this.preloading) {
        this.preloading = false
        this.isReady = true
        if (this.loadOnReady) {
          this.load(this.loadOnReady, this.props.playing)
        } else {
          this.play()
        }
      }
    }
  }
  
new_contents: import { Component } from 'react'
  
  import { propTypes, defaultProps } from '../props'
  
  export default class Base extends Component {
    static propTypes = propTypes
    static defaultProps = defaultProps
    componentDidMount () {
      if (this.props.url) {
        this.load(this.props.url)
      }
    }
    componentWillUnmount () {
      this.stop()
    }
    componentWillReceiveProps (nextProps) {
      // Invoke player methods based on incoming props
      if (this.props.url !== nextProps.url && nextProps.url) {
        this.load(nextProps.url, nextProps.playing)
        this.props.onProgress({ played: 0, loaded: 0 }) // Needed?
      } else if (this.props.url && !nextProps.url) {
        this.stop()
        clearTimeout(this.updateTimeout)
      } else if (!this.props.playing && nextProps.playing) {
        this.play()
      } else if (this.props.playing && !nextProps.playing) {
        this.pause()
      } else if (this.props.volume !== nextProps.volume) {
        this.setVolume(nextProps.volume)
      }
    }
    shouldComponentUpdate (nextProps) {
      return this.props.url !== nextProps.url
    }
    isReady = false
    onReady = () => {
      this.isReady = true
      this.setVolume(this.props.volume)
      if (this.props.playing || this.preloading) {
        this.preloading = false
        if (this.loadOnReady) {
          this.load(this.loadOnReady, this.props.playing)
        } else {
          this.play()
        }
      }
    }
  }
  
subject: Set isReady before setVolume in onReady