selectVideoTrack(videoTrack, clearBuffer = false, safeMargin = 0) {
    const variants = this.getVariantTracks();
    if (!variants.length) {
      return;
    }
    const active = variants.find((t) => t.active);
    if (!active) {
      return;
    }
    const validVariant = variants.find((t) => {
      return t.audioId === active.audioId &&
          (t.videoBandwidth || t.bandwidth) == videoTrack.bandwidth &&
          t.width == videoTrack.width &&
          t.height == videoTrack.height &&
          t.frameRate == videoTrack.frameRate &&
          t.pixelAspectRatio == videoTrack.pixelAspectRatio &&
          t.hdr == videoTrack.hdr &&
          t.colorGamut == videoTrack.colorGamut &&
          t.videoLayout == videoTrack.videoLayout &&
          t.videoMimeType == videoTrack.mimeType &&
          t.videoCodec == videoTrack.codecs;
    });
    if (validVariant && !validVariant.active) {
      this.selectVariantTrack(validVariant, clearBuffer, safeMargin);
    }
  }
Select a video track compatible with the current audio track.
If the player has not loaded any content, this will be a no-op.

@param {shaka.extern.VideoTrack} videoTrack
@param {boolean=} clearBuffer
@param {number=} safeMargin Optional amount of buffer (in seconds) to
  retain when clearing the buffer. Useful for switching quickly
  without causing a buffering event. Defaults to 0 if not provided. Can
  cause hiccups on some browsers if chosen too small, e.g. The amount of
  two segments is a fair minimum to consider as safeMargin value.
@export