e,
        subtree: true,
      });
    }
  }

  removeCaptionContainerObserver() {
    this.captionsObserver?.disconnect();
  }

  shouldHideToggle(video) {
    return !!video.closest(".ytd-video-preview");
  }

  setVolume(video, volume) {
    if (this.player) {
      this.player.setVolume(volume * 100);
    } else {
      video.volume = volume;
    }
  }

  getVolume(video) {
    if (this.player) {
      return this.player.getVolume() / 100;
    }
    return video.volume;
  }
}

this.PictureInPictureVideoWrapper = PictureInPictureVideoWrapper;
PK