lockVideoOrientation
danger
Deprecated in Scrcpy 3.0
Use captureOrientation instead.
lockVideoOrientation
- Type:
-
-1 | 0 | 1 | 2 | 3(until 1.18) -
-2 | -1 | 0 | 1 | 2 | 3(since 1.18)
-
- Default value:
-1(unlocked)
Locks the orientation of the video stream.
Controls the orientation of the captured video stream without affecting the device's actual screen orientation:
-
-2: Initial (at device startup time)(since 1.18) -1: Unlocked (follows device orientation)0: Portrait1: Landscape2: Portrait flipped3: Landscape flipped
Note that this only affects the captured video stream, not the device screen itself.
Changelog
v1.18
Extended type to include -2 (Initial).
Related options
captureOrientation: ReplaceslockVideoOrientationoption in Scrcpy 3.0+
Example
import { ScrcpyOptions1_15 } from "@yume-chan/scrcpy";
// Lock orientation to landscape
const options = new ScrcpyOptions1_15({
lockVideoOrientation: 1, // Landscape
});