code: public static Webcam getDefault(long timeout, TimeUnit tunit) throws TimeoutException, WebcamException {
  
  		if (timeout < 0) {
  			throw new IllegalArgumentException(String.format("Timeout cannot be negative (%d)", timeout));
  		}
  		if (tunit == null) {
  			throw new IllegalArgumentException("Time unit cannot be null!");
  		}
  
  		List<Webcam> webcams = getWebcams(timeout, tunit);
  
  		assert webcams != null;
  
  		if (!webcams.isEmpty()) {
  			return webcams.get(0);
  		}
  
  		LOG.warn("No webcam has been detected!");
  
  		return null;
  	}
docs: Will discover and return first webcam available in the system.
  
  @param timeout the webcam discovery timeout (1 minute by default)
  @param tunit the time unit
  @return Default webcam (first from the list)
  @throws TimeoutException when discovery timeout has been exceeded
  @throws WebcamException if something is really wrong
  @throws IllegalArgumentException when timeout is negative or tunit null
  @see Webcam#getWebcams(long, TimeUnit)