Loading libraries/pcm-player/src/index.ts +4 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ export abstract class PcmPlayer<T> { protected abstract sourceName: string; #context: AudioContext; get outputLatency() { return this.#context.outputLatency; } #channelCount: number; #worklet: AudioWorkletNode | undefined; #buffers: T[] = []; Loading libraries/scrcpy/src/control/serializer.ts +8 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import type { ScrcpyInjectScrollControlMessage } from "./inject-scroll.js"; import { ScrcpyInjectTextControlMessage } from "./inject-text.js"; import type { ScrcpyInjectTouchControlMessage } from "./inject-touch.js"; import { ScrcpyRotateDeviceControlMessage } from "./rotate-device.js"; import type { ScrcpySetClipboardControlMessage } from "./set-clipboard.js"; import type { AndroidScreenPowerMode } from "./set-screen-power-mode.js"; import { ScrcpySetScreenPowerModeControlMessage } from "./set-screen-power-mode.js"; import { Loading Loading @@ -113,4 +114,11 @@ export class ScrcpyControlMessageSerializer { type: this.#typeValues.get(ScrcpyControlMessageType.RotateDevice), }); } setClipboard(message: Omit<ScrcpySetClipboardControlMessage, "type">) { return this.#options.serializeSetClipboardControlMessage({ ...message, type: this.#typeValues.get(ScrcpyControlMessageType.SetClipboard), }); } } libraries/scrcpy/src/control/writer.ts +7 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ import type { import type { ScrcpyInjectScrollControlMessage } from "./inject-scroll.js"; import type { ScrcpyInjectTouchControlMessage } from "./inject-touch.js"; import { ScrcpyControlMessageSerializer } from "./serializer.js"; import type { ScrcpySetClipboardControlMessage } from "./set-clipboard.js"; import type { AndroidScreenPowerMode } from "./set-screen-power-mode.js"; export class ScrcpyControlMessageWriter { Loading Loading @@ -87,6 +88,12 @@ export class ScrcpyControlMessageWriter { await this.write(this.#serializer.rotateDevice()); } async setClipboard( message: Omit<ScrcpySetClipboardControlMessage, "type">, ) { await this.write(this.#serializer.setClipboard(message)); } releaseLock() { this.#writer.releaseLock(); } Loading Loading
libraries/pcm-player/src/index.ts +4 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ export abstract class PcmPlayer<T> { protected abstract sourceName: string; #context: AudioContext; get outputLatency() { return this.#context.outputLatency; } #channelCount: number; #worklet: AudioWorkletNode | undefined; #buffers: T[] = []; Loading
libraries/scrcpy/src/control/serializer.ts +8 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import type { ScrcpyInjectScrollControlMessage } from "./inject-scroll.js"; import { ScrcpyInjectTextControlMessage } from "./inject-text.js"; import type { ScrcpyInjectTouchControlMessage } from "./inject-touch.js"; import { ScrcpyRotateDeviceControlMessage } from "./rotate-device.js"; import type { ScrcpySetClipboardControlMessage } from "./set-clipboard.js"; import type { AndroidScreenPowerMode } from "./set-screen-power-mode.js"; import { ScrcpySetScreenPowerModeControlMessage } from "./set-screen-power-mode.js"; import { Loading Loading @@ -113,4 +114,11 @@ export class ScrcpyControlMessageSerializer { type: this.#typeValues.get(ScrcpyControlMessageType.RotateDevice), }); } setClipboard(message: Omit<ScrcpySetClipboardControlMessage, "type">) { return this.#options.serializeSetClipboardControlMessage({ ...message, type: this.#typeValues.get(ScrcpyControlMessageType.SetClipboard), }); } }
libraries/scrcpy/src/control/writer.ts +7 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ import type { import type { ScrcpyInjectScrollControlMessage } from "./inject-scroll.js"; import type { ScrcpyInjectTouchControlMessage } from "./inject-touch.js"; import { ScrcpyControlMessageSerializer } from "./serializer.js"; import type { ScrcpySetClipboardControlMessage } from "./set-clipboard.js"; import type { AndroidScreenPowerMode } from "./set-screen-power-mode.js"; export class ScrcpyControlMessageWriter { Loading Loading @@ -87,6 +88,12 @@ export class ScrcpyControlMessageWriter { await this.write(this.#serializer.rotateDevice()); } async setClipboard( message: Omit<ScrcpySetClipboardControlMessage, "type">, ) { await this.write(this.#serializer.setClipboard(message)); } releaseLock() { this.#writer.releaseLock(); } Loading