removeCaptionsIfEmpty() {
    if (this.captionsButton && this.options.hideCaptionsButtonWhenEmpty) {
      const subtitleCount = this.getSubtitles().filter(({isError}) => !isError).length;
      this.captionsButton.style.display = subtitleCount > 0 ? '' : 'none';
      this.setControlsSize();
    }
  }
If no captions exist, remove the button.