computeOpacity() {
    const adIsPaused = this.ad_ ? this.ad_.isPaused() : false;
    const videoIsPaused = this.video_.paused && !this.isSeeking_;
    const keyboardNavigationMode = this.controlsContainer_.classList.contains(
        'shaka-keyboard-navigation');

    // Keep showing the controls if the ad or video is paused, there has been
    // recent mouse movement, we're in keyboard navigation, or one of a special
    // class of elements is hovered.
    if (adIsPaused ||
        ((!this.ad_ || !this.ad_.isLinear()) && videoIsPaused) ||
        this.recentMouseMovement_ ||
        keyboardNavigationMode ||
        this.isHovered_()) {
      // Make sure the state is up-to-date before showing it.
      this.updateTimeAndSeekRange_();

      if (this.controlsContainer_.getAttribute('shown') == null) {
        this.controlsContainer_.setAttribute('shown', 'true');
        this.dispatchVisibilityEvent_();
      }
      this.computeShakaTextContainerSize_();
      this.fadeControlsTimer_.stop();
    } else {
      this.fadeControlsTimer_.tickAfter(/* seconds= */ this.config_.fadeDelay);
    }
    if (this.anySettingsMenusAreOpen()) {
      this.controlsButtonPanel_.classList.remove('shaka-tooltips-on');
    }
  }
Recompute whether the controls should be shown or hidden.