@linkshell/host 0.3.1 → 0.4.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/dist/host/src/input.d.ts +112 -27
- package/dist/host/src/input.js +214 -144
- package/dist/host/src/input.js.map +1 -1
- package/dist/host/src/rpc/server.js +1 -1
- package/dist/host/src/rpc/server.js.map +1 -1
- package/dist/host/src/screen-pacer.d.ts +76 -0
- package/dist/host/src/screen-pacer.js +165 -0
- package/dist/host/src/screen-pacer.js.map +1 -0
- package/dist/host/src/screen-viewer.d.ts +5 -0
- package/dist/host/src/screen-viewer.js +1263 -57
- package/dist/host/src/screen-viewer.js.map +1 -1
- package/dist/host/src/screen.d.ts +29 -32
- package/dist/host/src/screen.js +418 -138
- package/dist/host/src/screen.js.map +1 -1
- package/dist/host/src/terminals.d.ts +3 -3
- package/dist/host/src/terminals.js +1 -0
- package/dist/host/src/terminals.js.map +1 -1
- package/dist/host/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/helper/LinkShell.app/Contents/Info.plist +0 -19
- package/helper/LinkShell.app/Contents/MacOS/LinkShell +0 -0
- package/helper/LinkShell.app/Contents/Resources/AppIcon.icns +0 -0
- package/helper/LinkShell.app/Contents/_CodeSignature/CodeResources +0 -128
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen-viewer.js","sourceRoot":"","sources":["../../../src/screen-viewer.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,2EAA2E;AAC3E,6EAA6E;AAC7E,mEAAmE;AACnE,EAAE;AACF,4DAA4D;AAC5D,yEAAyE;AACzE,2CAA2C;AAC3C,6EAA6E;AAC7E,+EAA+E;AAC/E,2CAA2C;AAC3C,6FAA6F;
|
|
1
|
+
{"version":3,"file":"screen-viewer.js","sourceRoot":"","sources":["../../../src/screen-viewer.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,2EAA2E;AAC3E,6EAA6E;AAC7E,mEAAmE;AACnE,E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,CAAC"}
|
|
@@ -3,25 +3,6 @@ export interface Display {
|
|
|
3
3
|
index: number;
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* How the picture is sent. `full` when it goes straight to the device; `low`
|
|
8
|
-
* when it is relayed by a gateway, which should carry messages rather than video.
|
|
9
|
-
*/
|
|
10
|
-
declare const PROFILES: {
|
|
11
|
-
readonly full: {
|
|
12
|
-
readonly fps: 20;
|
|
13
|
-
readonly width: 1600;
|
|
14
|
-
readonly bitrate: "3M";
|
|
15
|
-
readonly ceiling: "4M";
|
|
16
|
-
};
|
|
17
|
-
readonly low: {
|
|
18
|
-
readonly fps: 12;
|
|
19
|
-
readonly width: 1280;
|
|
20
|
-
readonly bitrate: "900k";
|
|
21
|
-
readonly ceiling: "1300k";
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export type ScreenProfile = keyof typeof PROFILES;
|
|
25
6
|
export interface ScreenAccess {
|
|
26
7
|
supported: boolean;
|
|
27
8
|
ffmpeg: boolean;
|
|
@@ -30,7 +11,8 @@ export interface ScreenAccess {
|
|
|
30
11
|
app?: string;
|
|
31
12
|
problem?: string;
|
|
32
13
|
}
|
|
33
|
-
|
|
14
|
+
/** ffmpeg's capture of an X display (Linux), for one rung of the ladder (see `screen-pacer.ts`): 0 is the best picture. */
|
|
15
|
+
export declare function captureArgs(level?: number): string[];
|
|
34
16
|
/** Splits an Annex-B stream at access-unit delimiters (NAL type 9) into whole frames. */
|
|
35
17
|
export declare class AccessUnitSplitter {
|
|
36
18
|
private buffer;
|
|
@@ -40,10 +22,7 @@ export declare class AccessUnitSplitter {
|
|
|
40
22
|
/** Holds an IDR slice (NAL type 5). */
|
|
41
23
|
static isKey(unit: Buffer): boolean;
|
|
42
24
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Ends a capture. ffmpeg holding a screen through avfoundation can sit through
|
|
45
|
-
* SIGTERM — and through its output going away — so it is asked, then made to.
|
|
46
|
-
*/
|
|
25
|
+
/** Ends a capture. ffmpeg holding a screen can sit through SIGTERM — and through its output going away — so it is asked, then made to. */
|
|
47
26
|
export declare function endCapture(capture: ChildProcess, now?: boolean): void;
|
|
48
27
|
/**
|
|
49
28
|
* Captures a host left behind when it was killed (nothing reads them, and they
|
|
@@ -53,30 +32,48 @@ export declare function reapOrphanCaptures(log: (message: string) => void): Prom
|
|
|
53
32
|
/** The loopback viewer server; started on first use, one capture per watching device. */
|
|
54
33
|
export declare class ScreenShare {
|
|
55
34
|
private readonly log;
|
|
35
|
+
/** The servers both ends ask for their public address, to reach each other directly. */
|
|
36
|
+
private readonly iceServers;
|
|
56
37
|
private server?;
|
|
57
38
|
private token;
|
|
58
39
|
private displays;
|
|
59
40
|
private readonly captures;
|
|
60
|
-
/**
|
|
61
|
-
|
|
41
|
+
/**
|
|
42
|
+
* The capture that has the screen. The system gives it to one at a time, and
|
|
43
|
+
* one started while another still holds it never gets a frame, even after
|
|
44
|
+
* the other has gone: the next starts once this one has.
|
|
45
|
+
*/
|
|
46
|
+
private holder?;
|
|
47
|
+
private turn;
|
|
48
|
+
/** The viewer the app is sending the screen to as a video track. One at a time, like captures. */
|
|
49
|
+
private video?;
|
|
62
50
|
private readonly controls;
|
|
63
|
-
constructor(log: (message: string) => void
|
|
51
|
+
constructor(log: (message: string) => void,
|
|
52
|
+
/** The servers both ends ask for their public address, to reach each other directly. */
|
|
53
|
+
iceServers?: () => string[]);
|
|
64
54
|
start(): Promise<{
|
|
65
55
|
port: number;
|
|
66
56
|
token: string;
|
|
67
57
|
displays: Display[];
|
|
68
58
|
}>;
|
|
59
|
+
private listDisplays;
|
|
69
60
|
private listen;
|
|
70
61
|
private authorized;
|
|
71
62
|
/**
|
|
72
|
-
* Whether the screen can be watched and controlled
|
|
73
|
-
*
|
|
74
|
-
* `
|
|
63
|
+
* Whether the screen can be watched and controlled. On a Mac that is the
|
|
64
|
+
* app's to say; with `ask`, the app opens its window for what is missing.
|
|
65
|
+
* (`ffmpeg`: whether what captures is there — ffmpeg itself on Linux.)
|
|
75
66
|
*/
|
|
76
67
|
access(ask: boolean): Promise<ScreenAccess>;
|
|
77
|
-
/** Starts a capture where it may record
|
|
68
|
+
/** Starts a capture where it may record. Undefined when it may not: the viewer has been told why. */
|
|
78
69
|
private capture;
|
|
70
|
+
/** Takes the screen for a new capture: whatever holds it is ended, and has left, before the new one starts. */
|
|
71
|
+
private take;
|
|
72
|
+
/**
|
|
73
|
+
* Has the app offer the screen to this viewer as a video track. False when it can't (no app, an
|
|
74
|
+
* app without the media engine): the picture then goes down the socket.
|
|
75
|
+
*/
|
|
76
|
+
private offerVideo;
|
|
79
77
|
private stream;
|
|
80
78
|
stop(): void;
|
|
81
79
|
}
|
|
82
|
-
export {};
|