linkshell-cli 0.8.2 → 0.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"screen-viewer.js","sourceRoot":"","sources":["../../../../host/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;AAE7F,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAC5B,uJAAuJ,IAAI,QAAQ,CAAC;AAEtK,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,IAAI,CAAC,qHAAqH,CAAC;IACjI,QAAQ,EAAE,IAAI,CAAC,6DAA6D,CAAC;IAC7E,KAAK,EAAE,IAAI,CAAC,oGAAoG,CAAC;IACjH,QAAQ,EAAE,IAAI,CAAC,iJAAiJ,CAAC;IACjK,GAAG,EAAE,IAAI,CAAC,0EAA0E,CAAC;IACrF,MAAM,EAAE,IAAI,CAAC,qHAAqH,CAAC;IACnI,MAAM,EAAE,IAAI,CAAC,oDAAoD,CAAC;IAClE,MAAM,EAAE,IAAI,CAAC,oDAAoD,CAAC;IAClE,IAAI,EAAE,IAAI,CAAC,4BAA4B,CAAC;CACzC,CAAC;AAEF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCvB,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8lDtB,CAAC;AAEF,MAAM,MAAM,GAAG,WAAW,YAAY,GAAG,IAAI,OAAO,CAAC;AAErD,MAAM,UAAU,UAAU;IACxB,OAAO;;;;SAIA,KAAK;;;;;;;;;;;;;kEAaoD,KAAK,CAAC,QAAQ;iEACf,KAAK,CAAC,KAAK;+DACb,KAAK,CAAC,GAAG;gEACR,KAAK,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAkD/B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;UACxD,MAAM;eACD,CAAC;AAChB,CAAC"}
@@ -11,8 +11,8 @@ export interface ScreenAccess {
11
11
  app?: string;
12
12
  problem?: string;
13
13
  }
14
- /** The capture for one rung of the ladder (see `screen-pacer.ts`): 0 is the best picture. */
15
- export declare function captureArgs(display: number, level?: number): string[];
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[];
16
16
  /** Splits an Annex-B stream at access-unit delimiters (NAL type 9) into whole frames. */
17
17
  export declare class AccessUnitSplitter {
18
18
  private buffer;
@@ -22,10 +22,7 @@ export declare class AccessUnitSplitter {
22
22
  /** Holds an IDR slice (NAL type 5). */
23
23
  static isKey(unit: Buffer): boolean;
24
24
  }
25
- /**
26
- * Ends a capture. ffmpeg holding a screen through avfoundation can sit through
27
- * SIGTERM — and through its output going away — so it is asked, then made to.
28
- */
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. */
29
26
  export declare function endCapture(capture: ChildProcess, now?: boolean): void;
30
27
  /**
31
28
  * Captures a host left behind when it was killed (nothing reads them, and they
@@ -35,6 +32,8 @@ export declare function reapOrphanCaptures(log: (message: string) => void): Prom
35
32
  /** The loopback viewer server; started on first use, one capture per watching device. */
36
33
  export declare class ScreenShare {
37
34
  private readonly log;
35
+ /** The servers both ends ask for their public address, to reach each other directly. */
36
+ private readonly iceServers;
38
37
  private server?;
39
38
  private token;
40
39
  private displays;
@@ -46,25 +45,35 @@ export declare class ScreenShare {
46
45
  */
47
46
  private holder?;
48
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?;
49
50
  private readonly controls;
50
- 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[]);
51
54
  start(): Promise<{
52
55
  port: number;
53
56
  token: string;
54
57
  displays: Display[];
55
58
  }>;
59
+ private listDisplays;
56
60
  private listen;
57
61
  private authorized;
58
62
  /**
59
- * Whether the screen can be watched and controlled, as whatever will do it
60
- * sees it: the app where the package has one, this process otherwise. With
61
- * `ask`, the system asks for the first permission missing.
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.)
62
66
  */
63
67
  access(ask: boolean): Promise<ScreenAccess>;
64
68
  /** Starts a capture where it may record. Undefined when it may not: the viewer has been told why. */
65
69
  private capture;
66
70
  /** Takes the screen for a new capture: whatever holds it is ended, and has left, before the new one starts. */
67
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;
68
77
  private stream;
69
78
  stop(): void;
70
79
  }