@yume-chan/scrcpy 2.0.0 → 2.1.0
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.md +15 -0
- package/README.md +2 -2
- package/esm/1_15/impl/defaults.d.ts.map +1 -1
- package/esm/1_15/impl/defaults.js +2 -2
- package/esm/1_15/impl/defaults.js.map +1 -1
- package/esm/3_2/impl/defaults.d.ts +57 -0
- package/esm/3_2/impl/defaults.d.ts.map +1 -0
- package/esm/3_2/impl/defaults.js +6 -0
- package/esm/3_2/impl/defaults.js.map +1 -0
- package/esm/3_2/impl/index.d.ts +4 -0
- package/esm/3_2/impl/index.d.ts.map +1 -0
- package/esm/3_2/impl/index.js +3 -0
- package/esm/3_2/impl/index.js.map +1 -0
- package/esm/3_2/impl/init.d.ts +6 -0
- package/esm/3_2/impl/init.d.ts.map +1 -0
- package/esm/3_2/impl/init.js +2 -0
- package/esm/3_2/impl/init.js.map +1 -0
- package/esm/3_2/impl/prev.d.ts +2 -0
- package/esm/3_2/impl/prev.d.ts.map +1 -0
- package/esm/3_2/impl/prev.js +2 -0
- package/esm/3_2/impl/prev.js.map +1 -0
- package/esm/3_2/index.d.ts +2 -0
- package/esm/3_2/index.d.ts.map +1 -0
- package/esm/3_2/index.js +2 -0
- package/esm/3_2/index.js.map +1 -0
- package/esm/3_2/options.d.ts +91 -0
- package/esm/3_2/options.d.ts.map +1 -0
- package/esm/3_2/options.js +92 -0
- package/esm/3_2/options.js.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/latest.d.ts +5 -5
- package/esm/latest.js +3 -3
- package/package.json +8 -8
- package/src/1_15/impl/defaults.ts +15 -16
- package/src/3_2/impl/defaults.ts +8 -0
- package/src/3_2/impl/index.ts +3 -0
- package/src/3_2/impl/init.ts +17 -0
- package/src/3_2/impl/prev.ts +1 -0
- package/src/3_2/index.ts +1 -0
- package/src/3_2/options.ts +190 -0
- package/src/index.ts +1 -0
- package/src/latest.ts +5 -5
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Change Log - @yume-chan/scrcpy
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [40a60ca]
|
|
8
|
+
- @yume-chan/stream-extra@2.1.0
|
|
9
|
+
|
|
10
|
+
## 2.0.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [0bcb9b8]
|
|
15
|
+
- @yume-chan/struct@2.0.1
|
|
16
|
+
- @yume-chan/stream-extra@2.0.1
|
|
17
|
+
|
|
3
18
|
## 2.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<a href="https://www.npmjs.com/package/@yume-chan/scrcpy">
|
|
22
22
|
<img alt="npm" src="https://img.shields.io/npm/dm/%40yume-chan/scrcpy?logo=npm">
|
|
23
23
|
</a>
|
|
24
|
-
<a href="https://
|
|
24
|
+
<a href="https://tangoadb.dev/discord">
|
|
25
25
|
<img alt="Discord" src="https://img.shields.io/discord/1120215514732564502?logo=discord&logoColor=%23ffffff&label=Discord">
|
|
26
26
|
</a>
|
|
27
27
|
</p>
|
|
@@ -30,7 +30,7 @@ This package is part of [Tango ADB](https://github.com/yume-chan/ya-webadb). Gen
|
|
|
30
30
|
|
|
31
31
|
## Documentation
|
|
32
32
|
|
|
33
|
-
Check the latest documentation at https://
|
|
33
|
+
Check the latest documentation at https://tangoadb.dev/scrcpy/
|
|
34
34
|
|
|
35
35
|
## Sponsors
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/1_15/impl/defaults.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/1_15/impl/defaults.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;CAcc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VideoOrientation } from "./init.js";
|
|
2
|
-
export const Defaults =
|
|
2
|
+
export const Defaults = {
|
|
3
3
|
logLevel: "debug",
|
|
4
4
|
maxSize: 0,
|
|
5
5
|
bitRate: 8_000_000,
|
|
@@ -13,5 +13,5 @@ export const Defaults = /* #__PURE__ */ (() => ({
|
|
|
13
13
|
showTouches: false,
|
|
14
14
|
stayAwake: false,
|
|
15
15
|
codecOptions: undefined,
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/1_15/impl/defaults.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,CAAC,MAAM,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/1_15/impl/defaults.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,QAAQ,EAAE,OAAO;IACjB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,CAAC;IACT,oBAAoB,EAAE,gBAAgB,CAAC,QAAQ;IAC/C,aAAa,EAAE,KAAK;IACpB,IAAI,EAAE,SAAS;IACf,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,SAAS;CACQ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const Defaults: {
|
|
2
|
+
readonly displayImePolicy: undefined;
|
|
3
|
+
readonly vdDestroyContent: false;
|
|
4
|
+
readonly captureOrientation: undefined;
|
|
5
|
+
readonly angle: 0;
|
|
6
|
+
readonly screenOffTimeout: undefined;
|
|
7
|
+
readonly listApps: false;
|
|
8
|
+
readonly newDisplay: undefined;
|
|
9
|
+
readonly vdSystemDecorations: true;
|
|
10
|
+
readonly audioDup: false;
|
|
11
|
+
readonly videoSource: "display";
|
|
12
|
+
readonly displayId: 0;
|
|
13
|
+
readonly cameraId: undefined;
|
|
14
|
+
readonly cameraSize: undefined;
|
|
15
|
+
readonly cameraFacing: undefined;
|
|
16
|
+
readonly cameraAr: undefined;
|
|
17
|
+
readonly cameraFps: undefined;
|
|
18
|
+
readonly cameraHighSpeed: false;
|
|
19
|
+
readonly listCameras: false;
|
|
20
|
+
readonly listCameraSizes: false;
|
|
21
|
+
readonly video: true;
|
|
22
|
+
readonly audioSource: "output";
|
|
23
|
+
readonly scid: undefined;
|
|
24
|
+
readonly videoCodec: "h264";
|
|
25
|
+
readonly videoBitRate: 8000000;
|
|
26
|
+
readonly videoCodecOptions: undefined;
|
|
27
|
+
readonly videoEncoder: undefined;
|
|
28
|
+
readonly audio: true;
|
|
29
|
+
readonly audioCodec: "opus";
|
|
30
|
+
readonly audioBitRate: 128000;
|
|
31
|
+
readonly audioCodecOptions: undefined;
|
|
32
|
+
readonly audioEncoder: undefined;
|
|
33
|
+
readonly listEncoders: false;
|
|
34
|
+
readonly listDisplays: false;
|
|
35
|
+
readonly sendCodecMeta: true;
|
|
36
|
+
readonly powerOn: true;
|
|
37
|
+
readonly cleanup: true;
|
|
38
|
+
readonly downsizeOnError: true;
|
|
39
|
+
readonly sendDeviceMeta: true;
|
|
40
|
+
readonly sendDummyByte: true;
|
|
41
|
+
readonly clipboardAutosync: true;
|
|
42
|
+
readonly logLevel: "debug";
|
|
43
|
+
readonly lockVideoOrientation: -1;
|
|
44
|
+
readonly powerOffOnClose: false;
|
|
45
|
+
readonly encoderName: undefined;
|
|
46
|
+
readonly maxSize: 0;
|
|
47
|
+
readonly bitRate: 8000000;
|
|
48
|
+
readonly maxFps: 0;
|
|
49
|
+
readonly tunnelForward: false;
|
|
50
|
+
readonly crop: undefined;
|
|
51
|
+
readonly sendFrameMeta: true;
|
|
52
|
+
readonly control: true;
|
|
53
|
+
readonly showTouches: false;
|
|
54
|
+
readonly stayAwake: false;
|
|
55
|
+
readonly codecOptions: undefined;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/3_2/impl/defaults.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/3_2/impl/defaults.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE,CAC1C,CAAC;IACG,GAAG,QAAQ,CAAC,QAAQ;IACpB,gBAAgB,EAAE,SAAS;CAC9B,CAAyC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/3_2/impl/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/3_2/impl/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PrevImpl } from "./prev.js";
|
|
2
|
+
export interface Init<TVideo extends boolean> extends Omit<PrevImpl.Init<TVideo>, "audioSource"> {
|
|
3
|
+
audioSource?: PrevImpl.Init<TVideo>["audioSource"] | "mic-unprocessed" | "mic-camcorder" | "mic-voice-recognition" | "mic-voice-communication" | "voice-call" | "voice-call-uplink" | "voice-call-downlink" | "voice-performance";
|
|
4
|
+
displayImePolicy?: "local" | "fallback" | "hide" | undefined;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/3_2/impl/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,WAAW,IAAI,CAAC,MAAM,SAAS,OAAO,CACxC,SAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAClD,WAAW,CAAC,EACN,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,GACpC,iBAAiB,GACjB,eAAe,GACf,uBAAuB,GACvB,yBAAyB,GACzB,YAAY,GACZ,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,CAAC;IAE1B,gBAAgB,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;CAChE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/3_2/impl/init.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prev.d.ts","sourceRoot":"","sources":["../../../src/3_2/impl/prev.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prev.js","sourceRoot":"","sources":["../../../src/3_2/impl/prev.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/3_2/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/esm/3_2/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/3_2/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { MaybePromiseLike } from "@yume-chan/async";
|
|
2
|
+
import type { ReadableStream, TransformStream } from "@yume-chan/stream-extra";
|
|
3
|
+
import type { AsyncExactReadable, ExactReadable } from "@yume-chan/struct";
|
|
4
|
+
import type { ScrcpyAudioStreamMetadata, ScrcpyControlMessageType, ScrcpyDisplay, ScrcpyEncoder, ScrcpyMediaStreamPacket, ScrcpyOptions, ScrcpyOptionsListEncoders, ScrcpyScrollController, ScrcpyVideoStream } from "../base/index.js";
|
|
5
|
+
import type { ScrcpyBackOrScreenOnControlMessage, ScrcpyInjectTouchControlMessage, ScrcpySetClipboardControlMessage, ScrcpyUHidCreateControlMessage, ScrcpyUHidOutputDeviceMessage } from "../latest.js";
|
|
6
|
+
import type { Init } from "./impl/index.js";
|
|
7
|
+
export declare class ScrcpyOptions3_2<TVideo extends boolean> implements ScrcpyOptions<Init<TVideo>>, ScrcpyOptionsListEncoders {
|
|
8
|
+
#private;
|
|
9
|
+
static readonly Defaults: {
|
|
10
|
+
readonly displayImePolicy: undefined;
|
|
11
|
+
readonly vdDestroyContent: false;
|
|
12
|
+
readonly captureOrientation: undefined;
|
|
13
|
+
readonly angle: 0;
|
|
14
|
+
readonly screenOffTimeout: undefined;
|
|
15
|
+
readonly listApps: false;
|
|
16
|
+
readonly newDisplay: undefined;
|
|
17
|
+
readonly vdSystemDecorations: true;
|
|
18
|
+
readonly audioDup: false;
|
|
19
|
+
readonly videoSource: "display";
|
|
20
|
+
readonly displayId: 0;
|
|
21
|
+
readonly cameraId: undefined;
|
|
22
|
+
readonly cameraSize: undefined;
|
|
23
|
+
readonly cameraFacing: undefined;
|
|
24
|
+
readonly cameraAr: undefined;
|
|
25
|
+
readonly cameraFps: undefined;
|
|
26
|
+
readonly cameraHighSpeed: false;
|
|
27
|
+
readonly listCameras: false;
|
|
28
|
+
readonly listCameraSizes: false;
|
|
29
|
+
readonly video: true;
|
|
30
|
+
readonly audioSource: "output";
|
|
31
|
+
readonly scid: undefined;
|
|
32
|
+
readonly videoCodec: "h264";
|
|
33
|
+
readonly videoBitRate: 8000000;
|
|
34
|
+
readonly videoCodecOptions: undefined;
|
|
35
|
+
readonly videoEncoder: undefined;
|
|
36
|
+
readonly audio: true;
|
|
37
|
+
readonly audioCodec: "opus";
|
|
38
|
+
readonly audioBitRate: 128000;
|
|
39
|
+
readonly audioCodecOptions: undefined;
|
|
40
|
+
readonly audioEncoder: undefined;
|
|
41
|
+
readonly listEncoders: false;
|
|
42
|
+
readonly listDisplays: false;
|
|
43
|
+
readonly sendCodecMeta: true;
|
|
44
|
+
readonly powerOn: true;
|
|
45
|
+
readonly cleanup: true;
|
|
46
|
+
readonly downsizeOnError: true;
|
|
47
|
+
readonly sendDeviceMeta: true;
|
|
48
|
+
readonly sendDummyByte: true;
|
|
49
|
+
readonly clipboardAutosync: true;
|
|
50
|
+
readonly logLevel: "debug";
|
|
51
|
+
readonly lockVideoOrientation: -1;
|
|
52
|
+
readonly powerOffOnClose: false;
|
|
53
|
+
readonly encoderName: undefined;
|
|
54
|
+
readonly maxSize: 0;
|
|
55
|
+
readonly bitRate: 8000000;
|
|
56
|
+
readonly maxFps: 0;
|
|
57
|
+
readonly tunnelForward: false;
|
|
58
|
+
readonly crop: undefined;
|
|
59
|
+
readonly sendFrameMeta: true;
|
|
60
|
+
readonly control: true;
|
|
61
|
+
readonly showTouches: false;
|
|
62
|
+
readonly stayAwake: false;
|
|
63
|
+
readonly codecOptions: undefined;
|
|
64
|
+
};
|
|
65
|
+
readonly value: Required<Init<TVideo>>;
|
|
66
|
+
get controlMessageTypes(): readonly ScrcpyControlMessageType[];
|
|
67
|
+
get clipboard(): ReadableStream<string> | undefined;
|
|
68
|
+
get uHidOutput(): ReadableStream<ScrcpyUHidOutputDeviceMessage> | undefined;
|
|
69
|
+
constructor(init: Init<TVideo>);
|
|
70
|
+
serialize(): string[];
|
|
71
|
+
setListDisplays(): void;
|
|
72
|
+
parseDisplay(line: string): ScrcpyDisplay | undefined;
|
|
73
|
+
setListEncoders(): void;
|
|
74
|
+
parseEncoder(line: string): ScrcpyEncoder | undefined;
|
|
75
|
+
parseVideoStreamMetadata(stream: ReadableStream<Uint8Array>): MaybePromiseLike<ScrcpyVideoStream>;
|
|
76
|
+
parseAudioStreamMetadata(stream: ReadableStream<Uint8Array>): MaybePromiseLike<ScrcpyAudioStreamMetadata>;
|
|
77
|
+
parseDeviceMessage(id: number, stream: ExactReadable | AsyncExactReadable): Promise<void>;
|
|
78
|
+
endDeviceMessageStream(e?: unknown): void;
|
|
79
|
+
createMediaStreamTransformer(): TransformStream<Uint8Array, ScrcpyMediaStreamPacket>;
|
|
80
|
+
serializeInjectTouchControlMessage(message: ScrcpyInjectTouchControlMessage): Uint8Array;
|
|
81
|
+
serializeBackOrScreenOnControlMessage(message: ScrcpyBackOrScreenOnControlMessage): Uint8Array | undefined;
|
|
82
|
+
serializeSetClipboardControlMessage(message: ScrcpySetClipboardControlMessage): Uint8Array | [Uint8Array, Promise<void>];
|
|
83
|
+
createScrollController(): ScrcpyScrollController;
|
|
84
|
+
serializeUHidCreateControlMessage(message: ScrcpyUHidCreateControlMessage): Uint8Array;
|
|
85
|
+
}
|
|
86
|
+
type Init_<TVideo extends boolean> = Init<TVideo>;
|
|
87
|
+
export declare namespace ScrcpyOptions3_2 {
|
|
88
|
+
type Init<TVideo extends boolean = boolean> = Init_<TVideo>;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
91
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/3_2/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,KAAK,EACR,yBAAyB,EACzB,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,aAAa,EACb,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACR,kCAAkC,EAClC,+BAA+B,EAC/B,gCAAgC,EAChC,8BAA8B,EAC9B,6BAA6B,EAChC,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAqB5C,qBAAa,gBAAgB,CAAC,MAAM,SAAS,OAAO,CAChD,YAAW,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,yBAAyB;;IAEjE,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAY;IAEpC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CA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M,CAAC,CAAC;AAElD,yBAAiB,gBAAgB,CAAC;IAC9B,KAAY,IAAI,CAAC,MAAM,SAAS,OAAO,GAAG,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;CACtE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { AckClipboardHandler, ClipboardStream, ControlMessageTypes, createMediaStreamTransformer, createScrollController, Defaults, parseAudioStreamMetadata, parseDisplay, parseEncoder, parseVideoStreamMetadata, serialize, serializeBackOrScreenOnControlMessage, serializeInjectTouchControlMessage, serializeUHidCreateControlMessage, setListDisplays, setListEncoders, UHidOutputStream, } from "./impl/index.js";
|
|
2
|
+
export class ScrcpyOptions3_2 {
|
|
3
|
+
static Defaults = Defaults;
|
|
4
|
+
value;
|
|
5
|
+
get controlMessageTypes() {
|
|
6
|
+
return ControlMessageTypes;
|
|
7
|
+
}
|
|
8
|
+
#clipboard;
|
|
9
|
+
get clipboard() {
|
|
10
|
+
return this.#clipboard;
|
|
11
|
+
}
|
|
12
|
+
#ackClipboardHandler;
|
|
13
|
+
#uHidOutput;
|
|
14
|
+
get uHidOutput() {
|
|
15
|
+
return this.#uHidOutput;
|
|
16
|
+
}
|
|
17
|
+
constructor(init) {
|
|
18
|
+
this.value = { ...Defaults, ...init };
|
|
19
|
+
if (this.value.videoSource === "camera") {
|
|
20
|
+
this.value.control = false;
|
|
21
|
+
}
|
|
22
|
+
if (this.value.audioDup) {
|
|
23
|
+
this.value.audioSource = "playback";
|
|
24
|
+
}
|
|
25
|
+
if (this.value.control) {
|
|
26
|
+
if (this.value.clipboardAutosync) {
|
|
27
|
+
this.#clipboard = new ClipboardStream();
|
|
28
|
+
this.#ackClipboardHandler = new AckClipboardHandler();
|
|
29
|
+
}
|
|
30
|
+
this.#uHidOutput = new UHidOutputStream();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
serialize() {
|
|
34
|
+
return serialize(this.value, Defaults);
|
|
35
|
+
}
|
|
36
|
+
setListDisplays() {
|
|
37
|
+
setListDisplays(this.value);
|
|
38
|
+
}
|
|
39
|
+
parseDisplay(line) {
|
|
40
|
+
return parseDisplay(line);
|
|
41
|
+
}
|
|
42
|
+
setListEncoders() {
|
|
43
|
+
setListEncoders(this.value);
|
|
44
|
+
}
|
|
45
|
+
parseEncoder(line) {
|
|
46
|
+
return parseEncoder(line);
|
|
47
|
+
}
|
|
48
|
+
parseVideoStreamMetadata(stream) {
|
|
49
|
+
return parseVideoStreamMetadata(this.value, stream);
|
|
50
|
+
}
|
|
51
|
+
parseAudioStreamMetadata(stream) {
|
|
52
|
+
return parseAudioStreamMetadata(stream, this.value);
|
|
53
|
+
}
|
|
54
|
+
async parseDeviceMessage(id, stream) {
|
|
55
|
+
if (await this.#clipboard?.parse(id, stream)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (await this.#ackClipboardHandler?.parse(id, stream)) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
throw new Error("Unknown device message");
|
|
62
|
+
}
|
|
63
|
+
endDeviceMessageStream(e) {
|
|
64
|
+
if (e) {
|
|
65
|
+
this.#clipboard?.error(e);
|
|
66
|
+
this.#ackClipboardHandler?.error(e);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
this.#clipboard?.close();
|
|
70
|
+
this.#ackClipboardHandler?.close();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
createMediaStreamTransformer() {
|
|
74
|
+
return createMediaStreamTransformer(this.value);
|
|
75
|
+
}
|
|
76
|
+
serializeInjectTouchControlMessage(message) {
|
|
77
|
+
return serializeInjectTouchControlMessage(message);
|
|
78
|
+
}
|
|
79
|
+
serializeBackOrScreenOnControlMessage(message) {
|
|
80
|
+
return serializeBackOrScreenOnControlMessage(message);
|
|
81
|
+
}
|
|
82
|
+
serializeSetClipboardControlMessage(message) {
|
|
83
|
+
return this.#ackClipboardHandler.serializeSetClipboardControlMessage(message);
|
|
84
|
+
}
|
|
85
|
+
createScrollController() {
|
|
86
|
+
return createScrollController();
|
|
87
|
+
}
|
|
88
|
+
serializeUHidCreateControlMessage(message) {
|
|
89
|
+
return serializeUHidCreateControlMessage(message);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/3_2/options.ts"],"names":[],"mappings":"AAwBA,OAAO,EACH,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,QAAQ,EACR,wBAAwB,EACxB,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,SAAS,EACT,qCAAqC,EACrC,kCAAkC,EAClC,iCAAiC,EACjC,eAAe,EACf,eAAe,EACf,gBAAgB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,gBAAgB;IAGzB,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC;IAE3B,KAAK,CAAyB;IAEvC,IAAI,mBAAmB;QACnB,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED,UAAU,CAA8B;IACxC,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,oBAAoB,CAAkC;IAEtD,WAAW,CAA+B;IAC1C,IAAI,UAAU;QAGV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,YAAY,IAAkB;QAC1B,IAAI,CAAC,KAAK,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,EAAW,CAAC;QAE/C,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;YACtC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QAC/B,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,UAAU,CAAC;QACxC,CAA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BAAwB,CAAC,CAAC;IAC9C,CAAC;IAED,sBAAsB,CAAC,CAAW;QAC9B,IAAI,CAAC,EAAE,CAAC;YACJ,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,oBAAoB,EAAE,KAAK,EAAE,CAAC;QACvC,CAAC;IACL,CAAC;IAED,4BAA4B;QAIxB,OAAO,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,kCAAkC,CAC9B,OAAwC;QAExC,OAAO,kCAAkC,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,qCAAqC,CACjC,OAA2C;QAE3C,OAAO,qCAAqC,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,mCAAmC,CAC/B,OAAyC;QAEzC,OAAO,IAAI,CAAC,oBAAqB,CAAC,mCAAmC,CACjE,OAAO,CACV,CAAC;IACN,CAAC;IAED,sBAAsB;QAClB,OAAO,sBAAsB,EAAE,CAAC;IACpC,CAAC;IAED,iCAAiC,CAC7B,OAAuC;QAEvC,OAAO,iCAAiC,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC"}
|
package/esm/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from "./3_0/index.js";
|
|
|
25
25
|
export * from "./3_0_1.js";
|
|
26
26
|
export * from "./3_0_2.js";
|
|
27
27
|
export * from "./3_1/index.js";
|
|
28
|
+
export * from "./3_2/index.js";
|
|
28
29
|
export * from "./android/index.js";
|
|
29
30
|
export * from "./base/index.js";
|
|
30
31
|
export * from "./codec/index.js";
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],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AAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from "./3_0/index.js";
|
|
|
25
25
|
export * from "./3_0_1.js";
|
|
26
26
|
export * from "./3_0_2.js";
|
|
27
27
|
export * from "./3_1/index.js";
|
|
28
|
+
export * from "./3_2/index.js";
|
|
28
29
|
export * from "./android/index.js";
|
|
29
30
|
export * from "./base/index.js";
|
|
30
31
|
export * from "./codec/index.js";
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC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B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
package/esm/latest.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class ScrcpyOptionsLatest<TVideo extends boolean> extends
|
|
3
|
-
constructor(init:
|
|
1
|
+
import { ScrcpyOptions3_2 } from "./3_2/options.js";
|
|
2
|
+
export declare class ScrcpyOptionsLatest<TVideo extends boolean> extends ScrcpyOptions3_2<TVideo> {
|
|
3
|
+
constructor(init: ScrcpyOptions3_2.Init<TVideo>);
|
|
4
4
|
}
|
|
5
5
|
export declare namespace ScrcpyOptionsLatest {
|
|
6
|
-
type Init<TVideo extends boolean = boolean> =
|
|
6
|
+
type Init<TVideo extends boolean = boolean> = ScrcpyOptions3_2.Init<TVideo>;
|
|
7
7
|
}
|
|
8
|
-
export { BackOrScreenOnControlMessage as ScrcpyBackOrScreenOnControlMessage, CaptureOrientation as ScrcpyCaptureOrientation, CodecOptions as ScrcpyCodecOptions, Crop as ScrcpyCrop, InjectScrollControlMessage as ScrcpyInjectScrollControlMessage, InjectTouchControlMessage as ScrcpyInjectTouchControlMessage, InstanceId as ScrcpyInstanceId, LockOrientation as ScrcpyLockOrientation, NewDisplay as ScrcpyNewDisplay, Orientation as ScrcpyOrientation, PointerId as ScrcpyPointerId, SetClipboardControlMessage as ScrcpySetClipboardControlMessage, UHidCreateControlMessage as ScrcpyUHidCreateControlMessage, UHidOutputDeviceMessage as ScrcpyUHidOutputDeviceMessage, } from "./
|
|
8
|
+
export { BackOrScreenOnControlMessage as ScrcpyBackOrScreenOnControlMessage, CaptureOrientation as ScrcpyCaptureOrientation, CodecOptions as ScrcpyCodecOptions, Crop as ScrcpyCrop, InjectScrollControlMessage as ScrcpyInjectScrollControlMessage, InjectTouchControlMessage as ScrcpyInjectTouchControlMessage, InstanceId as ScrcpyInstanceId, LockOrientation as ScrcpyLockOrientation, NewDisplay as ScrcpyNewDisplay, Orientation as ScrcpyOrientation, PointerId as ScrcpyPointerId, SetClipboardControlMessage as ScrcpySetClipboardControlMessage, UHidCreateControlMessage as ScrcpyUHidCreateControlMessage, UHidOutputDeviceMessage as ScrcpyUHidOutputDeviceMessage, } from "./3_2/impl/index.js";
|
|
9
9
|
//# sourceMappingURL=latest.d.ts.map
|
package/esm/latest.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export class ScrcpyOptionsLatest extends
|
|
1
|
+
import { ScrcpyOptions3_2 } from "./3_2/options.js";
|
|
2
|
+
export class ScrcpyOptionsLatest extends ScrcpyOptions3_2 {
|
|
3
3
|
constructor(init) {
|
|
4
4
|
super(init);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export { BackOrScreenOnControlMessage as ScrcpyBackOrScreenOnControlMessage, CaptureOrientation as ScrcpyCaptureOrientation, CodecOptions as ScrcpyCodecOptions, Crop as ScrcpyCrop, InjectScrollControlMessage as ScrcpyInjectScrollControlMessage, InjectTouchControlMessage as ScrcpyInjectTouchControlMessage, InstanceId as ScrcpyInstanceId, LockOrientation as ScrcpyLockOrientation, NewDisplay as ScrcpyNewDisplay, Orientation as ScrcpyOrientation, PointerId as ScrcpyPointerId, SetClipboardControlMessage as ScrcpySetClipboardControlMessage, UHidCreateControlMessage as ScrcpyUHidCreateControlMessage, UHidOutputDeviceMessage as ScrcpyUHidOutputDeviceMessage, } from "./
|
|
7
|
+
export { BackOrScreenOnControlMessage as ScrcpyBackOrScreenOnControlMessage, CaptureOrientation as ScrcpyCaptureOrientation, CodecOptions as ScrcpyCodecOptions, Crop as ScrcpyCrop, InjectScrollControlMessage as ScrcpyInjectScrollControlMessage, InjectTouchControlMessage as ScrcpyInjectTouchControlMessage, InstanceId as ScrcpyInstanceId, LockOrientation as ScrcpyLockOrientation, NewDisplay as ScrcpyNewDisplay, Orientation as ScrcpyOrientation, PointerId as ScrcpyPointerId, SetClipboardControlMessage as ScrcpySetClipboardControlMessage, UHidCreateControlMessage as ScrcpyUHidCreateControlMessage, UHidOutputDeviceMessage as ScrcpyUHidOutputDeviceMessage, } from "./3_2/impl/index.js";
|
|
8
8
|
//# sourceMappingURL=latest.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/scrcpy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "TypeScript implementation of Scrcpy client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adb",
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"types": "esm/index.d.ts",
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@yume-chan/async": "^4.
|
|
31
|
-
"@yume-chan/
|
|
32
|
-
"@yume-chan/
|
|
33
|
-
"@yume-chan/
|
|
30
|
+
"@yume-chan/async": "^4.1.3",
|
|
31
|
+
"@yume-chan/no-data-view": "^2.0.0",
|
|
32
|
+
"@yume-chan/stream-extra": "^2.1.0",
|
|
33
|
+
"@yume-chan/struct": "^2.0.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/node": "^
|
|
36
|
+
"@types/node": "^24.0.1",
|
|
37
37
|
"prettier": "^3.5.3",
|
|
38
|
-
"typescript": "^5.8.
|
|
39
|
-
"@yume-chan/test-runner": "^1.0.0",
|
|
38
|
+
"typescript": "^5.8.3",
|
|
40
39
|
"@yume-chan/eslint-config": "^1.0.0",
|
|
40
|
+
"@yume-chan/test-runner": "^1.0.0",
|
|
41
41
|
"@yume-chan/tsconfig": "^1.0.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import type { Init } from "./init.js";
|
|
2
2
|
import { VideoOrientation } from "./init.js";
|
|
3
3
|
|
|
4
|
-
export const Defaults =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}) as const satisfies Required<Init>)();
|
|
4
|
+
export const Defaults = {
|
|
5
|
+
logLevel: "debug",
|
|
6
|
+
maxSize: 0,
|
|
7
|
+
bitRate: 8_000_000,
|
|
8
|
+
maxFps: 0,
|
|
9
|
+
lockVideoOrientation: VideoOrientation.Unlocked,
|
|
10
|
+
tunnelForward: false,
|
|
11
|
+
crop: undefined,
|
|
12
|
+
sendFrameMeta: true,
|
|
13
|
+
control: true,
|
|
14
|
+
displayId: 0,
|
|
15
|
+
showTouches: false,
|
|
16
|
+
stayAwake: false,
|
|
17
|
+
codecOptions: undefined,
|
|
18
|
+
} as const satisfies Required<Init>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PrevImpl } from "./prev.js";
|
|
2
|
+
|
|
3
|
+
export interface Init<TVideo extends boolean>
|
|
4
|
+
extends Omit<PrevImpl.Init<TVideo>, "audioSource"> {
|
|
5
|
+
audioSource?:
|
|
6
|
+
| PrevImpl.Init<TVideo>["audioSource"]
|
|
7
|
+
| "mic-unprocessed"
|
|
8
|
+
| "mic-camcorder"
|
|
9
|
+
| "mic-voice-recognition"
|
|
10
|
+
| "mic-voice-communication"
|
|
11
|
+
| "voice-call"
|
|
12
|
+
| "voice-call-uplink"
|
|
13
|
+
| "voice-call-downlink"
|
|
14
|
+
| "voice-performance";
|
|
15
|
+
|
|
16
|
+
displayImePolicy?: "local" | "fallback" | "hide" | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as PrevImpl from "../../3_1/impl/index.js";
|
package/src/3_2/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./options.js";
|