static overrideDolbyVisionCodecs(variants) {
    /** @type {!Map<string, string>} */
    const codecMap = new Map()
        .set('dvav', 'avc3')
        .set('dva1', 'avc1')
        .set('dvhe', 'hev1')
        .set('dvh1', 'hvc1')
        .set('dvc1', 'vvc1')
        .set('dvi1', 'vvi1');

    /** @type {!Set<!shaka.extern.Stream>} */
    const streams = new Set();
    for (const variant of variants) {
      if (variant.video) {
        streams.add(variant.video);
      }
    }
    for (const video of streams) {
      for (const [dvCodec, replacement] of codecMap) {
        if (video.codecs.includes(dvCodec)) {
          video.codecs = video.codecs.replace(dvCodec, replacement);
          break;
        }
      }
    }
  }
Maps Dolby Vision codecs to H.264 and H.265 equivalents as a workaround
to make Dolby Vision playback work on some platforms.

Mapping is done according to the relevant Dolby documentation found here:
https://professionalsupport.dolby.com/s/article/How-to-signal-Dolby-Vision-in-MPEG-DASH?language=en_US
@param {!Array<!shaka.extern.Variant>} variants