@yume-chan/scrcpy 0.0.12 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +39 -0
- package/CHANGELOG.md +23 -1
- package/README.md +1 -0
- package/bin/scrcpy-server +0 -0
- package/bin/version.d.ts +1 -1
- package/bin/version.js +1 -1
- package/esm/client.d.ts +14 -2
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js +277 -145
- package/esm/client.js.map +1 -1
- package/esm/connection.d.ts +4 -4
- package/esm/connection.d.ts.map +1 -1
- package/esm/connection.js +74 -71
- package/esm/connection.js.map +1 -1
- package/esm/decoder/tinyh264/index.js +48 -48
- package/esm/decoder/tinyh264/index.js.map +1 -1
- package/esm/decoder/tinyh264/wrapper.js +3 -2
- package/esm/decoder/tinyh264/wrapper.js.map +1 -1
- package/esm/decoder/web-codecs/index.d.ts.map +1 -1
- package/esm/decoder/web-codecs/index.js +28 -22
- package/esm/decoder/web-codecs/index.js.map +1 -1
- package/esm/message.d.ts +12 -8
- package/esm/message.d.ts.map +1 -1
- package/esm/message.js +13 -8
- package/esm/message.js.map +1 -1
- package/esm/options/1_16/index.d.ts +8 -7
- package/esm/options/1_16/index.d.ts.map +1 -1
- package/esm/options/1_16/index.js +88 -82
- package/esm/options/1_16/index.js.map +1 -1
- package/esm/options/1_16/sps.js +3 -2
- package/esm/options/1_16/sps.js.map +1 -1
- package/esm/options/1_18.d.ts +3 -2
- package/esm/options/1_18.d.ts.map +1 -1
- package/esm/options/1_18.js +24 -1
- package/esm/options/1_18.js.map +1 -1
- package/esm/options/1_21.js +4 -1
- package/esm/options/1_21.js.map +1 -1
- package/esm/options/1_22.d.ts +3 -3
- package/esm/options/1_22.d.ts.map +1 -1
- package/esm/options/1_22.js +9 -6
- package/esm/options/1_22.js.map +1 -1
- package/esm/options/1_23.d.ts +12 -0
- package/esm/options/1_23.d.ts.map +1 -0
- package/esm/options/1_23.js +34 -0
- package/esm/options/1_23.js.map +1 -0
- package/esm/options/1_24.d.ts +9 -0
- package/esm/options/1_24.d.ts.map +1 -0
- package/esm/options/1_24.js +13 -0
- package/esm/options/1_24.js.map +1 -0
- package/esm/options/common.d.ts +6 -2
- package/esm/options/common.d.ts.map +1 -1
- package/esm/options/common.js.map +1 -1
- package/esm/options/index.d.ts +2 -0
- package/esm/options/index.d.ts.map +1 -1
- package/esm/options/index.js +2 -0
- package/esm/options/index.js.map +1 -1
- package/esm/push-server.d.ts +2 -2
- package/esm/push-server.d.ts.map +1 -1
- package/esm/push-server.js +6 -13
- package/esm/push-server.js.map +1 -1
- package/esm/utils.d.ts +0 -2
- package/esm/utils.d.ts.map +1 -1
- package/esm/utils.js +0 -8
- package/esm/utils.js.map +1 -1
- package/package.json +6 -6
- package/src/client.ts +185 -25
- package/src/connection.ts +40 -15
- package/src/decoder/web-codecs/index.ts +2 -1
- package/src/message.ts +10 -3
- package/src/options/1_16/index.ts +51 -43
- package/src/options/1_18.ts +21 -1
- package/src/options/1_22.ts +6 -8
- package/src/options/1_23.ts +44 -0
- package/src/options/1_24.ts +18 -0
- package/src/options/common.ts +7 -2
- package/src/options/index.ts +2 -0
- package/src/push-server.ts +6 -8
- package/src/utils.ts +0 -11
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/scrcpy",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.0.15",
|
|
6
|
+
"tag": "@yume-chan/scrcpy_v0.0.15",
|
|
7
|
+
"date": "Mon, 02 May 2022 04:18:01 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Add support for `rotateDevice` control message"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"comment": "Add method to get screen list"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"version": "0.0.14",
|
|
21
|
+
"tag": "@yume-chan/scrcpy_v0.0.14",
|
|
22
|
+
"date": "Sat, 30 Apr 2022 14:05:48 GMT",
|
|
23
|
+
"comments": {
|
|
24
|
+
"none": [
|
|
25
|
+
{
|
|
26
|
+
"comment": "Add support for new option of 1.24"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"version": "0.0.13",
|
|
33
|
+
"tag": "@yume-chan/scrcpy_v0.0.13",
|
|
34
|
+
"date": "Thu, 28 Apr 2022 01:23:53 GMT",
|
|
35
|
+
"comments": {
|
|
36
|
+
"none": [
|
|
37
|
+
{
|
|
38
|
+
"comment": "Add support for 1.23"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
4
43
|
{
|
|
5
44
|
"version": "0.0.12",
|
|
6
45
|
"tag": "@yume-chan/scrcpy_v0.0.12",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# Change Log - @yume-chan/scrcpy
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 02 May 2022 04:18:01 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.0.15
|
|
6
|
+
Mon, 02 May 2022 04:18:01 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Add support for `rotateDevice` control message
|
|
11
|
+
- Add method to get screen list
|
|
12
|
+
|
|
13
|
+
## 0.0.14
|
|
14
|
+
Sat, 30 Apr 2022 14:05:48 GMT
|
|
15
|
+
|
|
16
|
+
### Updates
|
|
17
|
+
|
|
18
|
+
- Add support for new option of 1.24
|
|
19
|
+
|
|
20
|
+
## 0.0.13
|
|
21
|
+
Thu, 28 Apr 2022 01:23:53 GMT
|
|
22
|
+
|
|
23
|
+
### Updates
|
|
24
|
+
|
|
25
|
+
- Add support for 1.23
|
|
4
26
|
|
|
5
27
|
## 0.0.12
|
|
6
28
|
Sun, 03 Apr 2022 11:18:47 GMT
|
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ Scrcpy server has no backward compatibility on options input format. Currently t
|
|
|
50
50
|
| 1.18~1.20 | `ScrcpyOptions1_18` |
|
|
51
51
|
| 1.21 | `ScrcpyOptions1_21` |
|
|
52
52
|
| 1.22 | `ScrcpyOptions1_22` |
|
|
53
|
+
| 1.23 | `ScrcpyOptions1_23` |
|
|
53
54
|
|
|
54
55
|
You must use the correct type according to the server version.
|
|
55
56
|
|
package/bin/scrcpy-server
CHANGED
|
Binary file
|
package/bin/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.
|
|
1
|
+
export default '1.24';
|
package/bin/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.
|
|
1
|
+
export default '1.24';
|
package/esm/client.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReadableStream, type Adb, type AdbSocket, type AdbSubprocessProtocol } from '@yume-chan/adb';
|
|
2
2
|
import { ScrcpyInjectKeyCodeControlMessage, ScrcpyInjectTouchControlMessage, type AndroidKeyEventAction } from './message.js';
|
|
3
3
|
import type { ScrcpyInjectScrollControlMessage1_22, ScrcpyOptions, VideoStreamPacket } from "./options/index.js";
|
|
4
4
|
export declare class ScrcpyClient {
|
|
5
|
+
/**
|
|
6
|
+
* This method will modify the given `options`,
|
|
7
|
+
* so don't reuse it elsewhere.
|
|
8
|
+
*/
|
|
5
9
|
static getEncoders(adb: Adb, path: string, version: string, options: ScrcpyOptions<any>): Promise<string[]>;
|
|
10
|
+
/**
|
|
11
|
+
* This method will modify the given `options`,
|
|
12
|
+
* so don't reuse it elsewhere.
|
|
13
|
+
*/
|
|
14
|
+
static getDisplays(adb: Adb, path: string, version: string, options: ScrcpyOptions<any>): Promise<number[]>;
|
|
6
15
|
static start(adb: Adb, path: string, version: string, options: ScrcpyOptions<any>): Promise<ScrcpyClient>;
|
|
7
16
|
private _adb;
|
|
8
17
|
get adb(): Adb;
|
|
@@ -24,13 +33,16 @@ export declare class ScrcpyClient {
|
|
|
24
33
|
<TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<string, TThis, TArgs, unknown>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
|
|
25
34
|
};
|
|
26
35
|
private lastTouchMessage;
|
|
27
|
-
constructor(adb: Adb, options: ScrcpyOptions<any>, process: AdbSubprocessProtocol, videoStream:
|
|
36
|
+
constructor(adb: Adb, options: ScrcpyOptions<any>, process: AdbSubprocessProtocol, stdout: ReadableStream<string>, videoStream: AdbSocket, controlStream: AdbSocket | undefined);
|
|
28
37
|
private checkControlStream;
|
|
38
|
+
private getControlMessageTypeValue;
|
|
29
39
|
injectKeyCode(message: Omit<ScrcpyInjectKeyCodeControlMessage, 'type'>): Promise<void>;
|
|
30
40
|
injectText(text: string): Promise<void>;
|
|
31
41
|
injectTouch(message: Omit<ScrcpyInjectTouchControlMessage, 'type' | 'screenWidth' | 'screenHeight'>): Promise<void>;
|
|
32
42
|
injectScroll(message: Omit<ScrcpyInjectScrollControlMessage1_22, 'type' | 'screenWidth' | 'screenHeight'>): Promise<void>;
|
|
33
43
|
pressBackOrTurnOnScreen(action: AndroidKeyEventAction): Promise<void>;
|
|
44
|
+
private sendSimpleControlMessage;
|
|
45
|
+
rotateDevice(): Promise<void>;
|
|
34
46
|
close(): Promise<void>;
|
|
35
47
|
}
|
|
36
48
|
//# sourceMappingURL=client.d.ts.map
|
package/esm/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkG,cAAc,EA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ACnE,IAAW,iBAAiB;;;MAA8C;IAE1E,OAAO,CAAC,gBAAgB,CAAK;gBAGzB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,EAC3B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,EAC9B,WAAW,EAAE,SAAS,EACtB,aAAa,EAAE,SAAS,GAAG,SAAS;IAwCxC,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,0BAA0B;IASrB,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,iCAAiC,EAAE,MAAM,CAAC;IAStE,UAAU,CAAC,IAAI,EAAE,MAAM;IASvB,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,+BAA+B,EAAE,MAAM,GAAG,aAAa,GAAG,cAAc,CAAC;IA2BnG,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,oCAAoC,EAAE,MAAM,GAAG,aAAa,GAAG,cAAc,CAAC;IAgBzG,uBAAuB,CAAC,MAAM,EAAE,qBAAqB;YAYpD,wBAAwB;IAQzB,YAAY;IAIZ,KAAK;CAIrB"}
|
package/esm/client.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AdbBufferedStream, AdbNoneSubprocessProtocol, DecodeUtf8Stream, InspectStream, TransformStream, WritableStream } from '@yume-chan/adb';
|
|
1
|
+
import { AbortController, AdbBufferedStream, AdbSubprocessNoneProtocol, DecodeUtf8Stream, InspectStream, ReadableStream, TransformStream, WritableStream } from '@yume-chan/adb';
|
|
3
2
|
import { EventEmitter } from '@yume-chan/event';
|
|
4
3
|
import Struct from '@yume-chan/struct';
|
|
5
|
-
import { AndroidMotionEventAction, ScrcpyControlMessageType, ScrcpyInjectKeyCodeControlMessage, ScrcpyInjectTextControlMessage, ScrcpyInjectTouchControlMessage } from './message.js';
|
|
4
|
+
import { AndroidMotionEventAction, ScrcpyControlMessageType, ScrcpyInjectKeyCodeControlMessage, ScrcpyInjectTextControlMessage, ScrcpyInjectTouchControlMessage, ScrcpySimpleControlMessage } from './message.js';
|
|
6
5
|
function* splitLines(text) {
|
|
7
6
|
let start = 0;
|
|
8
7
|
while (true) {
|
|
@@ -15,19 +14,9 @@ function* splitLines(text) {
|
|
|
15
14
|
start = index + 1;
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export class ScrcpyClient {
|
|
22
|
-
constructor(adb, options, process, videoStream, controlStream) {
|
|
23
|
-
this.clipboardChangeEvent = new EventEmitter();
|
|
24
|
-
this.lastTouchMessage = 0;
|
|
25
|
-
this._adb = adb;
|
|
26
|
-
this.options = options;
|
|
27
|
-
this.process = process;
|
|
28
|
-
this._stdout = process.stdout
|
|
29
|
-
.pipeThrough(new DecodeUtf8Stream())
|
|
30
|
-
.pipeThrough(new TransformStream({
|
|
17
|
+
class SplitLinesStream extends TransformStream {
|
|
18
|
+
constructor() {
|
|
19
|
+
super({
|
|
31
20
|
transform(chunk, controller) {
|
|
32
21
|
for (const line of splitLines(chunk)) {
|
|
33
22
|
if (line === '') {
|
|
@@ -36,9 +25,202 @@ export class ScrcpyClient {
|
|
|
36
25
|
controller.enqueue(line);
|
|
37
26
|
}
|
|
38
27
|
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class ArrayToStream extends ReadableStream {
|
|
32
|
+
array;
|
|
33
|
+
index = 0;
|
|
34
|
+
constructor(array) {
|
|
35
|
+
super({
|
|
36
|
+
start: async () => {
|
|
37
|
+
await Promise.resolve();
|
|
38
|
+
this.array = array;
|
|
39
|
+
},
|
|
40
|
+
pull: (controller) => {
|
|
41
|
+
if (this.index < this.array.length) {
|
|
42
|
+
controller.enqueue(this.array[this.index]);
|
|
43
|
+
this.index += 1;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
controller.close();
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
class ConcatStream extends ReadableStream {
|
|
53
|
+
streams;
|
|
54
|
+
index = 0;
|
|
55
|
+
reader;
|
|
56
|
+
constructor(...streams) {
|
|
57
|
+
super({
|
|
58
|
+
start: async (controller) => {
|
|
59
|
+
await Promise.resolve();
|
|
60
|
+
this.streams = streams;
|
|
61
|
+
this.advance(controller);
|
|
62
|
+
},
|
|
63
|
+
pull: async (controller) => {
|
|
64
|
+
const result = await this.reader.read();
|
|
65
|
+
if (!result.done) {
|
|
66
|
+
controller.enqueue(result.value);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.advance(controller);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
advance(controller) {
|
|
74
|
+
if (this.index < this.streams.length) {
|
|
75
|
+
this.reader = this.streams[this.index].getReader();
|
|
76
|
+
this.index += 1;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
controller.close();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const ClipboardMessage = new Struct()
|
|
84
|
+
.uint32('length')
|
|
85
|
+
.string('content', { lengthField: 'length' });
|
|
86
|
+
export class ScrcpyClient {
|
|
87
|
+
/**
|
|
88
|
+
* This method will modify the given `options`,
|
|
89
|
+
* so don't reuse it elsewhere.
|
|
90
|
+
*/
|
|
91
|
+
static async getEncoders(adb, path, version, options) {
|
|
92
|
+
// Provide an invalid encoder name
|
|
93
|
+
// So the server will return all available encoders
|
|
94
|
+
options.value.encoderName = '_';
|
|
95
|
+
// Disable control for faster connection in 1.22+
|
|
96
|
+
options.value.control = false;
|
|
97
|
+
options.value.sendDeviceMeta = false;
|
|
98
|
+
options.value.sendDummyByte = false;
|
|
99
|
+
// Scrcpy server will open connections, before initializing encoder
|
|
100
|
+
// Thus although an invalid encoder name is given, the start process will success
|
|
101
|
+
const client = await ScrcpyClient.start(adb, path, version, options);
|
|
102
|
+
const encoderNameRegex = options.getOutputEncoderNameRegex();
|
|
103
|
+
const encoders = [];
|
|
104
|
+
await client.stdout.pipeTo(new WritableStream({
|
|
105
|
+
write(line) {
|
|
106
|
+
const match = line.match(encoderNameRegex);
|
|
107
|
+
if (match) {
|
|
108
|
+
encoders.push(match[1]);
|
|
109
|
+
}
|
|
110
|
+
},
|
|
39
111
|
}));
|
|
40
|
-
|
|
41
|
-
|
|
112
|
+
return encoders;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* This method will modify the given `options`,
|
|
116
|
+
* so don't reuse it elsewhere.
|
|
117
|
+
*/
|
|
118
|
+
static async getDisplays(adb, path, version, options) {
|
|
119
|
+
// Similar to `getEncoders`, pass an invalid option and parse the output
|
|
120
|
+
options.value.displayId = -1;
|
|
121
|
+
options.value.control = false;
|
|
122
|
+
options.value.sendDeviceMeta = false;
|
|
123
|
+
options.value.sendDummyByte = false;
|
|
124
|
+
try {
|
|
125
|
+
// Server will exit before opening connections when an invalid display id was given.
|
|
126
|
+
await ScrcpyClient.start(adb, path, version, options);
|
|
127
|
+
}
|
|
128
|
+
catch (e) {
|
|
129
|
+
if (e instanceof Error) {
|
|
130
|
+
const output = e.output;
|
|
131
|
+
const displayIdRegex = /\s+scrcpy --display (\d+)/;
|
|
132
|
+
const displays = [];
|
|
133
|
+
for (const line of output) {
|
|
134
|
+
const match = line.match(displayIdRegex);
|
|
135
|
+
if (match) {
|
|
136
|
+
displays.push(Number.parseInt(match[1], 10));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return displays;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
throw new Error('failed to get displays');
|
|
143
|
+
}
|
|
144
|
+
static async start(adb, path, version, options) {
|
|
145
|
+
const connection = options.createConnection(adb);
|
|
146
|
+
let process;
|
|
147
|
+
try {
|
|
148
|
+
await connection.initialize();
|
|
149
|
+
process = await adb.subprocess.spawn([
|
|
150
|
+
// cspell: disable-next-line
|
|
151
|
+
`CLASSPATH=${path}`,
|
|
152
|
+
'app_process',
|
|
153
|
+
/* unused */ '/',
|
|
154
|
+
'com.genymobile.scrcpy.Server',
|
|
155
|
+
version,
|
|
156
|
+
...options.formatServerArguments(),
|
|
157
|
+
], {
|
|
158
|
+
// Scrcpy server doesn't split stdout and stderr,
|
|
159
|
+
// so disable Shell Protocol to simplify processing
|
|
160
|
+
protocols: [AdbSubprocessNoneProtocol],
|
|
161
|
+
});
|
|
162
|
+
const stdout = process.stdout
|
|
163
|
+
.pipeThrough(new DecodeUtf8Stream())
|
|
164
|
+
.pipeThrough(new SplitLinesStream());
|
|
165
|
+
// Read stdout, otherwise `process.exit` won't resolve.
|
|
166
|
+
const output = [];
|
|
167
|
+
const abortController = new AbortController();
|
|
168
|
+
const pipe = stdout
|
|
169
|
+
.pipeTo(new WritableStream({
|
|
170
|
+
write(chunk) {
|
|
171
|
+
output.push(chunk);
|
|
172
|
+
}
|
|
173
|
+
}), {
|
|
174
|
+
signal: abortController.signal,
|
|
175
|
+
preventCancel: true,
|
|
176
|
+
})
|
|
177
|
+
.catch(() => { });
|
|
178
|
+
const result = await Promise.race([
|
|
179
|
+
process.exit,
|
|
180
|
+
connection.getStreams(),
|
|
181
|
+
]);
|
|
182
|
+
if (typeof result === 'number') {
|
|
183
|
+
const error = new Error('scrcpy server exited prematurely');
|
|
184
|
+
error.output = output;
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
abortController.abort();
|
|
188
|
+
await pipe;
|
|
189
|
+
const [videoStream, controlStream] = result;
|
|
190
|
+
return new ScrcpyClient(adb, options, process, new ConcatStream(new ArrayToStream(output), stdout), videoStream, controlStream);
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
await process?.kill();
|
|
194
|
+
throw e;
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
connection.dispose();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
_adb;
|
|
201
|
+
get adb() { return this._adb; }
|
|
202
|
+
options;
|
|
203
|
+
process;
|
|
204
|
+
_stdout;
|
|
205
|
+
get stdout() { return this._stdout; }
|
|
206
|
+
get exit() { return this.process.exit; }
|
|
207
|
+
_screenWidth;
|
|
208
|
+
get screenWidth() { return this._screenWidth; }
|
|
209
|
+
_screenHeight;
|
|
210
|
+
get screenHeight() { return this._screenHeight; }
|
|
211
|
+
_videoStream;
|
|
212
|
+
get videoStream() { return this._videoStream; }
|
|
213
|
+
_controlStreamWriter;
|
|
214
|
+
clipboardChangeEvent = new EventEmitter();
|
|
215
|
+
get onClipboardChange() { return this.clipboardChangeEvent.event; }
|
|
216
|
+
lastTouchMessage = 0;
|
|
217
|
+
constructor(adb, options, process, stdout, videoStream, controlStream) {
|
|
218
|
+
this._adb = adb;
|
|
219
|
+
this.options = options;
|
|
220
|
+
this.process = process;
|
|
221
|
+
this._stdout = stdout;
|
|
222
|
+
this._videoStream = videoStream.readable
|
|
223
|
+
.pipeThrough(options.createVideoStreamTransformer())
|
|
42
224
|
.pipeThrough(new InspectStream(packet => {
|
|
43
225
|
if (packet.type === 'configuration') {
|
|
44
226
|
this._screenWidth = packet.data.croppedWidth;
|
|
@@ -48,13 +230,13 @@ export class ScrcpyClient {
|
|
|
48
230
|
if (controlStream) {
|
|
49
231
|
const buffered = new AdbBufferedStream(controlStream);
|
|
50
232
|
this._controlStreamWriter = controlStream.writable.getWriter();
|
|
51
|
-
(() =>
|
|
233
|
+
(async () => {
|
|
52
234
|
try {
|
|
53
235
|
while (true) {
|
|
54
|
-
const type =
|
|
236
|
+
const type = await buffered.read(1);
|
|
55
237
|
switch (type[0]) {
|
|
56
238
|
case 0:
|
|
57
|
-
const { content } =
|
|
239
|
+
const { content } = await ClipboardMessage.deserialize(buffered);
|
|
58
240
|
this.clipboardChangeEvent.fire(content);
|
|
59
241
|
break;
|
|
60
242
|
default:
|
|
@@ -62,148 +244,98 @@ export class ScrcpyClient {
|
|
|
62
244
|
}
|
|
63
245
|
}
|
|
64
246
|
}
|
|
65
|
-
catch
|
|
247
|
+
catch {
|
|
66
248
|
// TODO: Scrcpy: handle error
|
|
67
249
|
}
|
|
68
|
-
})
|
|
250
|
+
})();
|
|
69
251
|
}
|
|
70
252
|
}
|
|
71
|
-
static getEncoders(adb, path, version, options) {
|
|
72
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
// Provide an invalid encoder name
|
|
74
|
-
// So the server will return all available encoders
|
|
75
|
-
options.value.encoderName = '_';
|
|
76
|
-
// Disable control for faster connection in 1.22+
|
|
77
|
-
options.value.control = false;
|
|
78
|
-
// Scrcpy server will open connections, before initializing encoder
|
|
79
|
-
// Thus although an invalid encoder name is given, the start process will success
|
|
80
|
-
const client = yield ScrcpyClient.start(adb, path, version, options);
|
|
81
|
-
const encoderNameRegex = options.getOutputEncoderNameRegex();
|
|
82
|
-
const encoders = [];
|
|
83
|
-
yield client.stdout.pipeTo(new WritableStream({
|
|
84
|
-
write(line) {
|
|
85
|
-
const match = line.match(encoderNameRegex);
|
|
86
|
-
if (match) {
|
|
87
|
-
encoders.push(match[1]);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
}));
|
|
91
|
-
return encoders;
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
static start(adb, path, version, options) {
|
|
95
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
const connection = options.createConnection(adb);
|
|
97
|
-
let process;
|
|
98
|
-
try {
|
|
99
|
-
yield connection.initialize();
|
|
100
|
-
process = yield adb.subprocess.spawn([
|
|
101
|
-
// cspell: disable-next-line
|
|
102
|
-
`CLASSPATH=${path}`,
|
|
103
|
-
'app_process',
|
|
104
|
-
/* unused */ '/',
|
|
105
|
-
'com.genymobile.scrcpy.Server',
|
|
106
|
-
version,
|
|
107
|
-
...options.formatServerArguments(),
|
|
108
|
-
], {
|
|
109
|
-
// Scrcpy server doesn't split stdout and stderr,
|
|
110
|
-
// so disable Shell Protocol to simplify processing
|
|
111
|
-
protocols: [AdbNoneSubprocessProtocol],
|
|
112
|
-
});
|
|
113
|
-
const result = yield Promise.race([
|
|
114
|
-
process.exit,
|
|
115
|
-
connection.getStreams(),
|
|
116
|
-
]);
|
|
117
|
-
if (typeof result === 'number') {
|
|
118
|
-
throw new Error('scrcpy server exited prematurely');
|
|
119
|
-
}
|
|
120
|
-
const [videoStream, controlStream] = result;
|
|
121
|
-
return new ScrcpyClient(adb, options, process, videoStream, controlStream);
|
|
122
|
-
}
|
|
123
|
-
catch (e) {
|
|
124
|
-
yield (process === null || process === void 0 ? void 0 : process.kill());
|
|
125
|
-
throw e;
|
|
126
|
-
}
|
|
127
|
-
finally {
|
|
128
|
-
connection.dispose();
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
get adb() { return this._adb; }
|
|
133
|
-
get stdout() { return this._stdout; }
|
|
134
|
-
get exit() { return this.process.exit; }
|
|
135
|
-
get screenWidth() { return this._screenWidth; }
|
|
136
|
-
get screenHeight() { return this._screenHeight; }
|
|
137
|
-
get videoStream() { return this._videoStream; }
|
|
138
|
-
get onClipboardChange() { return this.clipboardChangeEvent.event; }
|
|
139
253
|
checkControlStream(caller) {
|
|
140
254
|
if (!this._controlStreamWriter) {
|
|
141
255
|
throw new Error(`${caller} called with control disabled`);
|
|
142
256
|
}
|
|
143
257
|
return this._controlStreamWriter;
|
|
144
258
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
259
|
+
getControlMessageTypeValue(type) {
|
|
260
|
+
const list = this.options.getControlMessageTypes();
|
|
261
|
+
const index = list.indexOf(type);
|
|
262
|
+
if (index === -1) {
|
|
263
|
+
throw new Error('Not supported');
|
|
264
|
+
}
|
|
265
|
+
return index;
|
|
150
266
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}));
|
|
158
|
-
});
|
|
267
|
+
async injectKeyCode(message) {
|
|
268
|
+
const controlStream = this.checkControlStream('injectKeyCode');
|
|
269
|
+
await controlStream.write(ScrcpyInjectKeyCodeControlMessage.serialize({
|
|
270
|
+
...message,
|
|
271
|
+
type: this.getControlMessageTypeValue(ScrcpyControlMessageType.InjectKeycode),
|
|
272
|
+
}));
|
|
159
273
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// ADB streams are actually pretty low-bandwidth and laggy
|
|
167
|
-
// Re-sample move events to avoid flooding the connection
|
|
168
|
-
// TODO: Scrcpy: investigate how to throttle touch events
|
|
169
|
-
// because 60FPS may still be too high
|
|
170
|
-
const now = Date.now();
|
|
171
|
-
if (now - this.lastTouchMessage < 16 &&
|
|
172
|
-
[AndroidMotionEventAction.Move, AndroidMotionEventAction.HoverMove].includes(message.action)) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
this.lastTouchMessage = now;
|
|
176
|
-
yield controlStream.write(ScrcpyInjectTouchControlMessage.serialize(Object.assign(Object.assign({}, message), { type: ScrcpyControlMessageType.InjectTouch, screenWidth: this.screenWidth, screenHeight: this.screenHeight })));
|
|
177
|
-
});
|
|
274
|
+
async injectText(text) {
|
|
275
|
+
const controlStream = this.checkControlStream('injectText');
|
|
276
|
+
await controlStream.write(ScrcpyInjectTextControlMessage.serialize({
|
|
277
|
+
type: this.getControlMessageTypeValue(ScrcpyControlMessageType.InjectText),
|
|
278
|
+
text,
|
|
279
|
+
}));
|
|
178
280
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
281
|
+
async injectTouch(message) {
|
|
282
|
+
const controlStream = this.checkControlStream('injectTouch');
|
|
283
|
+
if (!this.screenWidth || !this.screenHeight) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
// ADB streams are actually pretty low-bandwidth and laggy
|
|
287
|
+
// Re-sample move events to avoid flooding the connection
|
|
288
|
+
// TODO: Scrcpy: investigate how to throttle touch events
|
|
289
|
+
// because 60FPS may still be too high
|
|
290
|
+
const now = Date.now();
|
|
291
|
+
if (now - this.lastTouchMessage < 16 &&
|
|
292
|
+
[AndroidMotionEventAction.Move, AndroidMotionEventAction.HoverMove].includes(message.action)) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
this.lastTouchMessage = now;
|
|
296
|
+
await controlStream.write(ScrcpyInjectTouchControlMessage.serialize({
|
|
297
|
+
...message,
|
|
298
|
+
type: this.getControlMessageTypeValue(ScrcpyControlMessageType.InjectTouch),
|
|
299
|
+
screenWidth: this.screenWidth,
|
|
300
|
+
screenHeight: this.screenHeight,
|
|
301
|
+
}));
|
|
302
|
+
}
|
|
303
|
+
async injectScroll(message) {
|
|
304
|
+
const controlStream = this.checkControlStream('injectScroll');
|
|
305
|
+
if (!this.screenWidth || !this.screenHeight) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
const buffer = this.options.serializeInjectScrollControlMessage({
|
|
309
|
+
...message,
|
|
310
|
+
type: this.getControlMessageTypeValue(ScrcpyControlMessageType.InjectScroll),
|
|
311
|
+
screenWidth: this.screenWidth,
|
|
312
|
+
screenHeight: this.screenHeight,
|
|
187
313
|
});
|
|
314
|
+
await controlStream.write(buffer);
|
|
188
315
|
}
|
|
189
|
-
pressBackOrTurnOnScreen(action) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
action,
|
|
195
|
-
});
|
|
196
|
-
if (buffer) {
|
|
197
|
-
yield controlStream.write(buffer);
|
|
198
|
-
}
|
|
316
|
+
async pressBackOrTurnOnScreen(action) {
|
|
317
|
+
const controlStream = this.checkControlStream('pressBackOrTurnOnScreen');
|
|
318
|
+
const buffer = this.options.serializeBackOrScreenOnControlMessage({
|
|
319
|
+
type: this.getControlMessageTypeValue(ScrcpyControlMessageType.BackOrScreenOn),
|
|
320
|
+
action,
|
|
199
321
|
});
|
|
322
|
+
if (buffer) {
|
|
323
|
+
await controlStream.write(buffer);
|
|
324
|
+
}
|
|
200
325
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
yield ((_a = this.process) === null || _a === void 0 ? void 0 : _a.kill());
|
|
326
|
+
async sendSimpleControlMessage(type, name) {
|
|
327
|
+
const controlStream = this.checkControlStream(name);
|
|
328
|
+
const buffer = ScrcpySimpleControlMessage.serialize({
|
|
329
|
+
type: this.getControlMessageTypeValue(type),
|
|
206
330
|
});
|
|
331
|
+
await controlStream.write(buffer);
|
|
332
|
+
}
|
|
333
|
+
async rotateDevice() {
|
|
334
|
+
await this.sendSimpleControlMessage(ScrcpyControlMessageType.RotateDevice, 'rotateDevice');
|
|
335
|
+
}
|
|
336
|
+
async close() {
|
|
337
|
+
// No need to close streams. Kill the process will destroy them from the other side.
|
|
338
|
+
await this.process?.kill();
|
|
207
339
|
}
|
|
208
340
|
}
|
|
209
341
|
//# sourceMappingURL=client.js.map
|
package/esm/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAA+G,MAAM,gBAAgB,CAAC;AAC7P,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,iCAAiC,EAAE,8BAA8B,EAAE,+BAA+B,EAA8B,MAAM,cAAc,CAAC;AAGlN,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAY;IAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,OAAO,IAAI,EAAE;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,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