cameraTorch
info
Added in Scrcpy 4.0
- Type:
boolean - Default value:
false
Controls whether the camera flashlight (torch) is enabled when using camera video source.
This option only affects the initial value. To change the torch state at runtime, use the cameraSetTorch control message.
Related options
cameraZoom: Controls the camera zoom levelvideoSource: Selects the video source for capturing video
Related control messages
cameraSetTorch: Control camera flashlight at runtime
Example
import { ScrcpyOptions4_0 } from "@yume-chan/scrcpy";
const options = new ScrcpyOptions4_0({
videoSource: "camera",
cameraTorch: true, // Enable flashlight at startup
});