capture.devices readonly

Returns a table listing all available capture devices on the system. The table contains two fields:

  • video: an array of string values, each being the name of an available video capture device (e.g. a webcam)
  • audio: an array of string values, each being the name of an available audio capture device (e.g. a microphone)
The device names returned here can be passed directly to the Camera constructor to select a specific device.

Example

--! luart-extensions import capture print("Available video devices:") for name in each(capture.devices.video) do print("\t${name}") end print("Available audio devices:") for name in each(capture.devices.audio) do print("\t${name}") end