mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 02:09:18 +02:00
chore(scrcpy): add more docs
This commit is contained in:
parent
347beb308e
commit
04f15595e3
4 changed files with 33 additions and 2 deletions
|
@ -260,21 +260,54 @@ export class AdbScrcpyClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
#videoStream: Promise<AdbScrcpyVideoStream> | undefined;
|
#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() {
|
get videoStream() {
|
||||||
return this.#videoStream;
|
return this.#videoStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
#audioStream: Promise<AdbScrcpyAudioStreamMetadata> | undefined;
|
#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() {
|
get audioStream() {
|
||||||
return this.#audioStream;
|
return this.#audioStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
#controlMessageWriter: ScrcpyControlMessageWriter | undefined;
|
#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() {
|
get controlMessageWriter() {
|
||||||
return this.#controlMessageWriter;
|
return this.#controlMessageWriter;
|
||||||
}
|
}
|
||||||
|
|
||||||
#deviceMessageStream: ReadableStream<ScrcpyDeviceMessage> | undefined;
|
#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() {
|
get deviceMessageStream() {
|
||||||
return this.#deviceMessageStream;
|
return this.#deviceMessageStream;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,3 @@ export type ScrcpyVideoOrientation = ScrcpyVideoOrientation1_18;
|
||||||
|
|
||||||
export type ScrcpyOptionsInitLatest = ScrcpyOptionsInit2_1;
|
export type ScrcpyOptionsInitLatest = ScrcpyOptionsInit2_1;
|
||||||
export class ScrcpyOptionsLatest extends ScrcpyOptions2_1 {}
|
export class ScrcpyOptionsLatest extends ScrcpyOptions2_1 {}
|
||||||
|
|
||||||
export const ScrcpyLatestVersion = "2.1";
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue