Skip to main content
Version: next

vdDestroyContent

info

Added in Scrcpy 3.1

  • Type: boolean
  • Default value: false

Controls whether the virtual display content is destroyed when the connection is closed.

By default, virtual display content is preserved when the connection is closed in Scrcpy. Adding this option with a value of false has no effect since this is the default behavior. Only setting this option to true will destroy the virtual display content when closing the connection.

  • newDisplay: Creates a new virtual display for video streaming
  • vdSystemDecorations: Controls whether the virtual display should include system decorations

Example

import { ScrcpyOptions3_1, ScrcpyNewDisplay } from "@yume-chan/scrcpy";

const options = new ScrcpyOptions3_1({
newDisplay: new ScrcpyNewDisplay(1920, 1080), // Required for virtual display to be created
vdDestroyContent: true, // Destroy content when closing connection
});