@recallai/desktop-sdk 2.0.31 → 2.0.33
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 +24 -0
- package/index.d.ts +394 -5
- package/index.js +218 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
### 2.0.33 [patch] (MacOS+Windows) - 2026-09-21
|
|
2
|
+
- Stabilized Raw Media feature
|
|
3
|
+
- Added microphone selection API for ad hoc recordings on windows
|
|
4
|
+
- Improved Desktop SDK npm API documentation
|
|
5
|
+
- Improved macOS capture log performance
|
|
6
|
+
- Fixed compliance messaging for Google Meet links with dashes and large numbers of tabs on macOS
|
|
7
|
+
- Fixed Zoom Web meetings being detected as closed prematurely on macOS
|
|
8
|
+
- Fixed duplicate Zoom Web mic monitor events on macOS
|
|
9
|
+
- Fixed microphone teardown deadlock on macOS
|
|
10
|
+
- Fixed Slack grace period handling on macOS
|
|
11
|
+
- Improved AssemblyAI retry handling for enqueue and deadline failures
|
|
12
|
+
|
|
13
|
+
### 2.0.32 [patch] (MacOS+Windows) - 2026-09-15
|
|
14
|
+
- Added support for detecting Google Meet, Teams Web, and Zoom Web meetings in Chromium browsers without Full Disk Access on macOS 27
|
|
15
|
+
- Improved Google Meet and Zoom Web detection when starting with only a PIP window visible on macOS 27
|
|
16
|
+
- Improved Google Meet detection for Chrome 153 on macOS
|
|
17
|
+
- Fixed issue where Zoom Web PIP windows could be mistaken for Google Meet meetings on macOS
|
|
18
|
+
- Fixed issue where Zoom Web meeting URLs did not include passcodes on macOS
|
|
19
|
+
- Improved Zoom meeting URL discovery with automatic retries on Windows
|
|
20
|
+
- Fixed missing meeting titles for newer Zoom versions on Windows
|
|
21
|
+
- Improved recording-start status update reliability on macOS and Windows
|
|
22
|
+
- Improved `startRecording` reliability on Windows
|
|
23
|
+
- Improved transcription finalization and failure reporting, including recordings where transcription received no audio, on macOS and Windows
|
|
24
|
+
|
|
1
25
|
### 2.0.31 [patch] (MacOS) - 2026-09-08
|
|
2
26
|
- Added support for Zoom Web on macOS
|
|
3
27
|
- Fixed issue where screenshare tiles were detected as participants for Google Meet on macOS
|
package/index.d.ts
CHANGED
|
@@ -1,157 +1,543 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Payload emitted by any Desktop Recording SDK event.
|
|
3
|
+
*
|
|
4
|
+
* Prefer {@link EventTypeToPayloadMap} when writing event-specific handlers because it preserves
|
|
5
|
+
* the relationship between an event name and its payload type.
|
|
6
|
+
*
|
|
7
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-event-types
|
|
8
|
+
*/
|
|
9
|
+
export type RecallAiSdkEvent = RecordingStartEvent | RecordingStopEvent | UploadProgressEvent | MeetingDetectedEvent | MeetingUpdatedEvent | MeetingClosedEvent | SdkStateChangeEvent | ErrorEvent | MediaCaptureStatusEvent | ParticipantCaptureStatusEvent | ComplianceMessageStatusEvent | PermissionsGrantedEvent | PermissionStatusEvent | RealtimeEvent | ShutdownEvent | LogEvent | NetworkStatusEvent;
|
|
10
|
+
/** Maps every supported event name to the payload received by its listener. */
|
|
2
11
|
export type EventTypeToPayloadMap = {
|
|
12
|
+
/** Emitted after media capture has started. */
|
|
3
13
|
'recording-started': RecordingStartEvent;
|
|
14
|
+
/** Emitted after media capture has ended. Upload processing may still be in progress. */
|
|
4
15
|
'recording-ended': RecordingStopEvent;
|
|
5
16
|
/**
|
|
6
17
|
* @deprecated Recordings are uploaded in parallel to recording now, there is no progress.
|
|
7
18
|
*/
|
|
8
19
|
'upload-progress': UploadProgressEvent;
|
|
20
|
+
/** Emitted when the SDK detects a supported meeting. */
|
|
9
21
|
'meeting-detected': MeetingDetectedEvent;
|
|
22
|
+
/** Emitted when information about a detected meeting changes. */
|
|
10
23
|
'meeting-updated': MeetingUpdatedEvent;
|
|
24
|
+
/** Emitted when a previously detected meeting is no longer active. */
|
|
11
25
|
'meeting-closed': MeetingClosedEvent;
|
|
12
26
|
/**
|
|
13
27
|
* @deprecated Use recording-started/recording-ended instead.
|
|
14
28
|
*/
|
|
15
29
|
'sdk-state-change': SdkStateChangeEvent;
|
|
30
|
+
/** Emitted when the SDK encounters an asynchronous error. */
|
|
16
31
|
'error': ErrorEvent;
|
|
32
|
+
/** Emitted when recording-level audio or video capture starts or stops. */
|
|
17
33
|
'media-capture-status': MediaCaptureStatusEvent;
|
|
34
|
+
/** Emitted when capture of an individual participant's media starts or stops. */
|
|
18
35
|
'participant-capture-status': ParticipantCaptureStatusEvent;
|
|
36
|
+
/** Emitted when delivery of the configured compliance chat message changes state. */
|
|
19
37
|
'compliance-message-status': ComplianceMessageStatusEvent;
|
|
38
|
+
/** Emitted when all permissions requested during initialization have been granted. */
|
|
20
39
|
'permissions-granted': PermissionsGrantedEvent;
|
|
40
|
+
/** Emitted for the current state of each relevant permission. */
|
|
21
41
|
'permission-status': PermissionStatusEvent;
|
|
42
|
+
/** Emitted for data subscribed to through a `desktop_sdk_callback` realtime endpoint. */
|
|
22
43
|
'realtime-event': RealtimeEvent;
|
|
44
|
+
/** Emitted when the native SDK process exits. */
|
|
23
45
|
'shutdown': ShutdownEvent;
|
|
46
|
+
/** Emitted for structured native SDK logs. */
|
|
24
47
|
'log': LogEvent;
|
|
48
|
+
/** Emitted after a sustained network disconnection or reconnection. */
|
|
25
49
|
'network-status': NetworkStatusEvent;
|
|
26
50
|
};
|
|
27
|
-
|
|
51
|
+
/**
|
|
52
|
+
* A permission understood by {@link requestPermission}.
|
|
53
|
+
*
|
|
54
|
+
* These permissions are only required on macOS. Windows reports permission requests as granted
|
|
55
|
+
* because it does not require the corresponding macOS consent flows.
|
|
56
|
+
*
|
|
57
|
+
* `teams-automation` and `browser-automation` enable Raw Media and must be requested from an
|
|
58
|
+
* explicit user action before a meeting. They cannot be included in
|
|
59
|
+
* {@link RecallAiSdkConfig.acquirePermissionsOnStartup}.
|
|
60
|
+
*
|
|
61
|
+
* @see https://docs.recall.ai/docs/macos-permissions
|
|
62
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
63
|
+
*/
|
|
64
|
+
export type Permission =
|
|
65
|
+
/** Detect and interact with supported meeting application windows on macOS. */
|
|
66
|
+
'accessibility'
|
|
67
|
+
/** Capture a meeting window's video and system audio on macOS. */
|
|
68
|
+
| 'screen-capture'
|
|
69
|
+
/** Capture the local microphone on macOS. */
|
|
70
|
+
| 'microphone'
|
|
71
|
+
/** Capture system audio without screen video; unnecessary when `screen-capture` is granted. */
|
|
72
|
+
| 'system-audio'
|
|
73
|
+
/** Read local meeting metadata used by supported legacy detection paths. */
|
|
74
|
+
| 'full-disk-access'
|
|
75
|
+
/** Prepare Microsoft Teams Desktop for Raw Media capture. macOS only. */
|
|
76
|
+
| 'teams-automation'
|
|
77
|
+
/** Prepare the supported default Chromium browser for Google Meet Raw Media. macOS only. */
|
|
78
|
+
| 'browser-automation';
|
|
79
|
+
/** Identifies a meeting or prepared desktop-audio source known to the SDK. */
|
|
28
80
|
export interface RecallAiSdkWindow {
|
|
81
|
+
/**
|
|
82
|
+
* Stable identifier for this detected meeting or prepared audio source.
|
|
83
|
+
* Pass this value unchanged to recording methods such as {@link startRecording}.
|
|
84
|
+
*/
|
|
29
85
|
id: string;
|
|
86
|
+
/** Meeting title, when the platform makes it available. */
|
|
30
87
|
title?: string;
|
|
88
|
+
/** Canonical meeting URL, when the platform makes it available. */
|
|
31
89
|
url?: string;
|
|
90
|
+
/** Recall.ai meeting-platform identifier, when known. */
|
|
32
91
|
platform?: string;
|
|
33
92
|
}
|
|
93
|
+
/** Options used to initialize the Desktop Recording SDK. */
|
|
34
94
|
export interface RecallAiSdkConfig {
|
|
95
|
+
/**
|
|
96
|
+
* Backwards-compatible alias for {@link apiUrl}. When both are supplied, `api_url` wins.
|
|
97
|
+
*/
|
|
35
98
|
api_url?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Base URL for the Recall.ai region containing your workspace, for example
|
|
101
|
+
* `https://us-west-2.recall.ai`. Production URLs must use HTTPS.
|
|
102
|
+
*
|
|
103
|
+
* @see https://docs.recall.ai/docs/regions
|
|
104
|
+
*/
|
|
36
105
|
apiUrl?: string;
|
|
106
|
+
/**
|
|
107
|
+
* macOS permissions to request while initializing. Do not use this option for Raw Media
|
|
108
|
+
* automation permissions; request those separately from an explicit user interaction.
|
|
109
|
+
* Ignored on Windows, where these permission flows are unnecessary.
|
|
110
|
+
*/
|
|
37
111
|
acquirePermissionsOnStartup?: Exclude<Permission, 'teams-automation' | 'browser-automation'>[];
|
|
38
112
|
[key: string]: any;
|
|
39
113
|
}
|
|
114
|
+
/** Options used to start recording a detected meeting or prepared desktop-audio source. */
|
|
40
115
|
export interface StartRecordingConfig {
|
|
116
|
+
/** ID from a meeting event or from {@link prepareDesktopAudioRecording}. */
|
|
41
117
|
windowId: string;
|
|
118
|
+
/** Short-lived upload token returned by the Create Desktop SDK Upload endpoint. */
|
|
42
119
|
uploadToken: string;
|
|
120
|
+
/**
|
|
121
|
+
* Disables Raw Media when it is enabled and available in your Recall.ai workspace.
|
|
122
|
+
* Defaults to false.
|
|
123
|
+
*
|
|
124
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
125
|
+
*/
|
|
126
|
+
disableRawMedia?: boolean;
|
|
43
127
|
}
|
|
128
|
+
/** Identifies the active recording to stop. */
|
|
44
129
|
export interface StopRecordingConfig {
|
|
130
|
+
/** ID originally passed to {@link startRecording}. */
|
|
45
131
|
windowId: string;
|
|
46
132
|
}
|
|
133
|
+
/** Identifies the active recording to pause. */
|
|
47
134
|
export interface PauseRecordingConfig {
|
|
135
|
+
/** ID originally passed to {@link startRecording}. */
|
|
48
136
|
windowId: string;
|
|
49
137
|
}
|
|
138
|
+
/** Identifies the paused recording to resume. */
|
|
50
139
|
export interface ResumeRecordingConfig {
|
|
140
|
+
/** ID originally passed to {@link startRecording}. */
|
|
141
|
+
windowId: string;
|
|
142
|
+
}
|
|
143
|
+
/** Options for sending a chat message through an active Raw Media recording. */
|
|
144
|
+
export interface SendChatMessageConfig {
|
|
145
|
+
/** ID of the active Raw Media recording. */
|
|
51
146
|
windowId: string;
|
|
147
|
+
/** Message body. Must contain between 1 and 4,096 characters. */
|
|
148
|
+
message: string;
|
|
149
|
+
/** The participant ID, or "everyone". Defaults to "everyone". */
|
|
150
|
+
to?: string;
|
|
151
|
+
/** Whether to pin the message. Defaults to false. */
|
|
152
|
+
pin?: boolean;
|
|
52
153
|
}
|
|
53
154
|
/**
|
|
54
|
-
* @deprecated Recordings are automatically uploaded based on your
|
|
155
|
+
* @deprecated Recordings are automatically uploaded based on your retention configuration. This is now a no-op.
|
|
55
156
|
*/
|
|
56
157
|
export interface UploadRecordingConfig {
|
|
158
|
+
/** ID originally passed to {@link startRecording}. */
|
|
57
159
|
windowId: string;
|
|
58
160
|
}
|
|
59
161
|
interface PrepareDesktopAudioRecordingConfig {
|
|
60
162
|
[key: string]: any;
|
|
61
163
|
}
|
|
164
|
+
/** Audio endpoint direction used by Windows desktop-audio recordings. */
|
|
165
|
+
export type AudioDeviceDirection = 'input' | 'output';
|
|
166
|
+
/** An audio endpoint available to Windows desktop-audio recordings. */
|
|
167
|
+
export interface AudioDevice {
|
|
168
|
+
/** Platform-specific device identifier accepted by {@link setDesktopAudioDevice}. */
|
|
169
|
+
id: string;
|
|
170
|
+
/** Human-readable device name. */
|
|
171
|
+
name: string;
|
|
172
|
+
/** Whether this endpoint captures microphone input or renders system output. */
|
|
173
|
+
direction: AudioDeviceDirection;
|
|
174
|
+
}
|
|
175
|
+
/** Payload for the `recording-started` event. */
|
|
62
176
|
export interface RecordingStartEvent {
|
|
177
|
+
/** Meeting or prepared audio source being recorded. */
|
|
63
178
|
window: RecallAiSdkWindow;
|
|
179
|
+
/**
|
|
180
|
+
* Whether this recording is using Desktop SDK Raw Media. Use this as the source of truth for
|
|
181
|
+
* the active recording; `false` includes recordings that fell back to local capture.
|
|
182
|
+
*/
|
|
183
|
+
rawMedia: boolean;
|
|
64
184
|
}
|
|
185
|
+
/** Payload for the `recording-ended` event. */
|
|
65
186
|
export interface RecordingStopEvent {
|
|
187
|
+
/** Meeting or prepared audio source whose capture ended. */
|
|
66
188
|
window: RecallAiSdkWindow;
|
|
67
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Payload for the deprecated `upload-progress` event.
|
|
192
|
+
* @deprecated Recordings upload while capture is in progress and no longer report progress.
|
|
193
|
+
*/
|
|
68
194
|
export interface UploadProgressEvent {
|
|
195
|
+
/** Identifier of the recording source. */
|
|
69
196
|
window: {
|
|
70
197
|
id: string;
|
|
71
198
|
};
|
|
199
|
+
/** Legacy upload progress value. */
|
|
72
200
|
progress: number;
|
|
73
201
|
}
|
|
202
|
+
/** Payload for the `meeting-detected` event. */
|
|
74
203
|
export interface MeetingDetectedEvent {
|
|
204
|
+
/** Newly detected meeting. */
|
|
75
205
|
window: RecallAiSdkWindow;
|
|
76
206
|
}
|
|
207
|
+
/** Payload for the `meeting-updated` event. */
|
|
77
208
|
export interface MeetingUpdatedEvent {
|
|
209
|
+
/** Current meeting data, including any newly resolved title or URL. */
|
|
78
210
|
window: RecallAiSdkWindow;
|
|
79
211
|
}
|
|
212
|
+
/** Payload for the `meeting-closed` event. */
|
|
80
213
|
export interface MeetingClosedEvent {
|
|
214
|
+
/** Meeting that is no longer detected. */
|
|
81
215
|
window: RecallAiSdkWindow;
|
|
82
216
|
}
|
|
83
217
|
/**
|
|
84
218
|
* @deprecated Use recording-started/recording-ended instead.
|
|
85
219
|
*/
|
|
86
220
|
export interface SdkStateChangeEvent {
|
|
221
|
+
/** Legacy global SDK state. */
|
|
87
222
|
sdk: {
|
|
88
223
|
state: {
|
|
224
|
+
/** Current legacy recording state. */
|
|
89
225
|
code: 'recording' | 'idle' | 'paused';
|
|
90
226
|
};
|
|
91
227
|
};
|
|
92
228
|
}
|
|
229
|
+
/** Payload describing recording-level media capture availability. */
|
|
93
230
|
export interface MediaCaptureStatusEvent {
|
|
231
|
+
/** Recording affected by the change. */
|
|
94
232
|
window: RecallAiSdkWindow;
|
|
233
|
+
/** Media kind whose capture state changed. */
|
|
95
234
|
type: 'video' | 'audio';
|
|
235
|
+
/** `true` when the SDK is currently capturing this media kind. */
|
|
96
236
|
capturing: boolean;
|
|
97
237
|
}
|
|
238
|
+
/** Payload describing capture availability for an individual participant's media. */
|
|
98
239
|
export interface ParticipantCaptureStatusEvent {
|
|
240
|
+
/** Recording affected by the change. */
|
|
99
241
|
window: RecallAiSdkWindow;
|
|
242
|
+
/** Numeric identifier of the participant whose capture state changed. */
|
|
243
|
+
participantId: number;
|
|
244
|
+
/** Participant media kind whose capture state changed. */
|
|
100
245
|
type: 'video' | 'audio' | 'screenshare';
|
|
246
|
+
/** `true` when the SDK is currently capturing this participant media kind. */
|
|
101
247
|
capturing: boolean;
|
|
102
248
|
}
|
|
249
|
+
/** Payload for delivery of the compliance message configured on the Desktop SDK Upload. */
|
|
103
250
|
export interface ComplianceMessageStatusEvent {
|
|
251
|
+
/** Recording for which the compliance message was configured. */
|
|
104
252
|
window: RecallAiSdkWindow;
|
|
253
|
+
/** Final or current delivery result. */
|
|
105
254
|
status: 'sent' | 'timeout' | 'cancelled';
|
|
106
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* Payload for the legacy aggregate `permissions-granted` event.
|
|
258
|
+
* Use `permission-status` when your UI needs the state of an individual permission.
|
|
259
|
+
*/
|
|
107
260
|
export interface PermissionsGrantedEvent {
|
|
108
261
|
}
|
|
262
|
+
/** Payload reporting the state of a Desktop Recording SDK permission. */
|
|
109
263
|
export interface PermissionStatusEvent {
|
|
264
|
+
/** Permission whose state was checked or changed. */
|
|
110
265
|
permission: Permission;
|
|
111
|
-
status
|
|
266
|
+
/** Convenience boolean equivalent to `status === "granted"`. */
|
|
267
|
+
granted: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Current state. Values are `granted`, `not_requested`, `denied`, `not_installed`, and
|
|
270
|
+
* `error`. Automation permissions use `not_installed` when the required application or
|
|
271
|
+
* supported default browser is unavailable.
|
|
272
|
+
*/
|
|
273
|
+
status: 'granted' | 'not_requested' | 'denied' | 'not_installed' | 'error';
|
|
112
274
|
}
|
|
275
|
+
/** Payload for an asynchronous SDK error. */
|
|
113
276
|
export interface ErrorEvent {
|
|
277
|
+
/** Meeting associated with the error, when applicable. */
|
|
114
278
|
window?: RecallAiSdkWindow;
|
|
279
|
+
/** Machine-readable error category. */
|
|
115
280
|
type: string;
|
|
281
|
+
/** Human-readable diagnostic message. */
|
|
116
282
|
message: string;
|
|
117
283
|
}
|
|
284
|
+
/** Payload delivered for a configured `desktop_sdk_callback` realtime event. */
|
|
118
285
|
export interface RealtimeEvent {
|
|
286
|
+
/** Recording that produced the realtime event. */
|
|
119
287
|
window: RecallAiSdkWindow;
|
|
288
|
+
/** Configured event name, such as `transcript.data` or `participant_events.join`. */
|
|
120
289
|
event: string;
|
|
290
|
+
/** Event-specific payload matching the realtime event schema. */
|
|
121
291
|
data: any;
|
|
122
292
|
}
|
|
293
|
+
/** Payload emitted when the native Desktop Recording SDK process exits. */
|
|
123
294
|
export interface ShutdownEvent {
|
|
295
|
+
/** Native process exit code, or `0` when no exit code is available. */
|
|
124
296
|
code: number;
|
|
297
|
+
/** Signal that terminated the process, or an empty string when it exited normally. */
|
|
125
298
|
signal: string;
|
|
126
299
|
}
|
|
300
|
+
/** Payload emitted after a sustained network state change. */
|
|
127
301
|
export interface NetworkStatusEvent {
|
|
302
|
+
/** Whether the network disconnected or recovered after a disconnection. */
|
|
128
303
|
status: 'reconnected' | 'disconnected';
|
|
129
304
|
}
|
|
305
|
+
/** Structured diagnostic log emitted by the native SDK. */
|
|
130
306
|
export interface LogEvent {
|
|
307
|
+
/** Log severity. */
|
|
131
308
|
level: 'debug' | 'info' | 'warning' | 'error';
|
|
309
|
+
/** Formatted log message. */
|
|
132
310
|
message: string;
|
|
311
|
+
/** Native logging subsystem. */
|
|
133
312
|
subsystem: string;
|
|
313
|
+
/** Native logging category. */
|
|
134
314
|
category: string;
|
|
315
|
+
/** Associated meeting ID, or an empty string for SDK-wide messages. */
|
|
135
316
|
window_id: string;
|
|
136
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* Starts the native Desktop Recording SDK process and begins meeting detection.
|
|
320
|
+
*
|
|
321
|
+
* Call this once during application startup, after registering any listeners that must observe
|
|
322
|
+
* initial permission and meeting-detection events. Supported on macOS and Windows; Linux is not
|
|
323
|
+
* supported. The returned promise resolves after the native process accepts its configuration.
|
|
324
|
+
*
|
|
325
|
+
* @param options SDK initialization and region configuration.
|
|
326
|
+
* @returns `null` after initialization succeeds.
|
|
327
|
+
* @throws If the platform is unsupported, the API URL is invalid, or the native SDK cannot start.
|
|
328
|
+
* @see https://docs.recall.ai/docs/desktop-sdk
|
|
329
|
+
* @see https://docs.recall.ai/docs/dsdk-supported-platforms
|
|
330
|
+
*/
|
|
137
331
|
export declare function init(options: RecallAiSdkConfig): Promise<null>;
|
|
332
|
+
/**
|
|
333
|
+
* Gracefully stops active SDK work and terminates the native Desktop Recording SDK process.
|
|
334
|
+
*
|
|
335
|
+
* Supported on macOS and Windows. Call {@link init} again before issuing more SDK commands. This
|
|
336
|
+
* method waits for the process to exit and force-terminates it after five seconds if necessary.
|
|
337
|
+
*
|
|
338
|
+
* @returns `null` after shutdown has been acknowledged.
|
|
339
|
+
* @throws If the SDK is not running or the shutdown command fails.
|
|
340
|
+
*/
|
|
138
341
|
export declare function shutdown(): Promise<null>;
|
|
342
|
+
/**
|
|
343
|
+
* Produces a diagnostic macOS accessibility-tree dump for a running application.
|
|
344
|
+
*
|
|
345
|
+
* This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
|
|
346
|
+
* production integrations.
|
|
347
|
+
*
|
|
348
|
+
* @param procName Name of the process to inspect.
|
|
349
|
+
* @returns The native diagnostic command result.
|
|
350
|
+
*/
|
|
139
351
|
export declare function dumpAXTree(procName: string): Promise<any>;
|
|
352
|
+
/**
|
|
353
|
+
* Produces diagnostic information about applications visible to macOS accessibility APIs.
|
|
354
|
+
*
|
|
355
|
+
* This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
|
|
356
|
+
* production integrations.
|
|
357
|
+
*
|
|
358
|
+
* @returns The native diagnostic command result.
|
|
359
|
+
*/
|
|
140
360
|
export declare function dumpAllApplications(): Promise<any>;
|
|
361
|
+
/**
|
|
362
|
+
* Starts recording a detected meeting or a source returned by
|
|
363
|
+
* {@link prepareDesktopAudioRecording}.
|
|
364
|
+
*
|
|
365
|
+
* Supported on macOS and Windows. `windowId` must come from the SDK and `uploadToken` must come
|
|
366
|
+
* from a newly created Desktop SDK Upload. On supported macOS meeting platforms, the SDK uses Raw
|
|
367
|
+
* Media when it is enabled and available; otherwise it records locally. Resolve capture mode from
|
|
368
|
+
* `recording-started.rawMedia` rather than predicting it from configuration.
|
|
369
|
+
*
|
|
370
|
+
* The returned promise only confirms that the start command was accepted. Listen for
|
|
371
|
+
* `recording-started` to confirm that media capture began and `error` for asynchronous failures.
|
|
372
|
+
* Starting a different recording stops the currently active recording.
|
|
373
|
+
*
|
|
374
|
+
* @param config Meeting/source ID, upload token, and optional Raw Media override.
|
|
375
|
+
* @returns `null` after the start command is accepted.
|
|
376
|
+
* @throws If the source is unknown, already recorded, permissions are insufficient, or startup fails.
|
|
377
|
+
* @see https://docs.recall.ai/docs/desktop-sdk
|
|
378
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
379
|
+
*/
|
|
141
380
|
export declare function startRecording(config: StartRecordingConfig): Promise<null>;
|
|
381
|
+
/**
|
|
382
|
+
* Stops the active recording for a meeting or prepared desktop-audio source.
|
|
383
|
+
*
|
|
384
|
+
* Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. The
|
|
385
|
+
* returned promise confirms command handling, not completion of cloud artifact processing. Listen
|
|
386
|
+
* for `recording-ended` for capture completion and use Desktop SDK Upload webhooks for final upload
|
|
387
|
+
* status.
|
|
388
|
+
*
|
|
389
|
+
* @param config ID originally passed to {@link startRecording}.
|
|
390
|
+
* @returns `null` after the stop command is handled.
|
|
391
|
+
* @throws If the SDK is not running or the command cannot be delivered.
|
|
392
|
+
*/
|
|
142
393
|
export declare function stopRecording({ windowId }: StopRecordingConfig): Promise<null>;
|
|
394
|
+
/**
|
|
395
|
+
* Pauses media capture for an active recording without ending the recording.
|
|
396
|
+
*
|
|
397
|
+
* Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
|
|
398
|
+
* the same `windowId` that was passed to {@link startRecording}. Call {@link resumeRecording} to
|
|
399
|
+
* continue the recording.
|
|
400
|
+
*
|
|
401
|
+
* @param config Active recording ID.
|
|
402
|
+
* @returns `null` after the pause command is handled.
|
|
403
|
+
* @throws If the SDK is not running or the command cannot be delivered.
|
|
404
|
+
*/
|
|
143
405
|
export declare function pauseRecording({ windowId }: PauseRecordingConfig): Promise<null>;
|
|
406
|
+
/**
|
|
407
|
+
* Resumes media capture for a paused recording.
|
|
408
|
+
*
|
|
409
|
+
* Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
|
|
410
|
+
* the same `windowId` that was passed to {@link startRecording}.
|
|
411
|
+
*
|
|
412
|
+
* @param config Paused recording ID.
|
|
413
|
+
* @returns `null` after the resume command is handled.
|
|
414
|
+
* @throws If the SDK is not running or the command cannot be delivered.
|
|
415
|
+
*/
|
|
144
416
|
export declare function resumeRecording({ windowId }: ResumeRecordingConfig): Promise<null>;
|
|
145
417
|
/**
|
|
146
|
-
*
|
|
418
|
+
* Sends a chat message through an active Desktop SDK Raw Media recording.
|
|
419
|
+
*
|
|
420
|
+
* Supported for Microsoft Teams Desktop and supported Chromium-based Google Meet browsers on
|
|
421
|
+
* macOS when `recording-started.rawMedia` is `true`. This method is not available for local
|
|
422
|
+
* recordings or on Windows. The returned promise confirms that the message was accepted and queued
|
|
423
|
+
* for the Raw Media connection; it does not confirm that the meeting platform displayed it.
|
|
424
|
+
*
|
|
425
|
+
* @param config Active Raw Media recording ID, message, recipient, and pin behavior.
|
|
426
|
+
* @returns `null` after the message is queued.
|
|
427
|
+
* @throws If the message is empty or exceeds 4,096 characters, the recipient is empty, or no Raw
|
|
428
|
+
* Media recording is active for `windowId`.
|
|
429
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
430
|
+
*/
|
|
431
|
+
export declare function sendChatMessage({ windowId, message, to, pin, }: SendChatMessageConfig): Promise<null>;
|
|
432
|
+
/**
|
|
433
|
+
* Legacy no-op retained for backwards compatibility.
|
|
434
|
+
*
|
|
435
|
+
* Recordings upload automatically according to their retention configuration. Observe Desktop SDK
|
|
436
|
+
* Upload webhooks instead of calling this method.
|
|
437
|
+
*
|
|
438
|
+
* @deprecated Recordings upload automatically; this method does nothing.
|
|
439
|
+
* @param config Legacy recording identifier. The value is ignored.
|
|
440
|
+
* @returns `null` after the no-op command is handled.
|
|
147
441
|
*/
|
|
148
442
|
export declare function uploadRecording({ windowId }: UploadRecordingConfig): Promise<null>;
|
|
443
|
+
/**
|
|
444
|
+
* Prepares an audio-only source for an in-person or whole-desktop recording.
|
|
445
|
+
*
|
|
446
|
+
* Supported on macOS and Windows. This does not start recording: pass the returned ID to
|
|
447
|
+
* {@link startRecording} with a Desktop SDK Upload token. On Windows, audio devices selected with
|
|
448
|
+
* {@link setDesktopAudioDevice} apply to this source. Device selection does not affect detected
|
|
449
|
+
* meeting recordings.
|
|
450
|
+
*
|
|
451
|
+
* @param config Optional internal compatibility settings. Most integrations should omit this.
|
|
452
|
+
* @returns A generated source ID to pass as `windowId` to {@link startRecording}.
|
|
453
|
+
* @throws If the SDK cannot prepare desktop audio capture.
|
|
454
|
+
* @see https://docs.recall.ai/docs/adhoc-meetings-in-person-meetings
|
|
455
|
+
*/
|
|
149
456
|
export declare function prepareDesktopAudioRecording(config?: PrepareDesktopAudioRecordingConfig): Promise<string>;
|
|
457
|
+
/**
|
|
458
|
+
* Lists the audio devices that can be selected for recordings created with
|
|
459
|
+
* {@link prepareDesktopAudioRecording}. This API is only for
|
|
460
|
+
* `prepareDesktopAudioRecording` recordings, does not affect detected meeting recordings, and
|
|
461
|
+
* is only available on Windows.
|
|
462
|
+
*
|
|
463
|
+
* @returns The active Windows audio input and output devices.
|
|
464
|
+
* @throws On macOS, or when Windows audio endpoints cannot be enumerated.
|
|
465
|
+
*/
|
|
466
|
+
export declare function listDevices(): Promise<AudioDevice[]>;
|
|
467
|
+
/**
|
|
468
|
+
* Selects an audio device for recordings created with {@link prepareDesktopAudioRecording}.
|
|
469
|
+
* This API is only for `prepareDesktopAudioRecording` recordings and does not affect detected
|
|
470
|
+
* meeting recordings. It is only available on Windows. Pass `null` to restore automatic device
|
|
471
|
+
* selection for the direction.
|
|
472
|
+
*
|
|
473
|
+
* A selection applies to subsequently prepared desktop-audio recordings and, when supported, the
|
|
474
|
+
* currently prepared desktop-audio source.
|
|
475
|
+
*
|
|
476
|
+
* @param id Device ID from {@link listDevices}, or `null` to use automatic selection.
|
|
477
|
+
* @param dir Whether to select the input or output endpoint.
|
|
478
|
+
* @returns `null` after the selection is applied.
|
|
479
|
+
* @throws On macOS, for an invalid device ID, or when the selection cannot be applied.
|
|
480
|
+
*/
|
|
481
|
+
export declare function setDesktopAudioDevice(id: string | null, dir: AudioDeviceDirection): Promise<null>;
|
|
482
|
+
/**
|
|
483
|
+
* Requests or checks a Desktop Recording SDK permission.
|
|
484
|
+
*
|
|
485
|
+
* macOS may display a system prompt or open the relevant System Settings pane. Observe
|
|
486
|
+
* `permission-status` for the resulting state; promise resolution does not by itself mean the user
|
|
487
|
+
* granted access. Windows does not require these macOS permissions and reports requests as granted.
|
|
488
|
+
*
|
|
489
|
+
* Request `teams-automation` and `browser-automation` only from an explicit user interaction and
|
|
490
|
+
* before a meeting starts. Automation setup may restart Teams or the supported default browser and
|
|
491
|
+
* must not be requested through `acquirePermissionsOnStartup`.
|
|
492
|
+
*
|
|
493
|
+
* @param permission Permission to request.
|
|
494
|
+
* @returns `null` after the request is accepted.
|
|
495
|
+
* @throws If the SDK is not running or the request cannot be delivered.
|
|
496
|
+
* @see https://docs.recall.ai/docs/macos-permissions
|
|
497
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
498
|
+
*/
|
|
150
499
|
export declare function requestPermission(permission: Permission): Promise<null>;
|
|
500
|
+
/**
|
|
501
|
+
* Forces the native SDK process to exit unexpectedly for restart and error-handling tests.
|
|
502
|
+
*
|
|
503
|
+
* This is an internal test API and should never be called by production integrations.
|
|
504
|
+
*
|
|
505
|
+
* @returns A promise that normally rejects when the forced shutdown closes the native process.
|
|
506
|
+
*/
|
|
151
507
|
export declare function testUnexpectedShutdown(): Promise<null>;
|
|
508
|
+
/**
|
|
509
|
+
* Registers an in-process listener for a Desktop Recording SDK event.
|
|
510
|
+
*
|
|
511
|
+
* Register important listeners before calling {@link init} so they receive initial permission and
|
|
512
|
+
* already-active meeting events. A listener remains registered across automatic native-process
|
|
513
|
+
* restarts until explicitly removed.
|
|
514
|
+
*
|
|
515
|
+
* @param type Event name.
|
|
516
|
+
* @param callback Function invoked synchronously for each matching event payload.
|
|
517
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-event-types
|
|
518
|
+
*/
|
|
152
519
|
export declare function addEventListener<T extends keyof EventTypeToPayloadMap>(type: T, callback: (event: EventTypeToPayloadMap[T]) => void): void;
|
|
520
|
+
/**
|
|
521
|
+
* Removes one event listener previously registered with {@link addEventListener}.
|
|
522
|
+
*
|
|
523
|
+
* The callback must be the same function reference used during registration. If the listener is
|
|
524
|
+
* not registered, this method has no effect.
|
|
525
|
+
*
|
|
526
|
+
* @param type Event name used during registration.
|
|
527
|
+
* @param callback Original callback function reference.
|
|
528
|
+
*/
|
|
153
529
|
export declare function removeEventListener<T extends keyof EventTypeToPayloadMap>(type: T, callback: (event: EventTypeToPayloadMap[T]) => void): void;
|
|
530
|
+
/**
|
|
531
|
+
* Removes every event listener registered through this module.
|
|
532
|
+
*
|
|
533
|
+
* This affects all event types and does not stop or shut down the SDK.
|
|
534
|
+
*/
|
|
154
535
|
export declare function removeAllEventListeners(): void;
|
|
536
|
+
/**
|
|
537
|
+
* Desktop Recording SDK API.
|
|
538
|
+
*
|
|
539
|
+
* The same functions are also available as named exports.
|
|
540
|
+
*/
|
|
155
541
|
declare const RecallAiSdk: {
|
|
156
542
|
init: typeof init;
|
|
157
543
|
shutdown: typeof shutdown;
|
|
@@ -159,8 +545,11 @@ declare const RecallAiSdk: {
|
|
|
159
545
|
stopRecording: typeof stopRecording;
|
|
160
546
|
pauseRecording: typeof pauseRecording;
|
|
161
547
|
resumeRecording: typeof resumeRecording;
|
|
548
|
+
sendChatMessage: typeof sendChatMessage;
|
|
162
549
|
uploadRecording: typeof uploadRecording;
|
|
163
550
|
prepareDesktopAudioRecording: typeof prepareDesktopAudioRecording;
|
|
551
|
+
listDevices: typeof listDevices;
|
|
552
|
+
setDesktopAudioDevice: typeof setDesktopAudioDevice;
|
|
164
553
|
requestPermission: typeof requestPermission;
|
|
165
554
|
addEventListener: typeof addEventListener;
|
|
166
555
|
removeEventListener: typeof removeEventListener;
|
package/index.js
CHANGED
|
@@ -41,8 +41,11 @@ exports.startRecording = startRecording;
|
|
|
41
41
|
exports.stopRecording = stopRecording;
|
|
42
42
|
exports.pauseRecording = pauseRecording;
|
|
43
43
|
exports.resumeRecording = resumeRecording;
|
|
44
|
+
exports.sendChatMessage = sendChatMessage;
|
|
44
45
|
exports.uploadRecording = uploadRecording;
|
|
45
46
|
exports.prepareDesktopAudioRecording = prepareDesktopAudioRecording;
|
|
47
|
+
exports.listDevices = listDevices;
|
|
48
|
+
exports.setDesktopAudioDevice = setDesktopAudioDevice;
|
|
46
49
|
exports.requestPermission = requestPermission;
|
|
47
50
|
exports.testUnexpectedShutdown = testUnexpectedShutdown;
|
|
48
51
|
exports.addEventListener = addEventListener;
|
|
@@ -593,6 +596,19 @@ async function doInit(options) {
|
|
|
593
596
|
await sendCommand("init", { config: JSON.stringify(options) });
|
|
594
597
|
flushLogBuffer();
|
|
595
598
|
}
|
|
599
|
+
/**
|
|
600
|
+
* Starts the native Desktop Recording SDK process and begins meeting detection.
|
|
601
|
+
*
|
|
602
|
+
* Call this once during application startup, after registering any listeners that must observe
|
|
603
|
+
* initial permission and meeting-detection events. Supported on macOS and Windows; Linux is not
|
|
604
|
+
* supported. The returned promise resolves after the native process accepts its configuration.
|
|
605
|
+
*
|
|
606
|
+
* @param options SDK initialization and region configuration.
|
|
607
|
+
* @returns `null` after initialization succeeds.
|
|
608
|
+
* @throws If the platform is unsupported, the API URL is invalid, or the native SDK cannot start.
|
|
609
|
+
* @see https://docs.recall.ai/docs/desktop-sdk
|
|
610
|
+
* @see https://docs.recall.ai/docs/dsdk-supported-platforms
|
|
611
|
+
*/
|
|
596
612
|
async function init(options) {
|
|
597
613
|
if (process.platform !== "darwin" && process.platform !== "win32") {
|
|
598
614
|
throw new Error(`Platform ${process.platform} is not supported by Desktop SDK`);
|
|
@@ -611,6 +627,15 @@ async function init(options) {
|
|
|
611
627
|
await doInit(initConfig);
|
|
612
628
|
return null;
|
|
613
629
|
}
|
|
630
|
+
/**
|
|
631
|
+
* Gracefully stops active SDK work and terminates the native Desktop Recording SDK process.
|
|
632
|
+
*
|
|
633
|
+
* Supported on macOS and Windows. Call {@link init} again before issuing more SDK commands. This
|
|
634
|
+
* method waits for the process to exit and force-terminates it after five seconds if necessary.
|
|
635
|
+
*
|
|
636
|
+
* @returns `null` after shutdown has been acknowledged.
|
|
637
|
+
* @throws If the SDK is not running or the shutdown command fails.
|
|
638
|
+
*/
|
|
614
639
|
async function shutdown() {
|
|
615
640
|
const result = await sendCommand("shutdown");
|
|
616
641
|
if (proc) {
|
|
@@ -631,51 +656,240 @@ async function shutdown() {
|
|
|
631
656
|
}
|
|
632
657
|
return result;
|
|
633
658
|
}
|
|
659
|
+
/**
|
|
660
|
+
* Produces a diagnostic macOS accessibility-tree dump for a running application.
|
|
661
|
+
*
|
|
662
|
+
* This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
|
|
663
|
+
* production integrations.
|
|
664
|
+
*
|
|
665
|
+
* @param procName Name of the process to inspect.
|
|
666
|
+
* @returns The native diagnostic command result.
|
|
667
|
+
*/
|
|
634
668
|
function dumpAXTree(procName) {
|
|
635
669
|
return sendCommand("dumpAXTree", { procName });
|
|
636
670
|
}
|
|
671
|
+
/**
|
|
672
|
+
* Produces diagnostic information about applications visible to macOS accessibility APIs.
|
|
673
|
+
*
|
|
674
|
+
* This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
|
|
675
|
+
* production integrations.
|
|
676
|
+
*
|
|
677
|
+
* @returns The native diagnostic command result.
|
|
678
|
+
*/
|
|
637
679
|
function dumpAllApplications() {
|
|
638
680
|
return sendCommand("dumpAllApplications", {});
|
|
639
681
|
}
|
|
682
|
+
/**
|
|
683
|
+
* Starts recording a detected meeting or a source returned by
|
|
684
|
+
* {@link prepareDesktopAudioRecording}.
|
|
685
|
+
*
|
|
686
|
+
* Supported on macOS and Windows. `windowId` must come from the SDK and `uploadToken` must come
|
|
687
|
+
* from a newly created Desktop SDK Upload. On supported macOS meeting platforms, the SDK uses Raw
|
|
688
|
+
* Media when it is enabled and available; otherwise it records locally. Resolve capture mode from
|
|
689
|
+
* `recording-started.rawMedia` rather than predicting it from configuration.
|
|
690
|
+
*
|
|
691
|
+
* The returned promise only confirms that the start command was accepted. Listen for
|
|
692
|
+
* `recording-started` to confirm that media capture began and `error` for asynchronous failures.
|
|
693
|
+
* Starting a different recording stops the currently active recording.
|
|
694
|
+
*
|
|
695
|
+
* @param config Meeting/source ID, upload token, and optional Raw Media override.
|
|
696
|
+
* @returns `null` after the start command is accepted.
|
|
697
|
+
* @throws If the source is unknown, already recorded, permissions are insufficient, or startup fails.
|
|
698
|
+
* @see https://docs.recall.ai/docs/desktop-sdk
|
|
699
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
700
|
+
*/
|
|
640
701
|
function startRecording(config) {
|
|
641
702
|
return sendCommand("startRecording", { config: JSON.stringify(config) });
|
|
642
703
|
}
|
|
704
|
+
/**
|
|
705
|
+
* Stops the active recording for a meeting or prepared desktop-audio source.
|
|
706
|
+
*
|
|
707
|
+
* Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. The
|
|
708
|
+
* returned promise confirms command handling, not completion of cloud artifact processing. Listen
|
|
709
|
+
* for `recording-ended` for capture completion and use Desktop SDK Upload webhooks for final upload
|
|
710
|
+
* status.
|
|
711
|
+
*
|
|
712
|
+
* @param config ID originally passed to {@link startRecording}.
|
|
713
|
+
* @returns `null` after the stop command is handled.
|
|
714
|
+
* @throws If the SDK is not running or the command cannot be delivered.
|
|
715
|
+
*/
|
|
643
716
|
function stopRecording({ windowId }) {
|
|
644
717
|
return sendCommand("stopRecording", { windowId });
|
|
645
718
|
}
|
|
719
|
+
/**
|
|
720
|
+
* Pauses media capture for an active recording without ending the recording.
|
|
721
|
+
*
|
|
722
|
+
* Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
|
|
723
|
+
* the same `windowId` that was passed to {@link startRecording}. Call {@link resumeRecording} to
|
|
724
|
+
* continue the recording.
|
|
725
|
+
*
|
|
726
|
+
* @param config Active recording ID.
|
|
727
|
+
* @returns `null` after the pause command is handled.
|
|
728
|
+
* @throws If the SDK is not running or the command cannot be delivered.
|
|
729
|
+
*/
|
|
646
730
|
function pauseRecording({ windowId }) {
|
|
647
731
|
return sendCommand("pauseRecording", { windowId });
|
|
648
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* Resumes media capture for a paused recording.
|
|
735
|
+
*
|
|
736
|
+
* Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
|
|
737
|
+
* the same `windowId` that was passed to {@link startRecording}.
|
|
738
|
+
*
|
|
739
|
+
* @param config Paused recording ID.
|
|
740
|
+
* @returns `null` after the resume command is handled.
|
|
741
|
+
* @throws If the SDK is not running or the command cannot be delivered.
|
|
742
|
+
*/
|
|
649
743
|
function resumeRecording({ windowId }) {
|
|
650
744
|
return sendCommand("resumeRecording", { windowId });
|
|
651
745
|
}
|
|
652
746
|
/**
|
|
653
|
-
*
|
|
747
|
+
* Sends a chat message through an active Desktop SDK Raw Media recording.
|
|
748
|
+
*
|
|
749
|
+
* Supported for Microsoft Teams Desktop and supported Chromium-based Google Meet browsers on
|
|
750
|
+
* macOS when `recording-started.rawMedia` is `true`. This method is not available for local
|
|
751
|
+
* recordings or on Windows. The returned promise confirms that the message was accepted and queued
|
|
752
|
+
* for the Raw Media connection; it does not confirm that the meeting platform displayed it.
|
|
753
|
+
*
|
|
754
|
+
* @param config Active Raw Media recording ID, message, recipient, and pin behavior.
|
|
755
|
+
* @returns `null` after the message is queued.
|
|
756
|
+
* @throws If the message is empty or exceeds 4,096 characters, the recipient is empty, or no Raw
|
|
757
|
+
* Media recording is active for `windowId`.
|
|
758
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
759
|
+
*/
|
|
760
|
+
function sendChatMessage({ windowId, message, to = "everyone", pin = false, }) {
|
|
761
|
+
return sendCommand("sendChatMessage", { windowId, message, to, pin });
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Legacy no-op retained for backwards compatibility.
|
|
765
|
+
*
|
|
766
|
+
* Recordings upload automatically according to their retention configuration. Observe Desktop SDK
|
|
767
|
+
* Upload webhooks instead of calling this method.
|
|
768
|
+
*
|
|
769
|
+
* @deprecated Recordings upload automatically; this method does nothing.
|
|
770
|
+
* @param config Legacy recording identifier. The value is ignored.
|
|
771
|
+
* @returns `null` after the no-op command is handled.
|
|
654
772
|
*/
|
|
655
773
|
function uploadRecording({ windowId }) {
|
|
656
774
|
return sendCommand("uploadRecording", { windowId });
|
|
657
775
|
}
|
|
776
|
+
/**
|
|
777
|
+
* Prepares an audio-only source for an in-person or whole-desktop recording.
|
|
778
|
+
*
|
|
779
|
+
* Supported on macOS and Windows. This does not start recording: pass the returned ID to
|
|
780
|
+
* {@link startRecording} with a Desktop SDK Upload token. On Windows, audio devices selected with
|
|
781
|
+
* {@link setDesktopAudioDevice} apply to this source. Device selection does not affect detected
|
|
782
|
+
* meeting recordings.
|
|
783
|
+
*
|
|
784
|
+
* @param config Optional internal compatibility settings. Most integrations should omit this.
|
|
785
|
+
* @returns A generated source ID to pass as `windowId` to {@link startRecording}.
|
|
786
|
+
* @throws If the SDK cannot prepare desktop audio capture.
|
|
787
|
+
* @see https://docs.recall.ai/docs/adhoc-meetings-in-person-meetings
|
|
788
|
+
*/
|
|
658
789
|
function prepareDesktopAudioRecording(config) {
|
|
659
790
|
return sendCommand("prepareDesktopAudioRecording", { ...config });
|
|
660
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* Lists the audio devices that can be selected for recordings created with
|
|
794
|
+
* {@link prepareDesktopAudioRecording}. This API is only for
|
|
795
|
+
* `prepareDesktopAudioRecording` recordings, does not affect detected meeting recordings, and
|
|
796
|
+
* is only available on Windows.
|
|
797
|
+
*
|
|
798
|
+
* @returns The active Windows audio input and output devices.
|
|
799
|
+
* @throws On macOS, or when Windows audio endpoints cannot be enumerated.
|
|
800
|
+
*/
|
|
801
|
+
function listDevices() {
|
|
802
|
+
return sendCommand("listDevices");
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Selects an audio device for recordings created with {@link prepareDesktopAudioRecording}.
|
|
806
|
+
* This API is only for `prepareDesktopAudioRecording` recordings and does not affect detected
|
|
807
|
+
* meeting recordings. It is only available on Windows. Pass `null` to restore automatic device
|
|
808
|
+
* selection for the direction.
|
|
809
|
+
*
|
|
810
|
+
* A selection applies to subsequently prepared desktop-audio recordings and, when supported, the
|
|
811
|
+
* currently prepared desktop-audio source.
|
|
812
|
+
*
|
|
813
|
+
* @param id Device ID from {@link listDevices}, or `null` to use automatic selection.
|
|
814
|
+
* @param dir Whether to select the input or output endpoint.
|
|
815
|
+
* @returns `null` after the selection is applied.
|
|
816
|
+
* @throws On macOS, for an invalid device ID, or when the selection cannot be applied.
|
|
817
|
+
*/
|
|
818
|
+
function setDesktopAudioDevice(id, dir) {
|
|
819
|
+
return sendCommand("setDesktopAudioDevice", { id, dir });
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Requests or checks a Desktop Recording SDK permission.
|
|
823
|
+
*
|
|
824
|
+
* macOS may display a system prompt or open the relevant System Settings pane. Observe
|
|
825
|
+
* `permission-status` for the resulting state; promise resolution does not by itself mean the user
|
|
826
|
+
* granted access. Windows does not require these macOS permissions and reports requests as granted.
|
|
827
|
+
*
|
|
828
|
+
* Request `teams-automation` and `browser-automation` only from an explicit user interaction and
|
|
829
|
+
* before a meeting starts. Automation setup may restart Teams or the supported default browser and
|
|
830
|
+
* must not be requested through `acquirePermissionsOnStartup`.
|
|
831
|
+
*
|
|
832
|
+
* @param permission Permission to request.
|
|
833
|
+
* @returns `null` after the request is accepted.
|
|
834
|
+
* @throws If the SDK is not running or the request cannot be delivered.
|
|
835
|
+
* @see https://docs.recall.ai/docs/macos-permissions
|
|
836
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
|
|
837
|
+
*/
|
|
661
838
|
function requestPermission(permission) {
|
|
662
839
|
return sendCommand("requestPermission", { permission });
|
|
663
840
|
}
|
|
841
|
+
/**
|
|
842
|
+
* Forces the native SDK process to exit unexpectedly for restart and error-handling tests.
|
|
843
|
+
*
|
|
844
|
+
* This is an internal test API and should never be called by production integrations.
|
|
845
|
+
*
|
|
846
|
+
* @returns A promise that normally rejects when the forced shutdown closes the native process.
|
|
847
|
+
*/
|
|
664
848
|
function testUnexpectedShutdown() {
|
|
665
849
|
return sendCommand("unexpectedShutdown", {});
|
|
666
850
|
}
|
|
851
|
+
/**
|
|
852
|
+
* Registers an in-process listener for a Desktop Recording SDK event.
|
|
853
|
+
*
|
|
854
|
+
* Register important listeners before calling {@link init} so they receive initial permission and
|
|
855
|
+
* already-active meeting events. A listener remains registered across automatic native-process
|
|
856
|
+
* restarts until explicitly removed.
|
|
857
|
+
*
|
|
858
|
+
* @param type Event name.
|
|
859
|
+
* @param callback Function invoked synchronously for each matching event payload.
|
|
860
|
+
* @see https://docs.recall.ai/docs/desktop-recording-sdk-event-types
|
|
861
|
+
*/
|
|
667
862
|
function addEventListener(type, callback) {
|
|
668
863
|
listeners.push({ type, callback });
|
|
669
864
|
}
|
|
865
|
+
/**
|
|
866
|
+
* Removes one event listener previously registered with {@link addEventListener}.
|
|
867
|
+
*
|
|
868
|
+
* The callback must be the same function reference used during registration. If the listener is
|
|
869
|
+
* not registered, this method has no effect.
|
|
870
|
+
*
|
|
871
|
+
* @param type Event name used during registration.
|
|
872
|
+
* @param callback Original callback function reference.
|
|
873
|
+
*/
|
|
670
874
|
function removeEventListener(type, callback) {
|
|
671
875
|
const index = listeners.findIndex(l => l.type === type && l.callback === callback);
|
|
672
876
|
if (index !== -1) {
|
|
673
877
|
listeners.splice(index, 1);
|
|
674
878
|
}
|
|
675
879
|
}
|
|
880
|
+
/**
|
|
881
|
+
* Removes every event listener registered through this module.
|
|
882
|
+
*
|
|
883
|
+
* This affects all event types and does not stop or shut down the SDK.
|
|
884
|
+
*/
|
|
676
885
|
function removeAllEventListeners() {
|
|
677
886
|
listeners.length = 0;
|
|
678
887
|
}
|
|
888
|
+
/**
|
|
889
|
+
* Desktop Recording SDK API.
|
|
890
|
+
*
|
|
891
|
+
* The same functions are also available as named exports.
|
|
892
|
+
*/
|
|
679
893
|
const RecallAiSdk = {
|
|
680
894
|
init,
|
|
681
895
|
shutdown,
|
|
@@ -683,8 +897,11 @@ const RecallAiSdk = {
|
|
|
683
897
|
stopRecording,
|
|
684
898
|
pauseRecording,
|
|
685
899
|
resumeRecording,
|
|
900
|
+
sendChatMessage,
|
|
686
901
|
uploadRecording,
|
|
687
902
|
prepareDesktopAudioRecording,
|
|
903
|
+
listDevices,
|
|
904
|
+
setDesktopAudioDevice,
|
|
688
905
|
requestPermission,
|
|
689
906
|
addEventListener,
|
|
690
907
|
removeEventListener,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recallai/desktop-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33",
|
|
4
4
|
"description": "Recall Desktop SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"@types/node": "^24.2.0",
|
|
21
21
|
"typescript": "^5.3.3"
|
|
22
22
|
},
|
|
23
|
-
"commit_sha": "
|
|
23
|
+
"commit_sha": "93b0c1105134c3bbe056f04f13ec588d11e2aa3f"
|
|
24
24
|
}
|