Skip to main content
Version: next

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.

Example

import { ScrcpyOptions4_0 } from "@yume-chan/scrcpy";

const options = new ScrcpyOptions4_0({
videoSource: "camera",
cameraTorch: true, // Enable flashlight at startup
});