static async isTypeSupported(mimetype, width, height) {
    const MimeUtils = shaka.util.MimeUtils;
    const ContentType = shaka.util.ManifestParserUtils.ContentType;
    const StreamUtils = shaka.util.StreamUtils;

    /** @type {!MediaDecodingConfiguration} */
    const mediaDecodingConfig = {
      type: 'media-source',
    };
    if (mimetype.startsWith('audio')) {
      const baseMimeType = MimeUtils.getBasicType(mimetype);
      const codecs = StreamUtils.getCorrectAudioCodecs(
          MimeUtils.getCodecs(mimetype), baseMimeType);
      // AudioConfiguration
      mediaDecodingConfig.audio = {
        contentType: MimeUtils.getFullOrConvertedType(
            baseMimeType, codecs, ContentType.AUDIO),
      };
    } else {
      const codecs = StreamUtils.getCorrectVideoCodecs(
          MimeUtils.getCodecs(mimetype));
      const baseMimeType = MimeUtils.getBasicType(mimetype);
      if (codecs.startsWith('hvc1.') && deviceDetected.disableHEVCSupport()) {
        return false;
      }
      // VideoConfiguration
      mediaDecodingConfig.video = {
        contentType: MimeUtils.getFullOrConvertedType(
            baseMimeType, codecs, ContentType.VIDEO),

        // NOTE: Some decoders strictly check the width and height fields and
        // won't decode smaller than 64x64.  So if we don't have this info (as
        // is the case in some of our simpler tests), assume a 64x64
        // resolution to fill in this required field for MediaCapabilities.
        //
        // This became an issue specifically on Firefox on M1 Macs.
        width: width || 64,
        height: height || 64,

        bitrate: 1,
        framerate: 1,
      };
    }
    const result =
        await navigator.mediaCapabilities.decodingInfo(mediaDecodingConfig);
    return result.supported;
  }
@param {!string} mimetype
@param {?number=} width
@param {?number=} height
@return {!Promise<boolean>}