Rotate Device
Request to change the device orientation (landscape to portrait, or portrait to landscape). If the current app doesn't support the requested orientation, the device will not rotate.
The effect of this command is the same as unlocking the device orientation, rotating the device, and locking the device orientation again.
Usage
- JavaScript
- TypeScript
// Using `ScrcpyControlMessageSerializer`
const message = serializer.rotateDevice();
// Using `ScrcpyControlMessageWriter`
await writer.rotateDevice();
// Using `AdbScrcpyClient`
await client.controller.rotateDevice();
// Using `ScrcpyControlMessageSerializer`
const message: Uint8Array = serializer.rotateDevice();
// Using `ScrcpyControlMessageWriter`
await writer.rotateDevice();
// Using `AdbScrcpyClient`
await client.controller!.rotateDevice();