videoSource
info
Added in Scrcpy 2.2
- Type:
"display" | "camera" - Default value:
"display"
Selects the video source for capturing video from the device.
This option allows choosing between two different video sources:
"display": Captures video from the device's display (default behavior)"camera": Captures video from the device's camera
Related options
cameraId: Specifies which camera to use whenvideoSourceis set to"camera"cameraSize: Sets the camera capture size whenvideoSourceis set to"camera"cameraFacing: Specifies which camera facing direction to use whenvideoSourceis set to"camera"
Example
import { ScrcpyOptions2_2 } from "@yume-chan/scrcpy";
const options = new ScrcpyOptions2_2({
videoSource: "camera", // Capture video from device camera
});