Loading libraries/adb/src/server/client.ts +1 −1 Original line number Diff line number Diff line Loading @@ -441,7 +441,7 @@ export class AdbServerClient { } } async function raceSignal<T>( export async function raceSignal<T>( callback: () => Promise<T>, ...signals: (AbortSignal | undefined)[] ): Promise<T> { Loading libraries/scrcpy/src/control/serializer.ts +25 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import type { ScrcpyScrollController, } from "../options/index.js"; import { BasicControlMessage } from "./basic.js"; import type { AndroidKeyEventAction } from "./inject-keycode.js"; import { ScrcpyInjectKeyCodeControlMessage } from "./inject-keycode.js"; import type { ScrcpyInjectScrollControlMessage } from "./inject-scroll.js"; Loading Loading @@ -83,6 +84,30 @@ export class ScrcpyControlMessageSerializer { }); } expandNotificationPanel() { return BasicControlMessage.serialize({ type: this.#typeValues.get( ScrcpyControlMessageType.ExpandNotificationPanel, ), }); } expandSettingPanel() { return BasicControlMessage.serialize({ type: this.#typeValues.get( ScrcpyControlMessageType.ExpandSettingPanel, ), }); } collapseNotificationPanel() { return BasicControlMessage.serialize({ type: this.#typeValues.get( ScrcpyControlMessageType.CollapseNotificationPanel, ), }); } rotateDevice() { return ScrcpyRotateDeviceControlMessage.serialize({ type: this.#typeValues.get(ScrcpyControlMessageType.RotateDevice), Loading libraries/scrcpy/src/control/writer.ts +12 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,18 @@ export class ScrcpyControlMessageWriter { await this.write(this.#serializer.setScreenPowerMode(mode)); } async expandNotificationPanel() { await this.write(this.#serializer.expandNotificationPanel()); } async expandSettingPanel() { await this.write(this.#serializer.expandSettingPanel()); } async collapseNotificationPanel() { await this.write(this.#serializer.collapseNotificationPanel()); } async rotateDevice() { await this.write(this.#serializer.rotateDevice()); } Loading Loading
libraries/adb/src/server/client.ts +1 −1 Original line number Diff line number Diff line Loading @@ -441,7 +441,7 @@ export class AdbServerClient { } } async function raceSignal<T>( export async function raceSignal<T>( callback: () => Promise<T>, ...signals: (AbortSignal | undefined)[] ): Promise<T> { Loading
libraries/scrcpy/src/control/serializer.ts +25 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import type { ScrcpyScrollController, } from "../options/index.js"; import { BasicControlMessage } from "./basic.js"; import type { AndroidKeyEventAction } from "./inject-keycode.js"; import { ScrcpyInjectKeyCodeControlMessage } from "./inject-keycode.js"; import type { ScrcpyInjectScrollControlMessage } from "./inject-scroll.js"; Loading Loading @@ -83,6 +84,30 @@ export class ScrcpyControlMessageSerializer { }); } expandNotificationPanel() { return BasicControlMessage.serialize({ type: this.#typeValues.get( ScrcpyControlMessageType.ExpandNotificationPanel, ), }); } expandSettingPanel() { return BasicControlMessage.serialize({ type: this.#typeValues.get( ScrcpyControlMessageType.ExpandSettingPanel, ), }); } collapseNotificationPanel() { return BasicControlMessage.serialize({ type: this.#typeValues.get( ScrcpyControlMessageType.CollapseNotificationPanel, ), }); } rotateDevice() { return ScrcpyRotateDeviceControlMessage.serialize({ type: this.#typeValues.get(ScrcpyControlMessageType.RotateDevice), Loading
libraries/scrcpy/src/control/writer.ts +12 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,18 @@ export class ScrcpyControlMessageWriter { await this.write(this.#serializer.setScreenPowerMode(mode)); } async expandNotificationPanel() { await this.write(this.#serializer.expandNotificationPanel()); } async expandSettingPanel() { await this.write(this.#serializer.expandSettingPanel()); } async collapseNotificationPanel() { await this.write(this.#serializer.collapseNotificationPanel()); } async rotateDevice() { await this.write(this.#serializer.rotateDevice()); } Loading