pause(fadeDuration) {
    const state = this._state;
    if (state === audio_object.STATE_ERROR) {
      this._on_playing();
      this._on_ended();
      this._pausePromise = Promise.resolve();
    } else if (state === audio_object.STATE_PLAYING) {
      this._state = audio_object.STATE_PAUSED;

      this._pausePromise = this.fade_out(fadeDuration).then(() => {
        // ensure still paused in case of promise race conditions
        if (this._state === audio_object.STATE_PAUSED) {
          // pause element (returns a promise)
          return this._element.pause();
        }
        return null;
      });
    }

    return this._pausePromise;
  }
Pauses audio and returns a promise.
@param [fadeDuration=0]
@returns {Promise}