constructor(parent, controls) {
    super(parent, controls);
    this.button_ = document.createElement('button');
    this.button_.classList.add('material-icons-round');
    this.button_.classList.add('shaka-no-propagation');
    this.button_.classList.add('close-button');
    this.button_.textContent = 'close'; // Close icon.
    this.parent.appendChild(this.button_);

    this.button_.addEventListener('click', () => {
      if (!this.controls.isOpaque()) {
        return;
      }
      shakaDemoMain.unload();
    });

    if ('documentPictureInPicture' in window) {
      this.eventManager.listen(
          window.documentPictureInPicture, 'enter', () => {
            this.button_.style.display = 'none';
            const pipWindow = window.documentPictureInPicture.window;
            this.eventManager.listen(pipWindow, 'pagehide', () => {
              this.button_.style.display = 'block';
            });
          });
    }
  }
@param {!HTMLElement} parent
@param {!shaka.ui.Controls} controls