togglePlay() {
    // If there already is a source, confirm it's playing or not
    if (this._player.src) {
      // If the player is paused, set the volume to 0 and fade up
      if (!this.state.playing) {
        this.play();
      }
      // If it is already playing, fade the music out (resulting in a pause)
      else {
        this.fadeDown();
      }
    }
  }
/**
   * Very basic method that acts like the play/pause button
   * of a standard player. It loads in a new song if there
   * isn't already one loaded.
   */
Very basic method that acts like the play/pause button
of a standard player. It loads in a new song if there
isn't already one loaded.
Very basic method that acts like the play / pause button of a standard player . It loads in a new song if there isn ' t already one loaded .
togglePlay() {
    if (this._player.src) {
      if (!this.state.playing) {
        this.play();
      }
      else {
        this.fadeDown();
      }
    }
  }
togglePlay ( ) { if ( this . _player . src ) { if ( ! this . state . playing ) { this . play ( ) ; } else { this . fadeDown ( ) ; } } }
Very basic method that acts like the play/pause button
 of a standard player.
Very basic method that acts like the play / pause button of a standard player .
// If there already is a source, confirm it's playing or not // If the player is paused, set the volume to 0 and fade up // If it is already playing, fade the music out (resulting in a pause)