listCameras
info
Added in Scrcpy 2.2
- Type:
boolean - Default value:
false
Lists available cameras on the device and exits.
When enabled, this option causes Scrcpy to enumerate and display all available cameras on the device, then exit without starting a streaming session. This is useful for discovering which cameras are available for use with the cameraId or cameraFacing options.
Adding this option with a value of false has no effect since this is the default behavior. Only setting this option to true will enable camera listing.
Related options
cameraId: Specifies which camera to usecameraFacing: Specifies which camera facing direction to use
Example
import { ScrcpyOptions2_2 } from "@yume-chan/scrcpy";
const options = new ScrcpyOptions2_2({
listCameras: true, // List available cameras on device
});