Loading libraries/adb-scrcpy/src/client.ts +33 −0 Original line number Diff line number Diff line Loading @@ -260,21 +260,54 @@ export class AdbScrcpyClient { } #videoStream: Promise<AdbScrcpyVideoStream> | undefined; /** * Gets a `Promise` that resolves to the parsed video stream. * * On server version 2.1 and above, it will be `undefined` if * video is disabled by `options.video: false`. * * Note: if it's not `undefined`, it must be consumed to prevent * the connection from being blocked. */ get videoStream() { return this.#videoStream; } #audioStream: Promise<AdbScrcpyAudioStreamMetadata> | undefined; /** * Gets a `Promise` that resolves to the parsed audio stream. * * On server versions before 2.0, it will always be `undefined`. * On server version 2.0 and above, it will be `undefined` if * audio is disabled by `options.audio: false`. * * Note: if it's not `undefined`, it must be consumed to prevent * the connection from being blocked. */ get audioStream() { return this.#audioStream; } #controlMessageWriter: ScrcpyControlMessageWriter | undefined; /** * Gets the control message writer. * * On server version 1.22 and above, it will be `undefined` if * control is disabled by `options.control: false`. */ get controlMessageWriter() { return this.#controlMessageWriter; } #deviceMessageStream: ReadableStream<ScrcpyDeviceMessage> | undefined; /** * Gets the device message stream. * * On server version 1.22 and above, it will be `undefined` if * control is disabled by `options.control: false`. * * Note: it must be consumed to prevent the connection from being blocked. */ get deviceMessageStream() { return this.#deviceMessageStream; } Loading libraries/scrcpy/src/options/2.0.spec.ts→libraries/scrcpy/src/options/2_0.spec.ts +0 −0 File moved. View file libraries/scrcpy/src/options/2.1.spec.ts→libraries/scrcpy/src/options/2_1.spec.ts +0 −0 File moved. View file libraries/scrcpy/src/options/latest.ts +0 −2 Original line number Diff line number Diff line Loading @@ -10,5 +10,3 @@ export type ScrcpyVideoOrientation = ScrcpyVideoOrientation1_18; export type ScrcpyOptionsInitLatest = ScrcpyOptionsInit2_1; export class ScrcpyOptionsLatest extends ScrcpyOptions2_1 {} export const ScrcpyLatestVersion = "2.1"; Loading
libraries/adb-scrcpy/src/client.ts +33 −0 Original line number Diff line number Diff line Loading @@ -260,21 +260,54 @@ export class AdbScrcpyClient { } #videoStream: Promise<AdbScrcpyVideoStream> | undefined; /** * Gets a `Promise` that resolves to the parsed video stream. * * On server version 2.1 and above, it will be `undefined` if * video is disabled by `options.video: false`. * * Note: if it's not `undefined`, it must be consumed to prevent * the connection from being blocked. */ get videoStream() { return this.#videoStream; } #audioStream: Promise<AdbScrcpyAudioStreamMetadata> | undefined; /** * Gets a `Promise` that resolves to the parsed audio stream. * * On server versions before 2.0, it will always be `undefined`. * On server version 2.0 and above, it will be `undefined` if * audio is disabled by `options.audio: false`. * * Note: if it's not `undefined`, it must be consumed to prevent * the connection from being blocked. */ get audioStream() { return this.#audioStream; } #controlMessageWriter: ScrcpyControlMessageWriter | undefined; /** * Gets the control message writer. * * On server version 1.22 and above, it will be `undefined` if * control is disabled by `options.control: false`. */ get controlMessageWriter() { return this.#controlMessageWriter; } #deviceMessageStream: ReadableStream<ScrcpyDeviceMessage> | undefined; /** * Gets the device message stream. * * On server version 1.22 and above, it will be `undefined` if * control is disabled by `options.control: false`. * * Note: it must be consumed to prevent the connection from being blocked. */ get deviceMessageStream() { return this.#deviceMessageStream; } Loading
libraries/scrcpy/src/options/2.0.spec.ts→libraries/scrcpy/src/options/2_0.spec.ts +0 −0 File moved. View file
libraries/scrcpy/src/options/2.1.spec.ts→libraries/scrcpy/src/options/2_1.spec.ts +0 −0 File moved. View file
libraries/scrcpy/src/options/latest.ts +0 −2 Original line number Diff line number Diff line Loading @@ -10,5 +10,3 @@ export type ScrcpyVideoOrientation = ScrcpyVideoOrientation1_18; export type ScrcpyOptionsInitLatest = ScrcpyOptionsInit2_1; export class ScrcpyOptionsLatest extends ScrcpyOptions2_1 {} export const ScrcpyLatestVersion = "2.1";