configure(config) {
    this.config_ = config;

    this.castProxy_.changeReceiverId(config.castReceiverAppId,
        config.castAndroidReceiverCompatible);

    // Deconstruct the old layout if applicable
    if (this.seekBar_) {
      this.seekBar_ = null;
    }

    if (this.playButton_) {
      this.playButton_ = null;
    }

    if (this.contextMenu_) {
      this.contextMenu_ = null;
    }

    if (this.vr_) {
      this.vr_.configure(config);
    }

    if (this.controlsContainer_) {
      shaka.util.Dom.removeAllChildren(this.controlsContainer_);
      this.releaseChildElements_();
    } else {
      this.addControlsContainer_();
      // The client-side ad container is only created once, and is never
      // re-created or uprooted in the DOM, even when the DOM is re-created,
      // since that seemingly breaks the IMA SDK.
      this.addClientAdContainer_();

      goog.asserts.assert(
          this.controlsContainer_, 'Should have a controlsContainer_!');
      goog.asserts.assert(this.localVideo_, 'Should have a localVideo_!');
      goog.asserts.assert(this.player_, 'Should have a player_!');
      this.vr_ = new shaka.ui.VRManager(this.controlsContainer_, this.vrCanvas_,
          this.localVideo_, this.player_, this.config_);
    }

    // Create the new layout
    this.createDOM_();

    // Init the play state
    this.onPlayStateChange_();

    // Elements that should not propagate clicks (controls panel, menus)
    const noPropagationElements = this.videoContainer_.getElementsByClassName(
        'shaka-no-propagation');
    for (const element of noPropagationElements) {
      const cb = (event) => event.stopPropagation();
      this.eventManager_.listen(element, 'click', cb);
      this.eventManager_.listen(element, 'dblclick', cb);
      if (navigator.maxTouchPoints > 0) {
        const touchCb = (event) => {
          if (!this.isOpaque()) {
            return;
          }
          event.stopPropagation();
        };
        this.eventManager_.listen(element, 'touchend', touchCb);
      }
    }
  }
@param {!shaka.extern.UIConfiguration} config
@export