stop(fadeDuration) {
    const state = this._state;
    if (state === audio_object.STATE_ERROR) {
      this._on_playing();
      this._on_ended();
      this._stoppedPromise = Promise.resolve();
    } else if (state === audio_object.STATE_PAUSED) {
      this._stoppedPromise = this._pausePromise.then(() => {
        // ensure still stopped in case of promise race conditions
        if (this._state === audio_object.STATE_STOPPED) {
          // end previous
          this._on_playing();
          this._on_ended();

          // clear the src to stop streaming
          this._element.src = '';
        }
      });
    } else if (state === audio_object.STATE_PLAYING) {
      this._stoppedPromise = this.fade_out(fadeDuration).then(() => {
        // ensure still stopped in case of promise race conditions
        if (this._state === audio_object.STATE_STOPPED) {
          // end previous
          this._on_playing();
          this._on_ended();

          // pause element (returns a promise)
          return this._element.pause();
        }
        return null;
      }).then(() => {
        // clear the src to stop streaming
        this._element.src = '';
      });
    }

    // set state as stopped
    this._state = audio_object.STATE_STOPPED;
    return this._stoppedPromise;
  }
Stops audio and returns a promise.
@param [fadeDuration=0]
@returns {Promise}