function fromResolutionLike(resolution) {
  if (Array.isArray(resolution)) {
    return Math.min(...resolution);
  }
  return resolution;
}
@param {ResolutionLike} resolution Resolution.
@return {number} Resolution.