static parseRaw(uri) {
    // Extract the scheme.
    const parts = uri.split(':');
    if (parts.length < 2 || parts[0] != 'data') {
      shaka.log.error('Bad data URI, failed to parse scheme');
      throw new shaka.util.Error(
          shaka.util.Error.Severity.CRITICAL,
          shaka.util.Error.Category.NETWORK,
          shaka.util.Error.Code.MALFORMED_DATA_URI,
          uri);
    }
    const path = parts.slice(1).join(':');

    // Extract the encoding and MIME type (required but can be empty).
    const infoAndData = path.split(',');
    if (infoAndData.length < 2) {
      shaka.log.error('Bad data URI, failed to extract encoding and MIME type');
      throw new shaka.util.Error(
          shaka.util.Error.Severity.CRITICAL,
          shaka.util.Error.Category.NETWORK,
          shaka.util.Error.Code.MALFORMED_DATA_URI,
          uri);
    }
    const info = infoAndData[0];
    const dataStr = window.decodeURIComponent(infoAndData.slice(1).join(','));

    // The MIME type is always the first thing in the semicolon-separated list
    // of type parameters.  It may be blank.
    const typeInfoList = info.split(';');
    const contentType = typeInfoList[0];

    // Check for base64 encoding, which is always the last in the
    // semicolon-separated list if present.
    let base64Encoded = false;
    if (typeInfoList.length > 1 &&
        typeInfoList[typeInfoList.length - 1] == 'base64') {
      base64Encoded = true;
      typeInfoList.pop();
    }

    // Convert the data.
    /** @type {BufferSource} */
    let data;
    if (base64Encoded) {
      data = shaka.util.Uint8ArrayUtils.fromBase64(dataStr);
    } else {
      data = shaka.util.StringUtils.toUTF8(dataStr);
    }

    return {data: data, contentType};
  }
@param {string} uri
@return {{data: BufferSource, contentType: string}}