Skip to main content
Version: next

keepActive

info

Added in Scrcpy 4.0

  • Type: boolean
  • Default value: false

Keeps the device active while the Scrcpy connection is established.

This option periodically signals user activity to the system to prevent the device from turning off due to inactivity. Unlike stayAwake, this does not change any global settings, and works whether the device is plugged in or not.

  • stayAwake: Prevents the device from sleeping while screen casting is active

Example

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

const options = new ScrcpyOptions4_0({
keepActive: true, // Keep device active
});