diff --git a/libraries/scrcpy/src/control/writer.ts b/libraries/scrcpy/src/control/writer.ts index 78d101fd8..abd2e6bcc 100644 --- a/libraries/scrcpy/src/control/writer.ts +++ b/libraries/scrcpy/src/control/writer.ts @@ -27,25 +27,25 @@ export class ScrcpyControlMessageWriter { this.#serializer = new ScrcpyControlMessageSerializer(options); } - async #write(message: Uint8Array) { + async write(message: Uint8Array) { await ConsumableWritableStream.write(this.#writer, message); } async injectKeyCode( message: Omit, ) { - await this.#write(this.#serializer.injectKeyCode(message)); + await this.write(this.#serializer.injectKeyCode(message)); } async injectText(text: string) { - await this.#write(this.#serializer.injectText(text)); + await this.write(this.#serializer.injectText(text)); } /** * `pressure` is a float value between 0 and 1. */ async injectTouch(message: Omit) { - await this.#write(this.#serializer.injectTouch(message)); + await this.write(this.#serializer.injectTouch(message)); } /** @@ -56,23 +56,23 @@ export class ScrcpyControlMessageWriter { ) { const data = this.#serializer.injectScroll(message); if (data) { - await this.#write(data); + await this.write(data); } } async backOrScreenOn(action: AndroidKeyEventAction) { const data = this.#serializer.backOrScreenOn(action); if (data) { - await this.#write(data); + await this.write(data); } } async setScreenPowerMode(mode: AndroidScreenPowerMode) { - await this.#write(this.#serializer.setScreenPowerMode(mode)); + await this.write(this.#serializer.setScreenPowerMode(mode)); } async rotateDevice() { - await this.#write(this.#serializer.rotateDevice()); + await this.write(this.#serializer.rotateDevice()); } releaseLock() { diff --git a/libraries/scrcpy/src/options/1_16/options.ts b/libraries/scrcpy/src/options/1_16/options.ts index d41ca5f4a..4b8f2105b 100644 --- a/libraries/scrcpy/src/options/1_16/options.ts +++ b/libraries/scrcpy/src/options/1_16/options.ts @@ -45,7 +45,7 @@ export class ScrcpyOptions1_16 implements ScrcpyOptions { maxFps: 0, lockVideoOrientation: ScrcpyVideoOrientation1_16.Unlocked, tunnelForward: false, - crop: undefined, + crop: "", sendFrameMeta: true, control: true, displayId: 0,