code: private boolean resolveFirstMatchRenditions(Media media, Asset asset, MediaArgs mediaArgs) {
      Rendition rendition = asset.getRendition(mediaArgs);
      if (rendition != null) {
        media.setRenditions(ImmutableList.of(rendition));
        media.setUrl(rendition.getUrl());
        return true;
      }
      return false;
    }
docs: Check if a matching rendition is found for any of the provided media formats and other media args.
  The first match is returned.
  @param media Media
  @param asset Asset
  @param mediaArgs Media args
  @return true if a rendition was found