@appium/coresim 1.7.0 → 1.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +5 -3
  3. package/binding.gyp +3 -1
  4. package/lib/src/commands/jpeg-stream.d.ts +44 -0
  5. package/lib/src/commands/jpeg-stream.d.ts.map +1 -0
  6. package/lib/src/commands/jpeg-stream.js +198 -0
  7. package/lib/src/commands/jpeg-stream.js.map +1 -0
  8. package/lib/src/commands/ui.d.ts +21 -0
  9. package/lib/src/commands/ui.d.ts.map +1 -1
  10. package/lib/src/commands/ui.js +22 -0
  11. package/lib/src/commands/ui.js.map +1 -1
  12. package/lib/src/index.d.ts +2 -1
  13. package/lib/src/index.d.ts.map +1 -1
  14. package/lib/src/index.js +2 -1
  15. package/lib/src/index.js.map +1 -1
  16. package/lib/src/native-simctl.d.ts +2 -0
  17. package/lib/src/native-simctl.d.ts.map +1 -1
  18. package/lib/src/native-simctl.js +6 -1
  19. package/lib/src/native-simctl.js.map +1 -1
  20. package/lib/src/types.d.ts +64 -2
  21. package/lib/src/types.d.ts.map +1 -1
  22. package/lib/src/types.js +8 -0
  23. package/lib/src/types.js.map +1 -1
  24. package/package.json +1 -1
  25. package/prebuilds/darwin-arm64/@appium+coresim.node +0 -0
  26. package/src/commands/jpeg-stream.ts +233 -0
  27. package/src/commands/ui.ts +27 -0
  28. package/src/coresim.mm +199 -6
  29. package/src/index.ts +4 -0
  30. package/src/native/audio_encoder.mm +1 -1
  31. package/src/native/av_recording.h +1 -1
  32. package/src/native/av_recording.mm +76 -27
  33. package/src/native/sim_audio_tap.mm +3 -3
  34. package/src/native/sim_device.h +11 -0
  35. package/src/native/sim_device.mm +53 -0
  36. package/src/native/sim_jpeg_stream.h +69 -0
  37. package/src/native/sim_jpeg_stream.mm +322 -0
  38. package/src/native/sim_orientation.h +16 -0
  39. package/src/native/sim_orientation.mm +58 -0
  40. package/src/native/sim_pasteboard.mm +3 -3
  41. package/src/native/sim_process.mm +1 -1
  42. package/src/native/sim_screenshot.h +13 -0
  43. package/src/native/sim_screenshot.mm +50 -25
  44. package/src/native/sim_video_recording.mm +2 -43
  45. package/src/native/tcc_privacy.mm +1 -1
  46. package/src/native/video_encoder.h +9 -2
  47. package/src/native/video_encoder.mm +241 -21
  48. package/src/native-simctl.ts +7 -0
  49. package/src/types.ts +69 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [1.9.0](https://github.com/appium/coresim/compare/v1.8.0...v1.9.0) (2026-09-27)
2
+
3
+ ### Features
4
+
5
+ * add setOrientation and fix video/streaming session resize on device rotation ([#21](https://github.com/appium/coresim/issues/21)) ([3a73986](https://github.com/appium/coresim/commit/3a739869a7669076e764d05bb240f7a0e68cd9df))
6
+
7
+ ## [1.8.0](https://github.com/appium/coresim/compare/v1.7.0...v1.8.0) (2026-09-25)
8
+
9
+ ### Features
10
+
11
+ * add real-time JPEG frame streaming (startJpegStream) ([#20](https://github.com/appium/coresim/issues/20)) ([7a73c0a](https://github.com/appium/coresim/commit/7a73c0a46a5ce72afeb435fb9209e75d7a21df79))
12
+
1
13
  ## [1.7.0](https://github.com/appium/coresim/compare/v1.6.0...v1.7.0) (2026-09-23)
2
14
 
3
15
  ### Features
package/README.md CHANGED
@@ -54,9 +54,11 @@ await sim.deleteDevice(device.udid);
54
54
  readiness with `getBootStatus()`/`waitForBoot()`.
55
55
  - **Apps** — install, remove, launch, terminate, and inspect apps.
56
56
  - **Processes** — spawn a process on the simulator and stream its stdout/stderr live.
57
- - **Screen capture** — screenshots, video recording to a file, and a real-time encoded video
58
- stream — optionally with the device's own audio, muxed into the recording or interleaved into
59
- the stream (`audio: true` on `startVideoRecording`/`startVideoStream`). Audio capture requires:
57
+ - **Screen capture** — screenshots, video recording to a file, a real-time encoded video stream,
58
+ and a real-time JPEG frame stream (`startJpegStream` — configurable fps/quality, no video codec
59
+ involved, meant for callers building their own MJPEG stream out of the frame sequence) —
60
+ optionally with the device's own audio, muxed into the recording or interleaved into the video
61
+ stream (`audio: true` on `startVideoRecording`/`startVideoStream`). Audio capture requires:
60
62
  - **macOS 14.2+** on the host (Core Audio process taps).
61
63
  - The host's **"System Audio Recording Only"** privacy permission (System Settings > Privacy &
62
64
  Security > Screen & System Audio Recording). This can't be granted programmatically, and a
package/binding.gyp CHANGED
@@ -10,6 +10,7 @@
10
10
  "src/native/sim_service_context.mm",
11
11
  "src/native/sim_device_set.mm",
12
12
  "src/native/sim_device.mm",
13
+ "src/native/sim_orientation.mm",
13
14
  "src/native/tcc_privacy.mm",
14
15
  "src/native/sim_pasteboard.mm",
15
16
  "src/native/sim_process.mm",
@@ -20,7 +21,8 @@
20
21
  "src/native/sim_screenshot.mm",
21
22
  "src/native/sim_video_recording.mm",
22
23
  "src/native/video_encoder.mm",
23
- "src/native/sim_video_stream.mm"
24
+ "src/native/sim_video_stream.mm",
25
+ "src/native/sim_jpeg_stream.mm"
24
26
  ],
25
27
  "include_dirs": [
26
28
  "<!@(node -p \"require('node-addon-api').include\")"
@@ -0,0 +1,44 @@
1
+ import { EventEmitter } from 'node:events';
2
+ import type { NativeSimctl } from '../native-simctl.js';
3
+ import type { JpegFrame, JpegStreamOptions } from '../types.js';
4
+ declare module '../native-simctl.js' {
5
+ interface NativeSimctl {
6
+ startJpegStream(udid: string, options?: JpegStreamOptions): Promise<JpegStream>;
7
+ }
8
+ }
9
+ /**
10
+ * A live JPEG frame stream from `NativeSimctl.startJpegStream` — polls the device's display and
11
+ * delivers each changed frame as a standalone JPEG image, at a configurable fps/quality. Unlike
12
+ * `startVideoStream`, this produces no video codec bitstream — it's meant for callers that want to
13
+ * build their own MJPEG (`multipart/x-mixed-replace`) HTTP stream, or otherwise just want a plain
14
+ * sequence of images, out of `frames()` themselves.
15
+ */
16
+ export declare class JpegStream extends EventEmitter {
17
+ private handle;
18
+ private readonly stopController;
19
+ private stopPromise;
20
+ private readonly queue;
21
+ private activeConsumers;
22
+ /**
23
+ * Yields each JPEG frame as it's produced, until {@link stop} is called or the stream errors (in
24
+ * which case the error is thrown out of the loop). Pass `signal` to stop iterating without
25
+ * treating that as an error.
26
+ *
27
+ * Only one active consumer is supported at a time — a second concurrent call rejects rather than
28
+ * silently sharing (and corrupting) the first one's single internal waiter slot.
29
+ */
30
+ frames(signal?: AbortSignal): AsyncGenerator<JpegFrame>;
31
+ /** Stops the stream and releases the underlying encoder. Idempotent, including concurrently. */
32
+ stop(): Promise<void>;
33
+ }
34
+ /**
35
+ * Starts polling the device's display and JPEG-encoding each changed frame in real time. Resolves
36
+ * once the encoder has actually started; the returned {@link JpegStream}'s `frames()` then yields
37
+ * each frame as it arrives. Independent of `startVideoStream`/`startVideoRecording` — any number of
38
+ * concurrent streams/recordings can run on the same device at once.
39
+ *
40
+ * @param udid — UDID of the device to stream; must be booted
41
+ * @param options — `displayId`, `fps`, `quality`, `scale` — see {@link JpegStreamOptions}
42
+ */
43
+ export declare function startJpegStream(this: NativeSimctl, udid: string, options?: JpegStreamOptions): Promise<JpegStream>;
44
+ //# sourceMappingURL=jpeg-stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jpeg-stream.d.ts","sourceRoot":"","sources":["../../../src/commands/jpeg-stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAIzC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAC,SAAS,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAGtF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,YAAY;QACpB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;KACjF;CACF;AAuGD;;;;;;GAMG;AACH,qBAAa,UAAW,SAAQ,YAAY;IAC1C,OAAO,CAAC,MAAM,CAAqC;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyB;IACxD,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAC9C,OAAO,CAAC,eAAe,CAAK;IA4B5B;;;;;;;OAOG;IACI,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC;IAmB9D,gGAAgG;IAC1F,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,UAAU,CAAC,CA0BrB"}
@@ -0,0 +1,198 @@
1
+ import { EventEmitter } from 'node:events';
2
+ import { logger } from '@appium/support';
3
+ import { runCatchingAsync, toTypedError } from '../utils/index.js';
4
+ const log = logger.getLogger('CoreSim');
5
+ // Matches the native side's own ThreadSafeFunction queue bound (see coresim.mm's kFrameQueueSize).
6
+ const MAX_BUFFERED_FRAMES = 60;
7
+ const SINGLE_CONSUMER_ERROR = 'JpegStream.frames() supports only one active consumer at a time — a second concurrent call rejects.';
8
+ /**
9
+ * Single-consumer FIFO between native's per-frame callback and `frames()`. Simpler than
10
+ * `AccessUnitQueue` (video-stream.ts): every JPEG frame is independently decodable, so there's no
11
+ * reference chain to protect — overflow just drops the oldest buffered frame(s), keeping delivery
12
+ * as close to real time as possible instead of falling further behind.
13
+ */
14
+ class JpegFrameQueue {
15
+ buffer = [];
16
+ waiter;
17
+ ended = false;
18
+ error;
19
+ push(frame) {
20
+ if (this.ended) {
21
+ return;
22
+ }
23
+ if (this.waiter) {
24
+ const { resolve } = this.waiter;
25
+ this.waiter = undefined;
26
+ resolve({ value: frame, done: false });
27
+ return;
28
+ }
29
+ this.buffer.push(frame);
30
+ if (this.buffer.length > MAX_BUFFERED_FRAMES) {
31
+ this.buffer.shift();
32
+ }
33
+ }
34
+ /** Ends the queue with an error — any pending or future `next()` rejects with it. */
35
+ fail(err) {
36
+ if (this.ended) {
37
+ return;
38
+ }
39
+ this.ended = true;
40
+ this.error = err;
41
+ this.buffer.length = 0;
42
+ if (this.waiter) {
43
+ const { reject } = this.waiter;
44
+ this.waiter = undefined;
45
+ reject(err);
46
+ }
47
+ }
48
+ /** Ends the queue cleanly — any pending or future `next()` resolves `done`. */
49
+ end() {
50
+ if (this.ended) {
51
+ return;
52
+ }
53
+ this.ended = true;
54
+ this.buffer.length = 0;
55
+ if (this.waiter) {
56
+ const { resolve } = this.waiter;
57
+ this.waiter = undefined;
58
+ resolve({ value: undefined, done: true });
59
+ }
60
+ }
61
+ /**
62
+ * Resolves `done` (not rejects) if `signal` aborts while waiting, mirroring `events.on()`.
63
+ * Checks cancellation/end *before* dequeuing, so an already-aborted signal or an already-ended
64
+ * queue never hands out a stale buffered frame.
65
+ */
66
+ next(signal) {
67
+ if (signal.aborted) {
68
+ return Promise.resolve({ value: undefined, done: true });
69
+ }
70
+ if (this.ended) {
71
+ return this.error ? Promise.reject(this.error) : Promise.resolve({ value: undefined, done: true });
72
+ }
73
+ const buffered = this.buffer.shift();
74
+ if (buffered !== undefined) {
75
+ return Promise.resolve({ value: buffered, done: false });
76
+ }
77
+ return new Promise((resolve, reject) => {
78
+ const onAbort = () => {
79
+ this.waiter = undefined;
80
+ resolve({ value: undefined, done: true });
81
+ };
82
+ signal.addEventListener('abort', onAbort, { once: true });
83
+ this.waiter = {
84
+ resolve: (result) => {
85
+ signal.removeEventListener('abort', onAbort);
86
+ resolve(result);
87
+ },
88
+ reject: (err) => {
89
+ signal.removeEventListener('abort', onAbort);
90
+ reject(err);
91
+ },
92
+ };
93
+ });
94
+ }
95
+ }
96
+ /**
97
+ * A live JPEG frame stream from `NativeSimctl.startJpegStream` — polls the device's display and
98
+ * delivers each changed frame as a standalone JPEG image, at a configurable fps/quality. Unlike
99
+ * `startVideoStream`, this produces no video codec bitstream — it's meant for callers that want to
100
+ * build their own MJPEG (`multipart/x-mixed-replace`) HTTP stream, or otherwise just want a plain
101
+ * sequence of images, out of `frames()` themselves.
102
+ */
103
+ export class JpegStream extends EventEmitter {
104
+ handle;
105
+ stopController = new AbortController();
106
+ stopPromise;
107
+ queue = new JpegFrameQueue();
108
+ activeConsumers = 0;
109
+ /** @internal */
110
+ _handleFrame(frame) {
111
+ this.queue.push(frame);
112
+ }
113
+ /**
114
+ * @internal
115
+ * An active `frames()` consumer receives the error via the queue itself (thrown out of its
116
+ * `for await` loop, per that method's contract) rather than the `'error'` event, so `emit` is
117
+ * only used for an explicit external listener; with neither, it's logged instead of lost.
118
+ */
119
+ _handleError(err) {
120
+ const error = toTypedError(err);
121
+ this.queue.fail(error);
122
+ if (this.listenerCount('error') > 0) {
123
+ this.emit('error', error);
124
+ }
125
+ else if (this.activeConsumers === 0) {
126
+ log.error(`Unhandled JpegStream error: ${error.stack ?? error}`);
127
+ }
128
+ }
129
+ /** @internal */
130
+ _attachHandle(handle) {
131
+ this.handle = handle;
132
+ }
133
+ /**
134
+ * Yields each JPEG frame as it's produced, until {@link stop} is called or the stream errors (in
135
+ * which case the error is thrown out of the loop). Pass `signal` to stop iterating without
136
+ * treating that as an error.
137
+ *
138
+ * Only one active consumer is supported at a time — a second concurrent call rejects rather than
139
+ * silently sharing (and corrupting) the first one's single internal waiter slot.
140
+ */
141
+ async *frames(signal) {
142
+ if (this.activeConsumers > 0) {
143
+ throw new Error(SINGLE_CONSUMER_ERROR);
144
+ }
145
+ const combined = signal ? AbortSignal.any([signal, this.stopController.signal]) : this.stopController.signal;
146
+ this.activeConsumers++;
147
+ try {
148
+ for (;;) {
149
+ const result = await this.queue.next(combined);
150
+ if (result.done) {
151
+ return;
152
+ }
153
+ yield result.value;
154
+ }
155
+ }
156
+ finally {
157
+ this.activeConsumers--;
158
+ }
159
+ }
160
+ /** Stops the stream and releases the underlying encoder. Idempotent, including concurrently. */
161
+ async stop() {
162
+ this.stopPromise ??= (async () => {
163
+ this.stopController.abort();
164
+ this.queue.end();
165
+ await this.handle?.stop();
166
+ })();
167
+ return this.stopPromise;
168
+ }
169
+ }
170
+ /**
171
+ * Starts polling the device's display and JPEG-encoding each changed frame in real time. Resolves
172
+ * once the encoder has actually started; the returned {@link JpegStream}'s `frames()` then yields
173
+ * each frame as it arrives. Independent of `startVideoStream`/`startVideoRecording` — any number of
174
+ * concurrent streams/recordings can run on the same device at once.
175
+ *
176
+ * @param udid — UDID of the device to stream; must be booted
177
+ * @param options — `displayId`, `fps`, `quality`, `scale` — see {@link JpegStreamOptions}
178
+ */
179
+ export async function startJpegStream(udid, options = {}) {
180
+ // The native poller clamps below 1 fps to 1 fps rather than actually polling that slowly, so a
181
+ // sub-1 value here would silently poll far more often than requested — rejected instead.
182
+ if (options.fps !== undefined && (!Number.isFinite(options.fps) || options.fps < 1)) {
183
+ throw new RangeError(`fps must be a finite number >= 1, got ${options.fps}`);
184
+ }
185
+ if (options.quality !== undefined &&
186
+ (!Number.isFinite(options.quality) || options.quality < 0 || options.quality > 100)) {
187
+ throw new RangeError(`quality must be a number between 0 and 100, got ${options.quality}`);
188
+ }
189
+ if (options.scale !== undefined && (!Number.isFinite(options.scale) || options.scale <= 0 || options.scale > 100)) {
190
+ throw new RangeError(`scale must be a number greater than 0 and no greater than 100, got ${options.scale}`);
191
+ }
192
+ const device = await runCatchingAsync(() => this._findDevice(udid));
193
+ const stream = new JpegStream();
194
+ const handle = await runCatchingAsync(() => device.startJpegStream(options, (frame) => stream._handleFrame(frame), (err) => stream._handleError(err)));
195
+ stream._attachHandle(handle);
196
+ return stream;
197
+ }
198
+ //# sourceMappingURL=jpeg-stream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jpeg-stream.js","sourceRoot":"","sources":["../../../src/commands/jpeg-stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;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C,CAAC,CAAC;IACpE,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,GAAG,EAAE,CACzC,MAAM,CAAC,eAAe,CACpB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EACrC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAClC,CACF,CAAC;IACF,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { NativeSimctl } from '../native-simctl.js';
2
+ import type { DeviceOrientation } from '../types.js';
2
3
  declare module '../native-simctl.js' {
3
4
  interface NativeSimctl {
4
5
  getAppearance(udid: string): Promise<number>;
@@ -7,6 +8,8 @@ declare module '../native-simctl.js' {
7
8
  setIncreaseContrast(udid: string, enabled: boolean): Promise<void>;
8
9
  getContentSize(udid: string): Promise<number>;
9
10
  setContentSize(udid: string, category: number): Promise<void>;
11
+ setOrientation(udid: string, orientation: DeviceOrientation): Promise<void>;
12
+ getOrientation(udid: string): Promise<DeviceOrientation>;
10
13
  }
11
14
  }
12
15
  /**
@@ -39,4 +42,22 @@ export declare function getContentSize(this: NativeSimctl, udid: string): Promis
39
42
  * @param category — the Dynamic Type content size category to apply
40
43
  */
41
44
  export declare function setContentSize(this: NativeSimctl, udid: string, category: number): Promise<void>;
45
+ /**
46
+ * Rotates the device — the same effect as Simulator.app's Hardware > Rotate menu items. Known to
47
+ * silently no-op in two cases — see CLAUDE.md's "Known gaps": a device-motion-capable runtime, and
48
+ * a device this same process both created and booted.
49
+ *
50
+ * @param udid — UDID of the target device
51
+ * @param orientation — the orientation to rotate to
52
+ */
53
+ export declare function setOrientation(this: NativeSimctl, udid: string, orientation: DeviceOrientation): Promise<void>;
54
+ /**
55
+ * The device's current orientation — a live read (not just this process's own last
56
+ * {@link setOrientation} call), via a guest-spawned `defaults read` of a backboardd digitizer
57
+ * preference; see CLAUDE.md for how and its limits (notably: portrait until the frontmost app has
58
+ * actually rotated at least once this boot).
59
+ *
60
+ * @param udid — UDID of the device to inspect; must be booted
61
+ */
62
+ export declare function getOrientation(this: NativeSimctl, udid: string): Promise<DeviceOrientation>;
42
63
  //# sourceMappingURL=ui.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/commands/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAGtD,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,YAAY;QACpB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7C,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1D,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QACnD,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACnE,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9C,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KAC/D;CACF;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAErF;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,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YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAEjG"}
@@ -41,4 +41,26 @@ export async function getContentSize(udid) {
41
41
  export async function setContentSize(udid, category) {
42
42
  return runCatchingAsync(async () => (await this._findDevice(udid)).setContentSize(category));
43
43
  }
44
+ /**
45
+ * Rotates the device — the same effect as Simulator.app's Hardware > Rotate menu items. Known to
46
+ * silently no-op in two cases — see CLAUDE.md's "Known gaps": a device-motion-capable runtime, and
47
+ * a device this same process both created and booted.
48
+ *
49
+ * @param udid — UDID of the target device
50
+ * @param orientation — the orientation to rotate to
51
+ */
52
+ export async function setOrientation(udid, orientation) {
53
+ return runCatchingAsync(async () => (await this._findDevice(udid)).setOrientation(orientation));
54
+ }
55
+ /**
56
+ * The device's current orientation — a live read (not just this process's own last
57
+ * {@link setOrientation} call), via a guest-spawned `defaults read` of a backboardd digitizer
58
+ * preference; see CLAUDE.md for how and its limits (notably: portrait until the frontmost app has
59
+ * actually rotated at least once this boot).
60
+ *
61
+ * @param udid — UDID of the device to inspect; must be booted
62
+ */
63
+ export async function getOrientation(udid) {
64
+ return runCatchingAsync(async () => (await this._findDevice(udid)).getOrientation());
65
+ }
44
66
  //# sourceMappingURL=ui.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../src/commands/ui.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAanD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAqB,IAAY;IAClE,OAAO,gBAAgB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;AACxF,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAqB,IAAY,EAAE,KAAa;IACjF,OAAO,gBAAgB,CAAC,KAAK,IAAI,EAAE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C;AAC/F,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAqB,IAAY,EAAE,WAA8B;IACnG,OAAO,gBAAgB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;AAClG,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAqB,IAAY;IACnE,OAAO,gBAAgB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;AACvF,CAAC"}
@@ -2,7 +2,8 @@ export { NativeSimError, NativeSimUnavailableError, NativeSimDispatchError, Nati
2
2
  export { NativeSimctl } from './native-simctl.js';
3
3
  export { SpawnedProcess } from './commands/spawn.js';
4
4
  export { VideoStream } from './commands/video-stream.js';
5
+ export { JpegStream } from './commands/jpeg-stream.js';
5
6
  export type { AppContainerType } from './commands/app.js';
6
7
  export type { BiometricName } from './commands/biometric.js';
7
- export { SimBootStatus, SimDeviceState, type ApnsAlert, type ApnsPayload, type ApnsSound, type PushNotificationPayload, type ScreenshotOptions, type SimBootInfo, type SimDeviceInfo, type SimDeviceTypeInfo, type SimDisplayInfo, type SimPermissionService, type SimPermissionStatus, type SimProcessInfo, type SimRuntimeInfo, type SpawnOptions, type StopVideoRecordingOptions, type VideoAccessUnit, type VideoRecordingOptions, type VideoStreamOptions, } from './types.js';
8
+ export { DeviceOrientation, SimBootStatus, SimDeviceState, type ApnsAlert, type ApnsPayload, type ApnsSound, type JpegFrame, type JpegStreamOptions, type PushNotificationPayload, type ScreenshotOptions, type SimBootInfo, type SimDeviceInfo, type SimDeviceTypeInfo, type SimDisplayInfo, type SimPermissionService, type SimPermissionStatus, type SimProcessInfo, type SimRuntimeInfo, type SpawnOptions, type StopVideoRecordingOptions, type VideoAccessUnit, type VideoRecordingOptions, type VideoStreamOptions, } from './types.js';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AACvH,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,YAAY,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACxD,YAAY,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,aAAa,EACb,cAAc,EACd,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AACvH,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AACrD,YAAY,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACxD,YAAY,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC"}
package/lib/src/index.js CHANGED
@@ -2,5 +2,6 @@ export { NativeSimError, NativeSimUnavailableError, NativeSimDispatchError, Nati
2
2
  export { NativeSimctl } from './native-simctl.js';
3
3
  export { SpawnedProcess } from './commands/spawn.js';
4
4
  export { VideoStream } from './commands/video-stream.js';
5
- export { SimBootStatus, SimDeviceState, } from './types.js';
5
+ export { JpegStream } from './commands/jpeg-stream.js';
6
+ export { DeviceOrientation, SimBootStatus, SimDeviceState, } from './types.js';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AACvH,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,cAAc,GAmBf,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AACvH,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAGrD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,GAqBf,MAAM,YAAY,CAAC"}
@@ -2,6 +2,7 @@ import './commands/app.js';
2
2
  import './commands/biometric.js';
3
3
  import './commands/darwin-notification.js';
4
4
  import './commands/interaction.js';
5
+ import './commands/jpeg-stream.js';
5
6
  import './commands/keychain.js';
6
7
  import './commands/lifecycle.js';
7
8
  import './commands/media.js';
@@ -19,6 +20,7 @@ import './commands/app.js';
19
20
  import './commands/biometric.js';
20
21
  import './commands/darwin-notification.js';
21
22
  import './commands/interaction.js';
23
+ import './commands/jpeg-stream.js';
22
24
  import './commands/keychain.js';
23
25
  import './commands/lifecycle.js';
24
26
  import './commands/media.js';
@@ -1 +1 @@
1
- {"version":3,"file":"native-simctl.d.ts","sourceRoot":"","sources":["../../src/native-simctl.ts"],"names":[],"mappings":"AAKA,OASO,mBAAmB,CAAC;AAC3B,OAAuE,yBAAyB,CAAC;AACjG,OAIO,mCAAmC,CAAC;AAC3C,OAA4E,2BAA2B,CAAC;AACxG,OAAgE,wBAAwB,CAAC;AACzF,OAYO,yBAAyB,CAAC;AACjC,OAA2C,qBAAqB,CAAC;AACjE,OAAoB,oBAAoB,CAAC;AACzC,OAA2C,0BAA0B,CAAC;AACtE,OAAgF,2BAA2B,C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
5
5
  import { enrollBiometric, isBiometricEnrolled, sendBiometricMatch } from './commands/biometric.js';
6
6
  import { getDarwinNotificationState, postDarwinNotification, setDarwinNotificationState, } from './commands/darwin-notification.js';
7
7
  import { clearLocation, getEnv, openUrl, pushNotification, setLocation } from './commands/interaction.js';
8
+ import { startJpegStream } from './commands/jpeg-stream.js';
8
9
  import { addCertificate, addRootCertificate, resetKeychain } from './commands/keychain.js';
9
10
  import { bootDevice, createDevice, deleteDevice, eraseDevice, getBootStatus, getDevices, getSupportedDeviceTypes, getSupportedRuntimes, shutdownAllDevices, shutdownDevice, waitForBoot, } from './commands/lifecycle.js';
10
11
  import { addMedia, addPhoto, addVideo } from './commands/media.js';
@@ -14,7 +15,7 @@ import { getPermission, grantPermission, resetPermission, revokePermission } fro
14
15
  import { getRuntimeRootPath, listProcesses } from './commands/process.js';
15
16
  import { getDisplays, getScreenshot } from './commands/screenshot.js';
16
17
  import { spawnProcess } from './commands/spawn.js';
17
- import { getAppearance, getContentSize, getIncreaseContrast, setAppearance, setContentSize, setIncreaseContrast, } from './commands/ui.js';
18
+ import { getAppearance, getContentSize, getIncreaseContrast, getOrientation, setAppearance, setContentSize, setIncreaseContrast, setOrientation, } from './commands/ui.js';
18
19
  import { isVideoRecording, startVideoRecording, stopVideoRecording } from './commands/video-recording.js';
19
20
  import { startVideoStream } from './commands/video-stream.js';
20
21
  import { getWebInspectorSocket } from './commands/webinspector.js';
@@ -26,6 +27,7 @@ import './commands/app.js';
26
27
  import './commands/biometric.js';
27
28
  import './commands/darwin-notification.js';
28
29
  import './commands/interaction.js';
30
+ import './commands/jpeg-stream.js';
29
31
  import './commands/keychain.js';
30
32
  import './commands/lifecycle.js';
31
33
  import './commands/media.js';
@@ -168,6 +170,8 @@ Object.assign(NativeSimctl.prototype, {
168
170
  setIncreaseContrast,
169
171
  getContentSize,
170
172
  setContentSize,
173
+ setOrientation,
174
+ getOrientation,
171
175
  // permissions
172
176
  grantPermission,
173
177
  revokePermission,
@@ -191,6 +195,7 @@ Object.assign(NativeSimctl.prototype, {
191
195
  stopVideoRecording,
192
196
  isVideoRecording,
193
197
  startVideoStream,
198
+ startJpegStream,
194
199
  // webinspector
195
200
  getWebInspectorSocket,
196
201
  // spawn
@@ -1 +1 @@
1
- {"version":3,"file":"native-simctl.js","sourceRoot":"","sources":["../../src/native-simctl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAErC,OAAO,EACL,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AACjG,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACxG,OAAO,EAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAC,MAAM,wBAAwB,CAAC;AACzF,OAAO,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAC,aAA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,8FAA8F;IAC9F,0DAA0D;IAC1D,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACvD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,CAAC;AAEH,MAAM,gCAAgC,GAAG,MAAM,CAAC;AAEhD,SAAS,mBAAmB;IAC1B,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,EAAE;YAC1C,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,gCAAgC;SAC1C,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,4FAA4F;QAC5F,sFAAsF;QACtF,iGAAiG;QACjG,IAAK,GAA6B,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtD,MAAM,IAAI,KAAK,CAAC,gFAAgF,EAAE;gBAChG,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;QACL,CAAC;QACD,IAAK,GAA6B,EAAE,IAAI,KAAK,WAAW,EAAE,CAAC;YACzD,MAAM,IAAI,KAAK,CAAC,0CAA0C,gCAAgC,IAAI,EAAE,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC,CAAC;QAChH,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -6,6 +6,13 @@ export declare enum SimDeviceState {
6
6
  Booted = 3,
7
7
  ShuttingDown = 4
8
8
  }
9
+ /** Device orientations `setOrientation` accepts — the raw GSEvent wire values (see CLAUDE.md). */
10
+ export declare enum DeviceOrientation {
11
+ Portrait = 1,
12
+ PortraitUpsideDown = 2,
13
+ LandscapeRight = 3,
14
+ LandscapeLeft = 4
15
+ }
9
16
  /** A device in the default device set, as returned by `NativeSimctl.getDevices()`/`createDevice()`. */
10
17
  export interface SimDeviceInfo {
11
18
  /** e.g. `"D768CB90-CBB4-4557-82F6-B89E1CD0E80B"`. */
@@ -165,10 +172,10 @@ export interface VideoStreamOptions {
165
172
  codec?: 'h264' | 'hevc';
166
173
  /**
167
174
  * Max frames/sec to poll the framebuffer at — an unchanged frame is never re-encoded, so this
168
- * is an upper bound, not a guarantee. Must be >= 1. Defaults to 15.
175
+ * is an upper bound, not a guarantee. Must be >= 1. Defaults to 60.
169
176
  */
170
177
  fps?: number;
171
- /** Target average bitrate, in bits/sec. Defaults to 2,000,000 (2 Mbps). */
178
+ /** Target average bitrate, in bits/sec. Defaults to 4,000,000 (4 Mbps). */
172
179
  bitrate?: number;
173
180
  /**
174
181
  * Also stream the device's audio, interleaved into the same `accessUnits()` sequence. Defaults
@@ -177,6 +184,42 @@ export interface VideoStreamOptions {
177
184
  */
178
185
  audio?: boolean;
179
186
  }
187
+ /** Options for `NativeSimctl.startJpegStream`. */
188
+ export interface JpegStreamOptions {
189
+ /**
190
+ * Which display to stream, by `id` from `getDisplays()`. Defaults to the primary display
191
+ * (falling back to the first renderable display if none is primary, e.g. tvOS).
192
+ */
193
+ displayId?: string;
194
+ /**
195
+ * Max frames/sec to poll the framebuffer at — an unchanged frame is never re-encoded, so this
196
+ * is an upper bound, not a guarantee. Must be >= 1. Defaults to 60.
197
+ */
198
+ fps?: number;
199
+ /**
200
+ * JPEG quality as a percentage (0 = smallest/most compressed, 100 = largest/least compressed).
201
+ * Defaults to 80 — noticeably smaller than {@link ScreenshotOptions.quality}'s own (near-
202
+ * lossless) default, more suitable for a continuous live stream than a one-off screenshot.
203
+ */
204
+ quality?: number;
205
+ /**
206
+ * Frame scale as a percentage of the original display resolution — 100 (default) performs no
207
+ * scaling; must be greater than 0 and no greater than 100.
208
+ */
209
+ scale?: number;
210
+ }
211
+ /**
212
+ * One JPEG-encoded frame from `JpegStream.frames()`. Unlike {@link VideoAccessUnit}, every frame
213
+ * is independently decodable — there's no keyframe/interframe distinction — so consumers (e.g. an
214
+ * MJPEG multipart HTTP stream built from this sequence) can start from, or drop, any frame freely.
215
+ */
216
+ export interface JpegFrame {
217
+ data: Buffer;
218
+ /** Monotonically increasing, starting at 0. */
219
+ sequence: number;
220
+ /** Microseconds since the stream started. */
221
+ timestampMicros: number;
222
+ }
180
223
  /**
181
224
  * One encoded unit from `VideoStream.accessUnits()`, discriminated by `track`: a video unit
182
225
  * (Annex-B NAL units — a keyframe's `data` has parameter sets, SPS/PPS or VPS/SPS/PPS for HEVC,
@@ -307,6 +350,17 @@ export interface NativeVideoStreamHandle {
307
350
  /** Forces the next encoded video frame to be a keyframe — trivial in-memory flag, so synchronous. */
308
351
  requestKeyFrame(): void;
309
352
  }
353
+ /** Raw shape of a JPEG frame as the native addon delivers it — see {@link JpegFrame}. */
354
+ export interface NativeJpegFrame {
355
+ data: Buffer;
356
+ sequence: number;
357
+ timestampMicros: number;
358
+ }
359
+ export type NativeJpegFrameCallback = (frame: NativeJpegFrame) => void;
360
+ /** A live `coresim::JpegStreamSession`, wrapped by `coresim.mm`'s `NativeJpegStream`. */
361
+ export interface NativeJpegStreamHandle {
362
+ stop(): Promise<void>;
363
+ }
310
364
  /**
311
365
  * A live recording, wrapped by `coresim.mm`'s `NativePrivateRecordingHandle` (video only,
312
366
  * addressing CoreSimulator's own internally-tracked private recorder) or `NativeAVRecording`
@@ -339,6 +393,8 @@ export interface NativeDeviceHandle {
339
393
  openUrl(url: string): Promise<void>;
340
394
  setLocation(latitude: number, longitude: number): Promise<void>;
341
395
  clearLocation(): Promise<void>;
396
+ setOrientation(orientation: number): Promise<void>;
397
+ getOrientation(): Promise<number>;
342
398
  sendPushNotification(bundleId: string, payload: PushNotificationPayload): Promise<void>;
343
399
  addCertificate(path: string, trustAsRoot: boolean): Promise<void>;
344
400
  resetKeychain(): Promise<void>;
@@ -382,6 +438,12 @@ export interface NativeDeviceHandle {
382
438
  bitrate?: number;
383
439
  audio?: boolean;
384
440
  } | undefined, onAccessUnit: NativeVideoAccessUnitCallback, onError: NativeVideoErrorCallback): Promise<NativeVideoStreamHandle>;
441
+ startJpegStream(options: {
442
+ displayId?: string;
443
+ fps?: number;
444
+ quality?: number;
445
+ scale?: number;
446
+ } | undefined, onFrame: NativeJpegFrameCallback, onError: NativeVideoErrorCallback): Promise<NativeJpegStreamHandle>;
385
447
  spawn(path: string, options: SpawnOptions | undefined, onExit: NativeSpawnExitCallback): Promise<NativeSpawnResult>;
386
448
  }
387
449
  /** A `SimDeviceSet`, wrapped by `coresim.mm`'s `NativeDeviceSet`. */