@nonstrict/recordkit 0.72.1 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/License.md +1 -1
- package/Readme.md +4 -4
- package/bin/README.md +1 -1
- package/bin/recordkit-rpc +0 -0
- package/out/RecordKit.d.ts +1 -1
- package/out/RecordKit.js +1 -1
- package/out/Recorder.d.ts +44 -0
- package/out/index.cjs +1 -1
- package/out/index.cjs.map +1 -1
- package/package.json +2 -2
- package/src/RecordKit.ts +5 -5
- package/src/Recorder.ts +52 -6
- package/typedoc.json +2 -2
package/License.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
RecordKit is a commercial product that offers a free trial license to evaluate and integrate it into your product. Visit [our website](https://
|
|
1
|
+
RecordKit is a commercial product that offers a free trial license to evaluate and integrate it into your product. Visit [our website](https://recordkit.dev) to learn more about licensing our solution.
|
|
2
2
|
|
|
3
3
|
All rights reserved by Nonstrict B.V.
|
package/Readme.md
CHANGED
|
@@ -4,13 +4,13 @@ RecordKit is a screen recording SDK for macOS apps. Enabling simultaneous record
|
|
|
4
4
|
|
|
5
5
|
## Useful links
|
|
6
6
|
|
|
7
|
-
- [RecordKit Homepage](https://
|
|
8
|
-
- [Getting Started](https://
|
|
9
|
-
- [Full API Reference](https://
|
|
7
|
+
- [RecordKit Homepage](https://recordkit.dev)
|
|
8
|
+
- [Getting Started](https://recordkit.dev/try-electron.html)
|
|
9
|
+
- [Full API Reference](https://recordkit.dev/api/electron/)
|
|
10
10
|
- [NPM package](https://www.npmjs.com/package/@nonstrict/recordkit)
|
|
11
11
|
|
|
12
12
|
## License
|
|
13
13
|
|
|
14
|
-
RecordKit is a commercial product that offers a free trial license to evaluate and integrate it into your product. Visit [our website](https://
|
|
14
|
+
RecordKit is a commercial product that offers a free trial license to evaluate and integrate it into your product. Visit [our website](https://recordkit.dev) to learn more about licensing our solution.
|
|
15
15
|
|
|
16
16
|
Copyright © 2024 Nonstrict B.V.
|
package/bin/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# recordkit-rpc 0.
|
|
1
|
+
# recordkit-rpc 0.73.0
|
package/bin/recordkit-rpc
CHANGED
|
Binary file
|
package/out/RecordKit.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { EventEmitter } from "events";
|
|
|
11
11
|
* Check and request the apps permission to access the recording devices.
|
|
12
12
|
*
|
|
13
13
|
* @groupDescription Logging
|
|
14
|
-
* Log what's going on to the console for easy debugging and troubleshooting.
|
|
14
|
+
* Log what's going on to the console for easy debugging and troubleshooting. See the [Logging and Error Handling guide](https://recordkit.dev/guides/logging-and-errors) for more information.
|
|
15
15
|
*/
|
|
16
16
|
export declare class RecordKit extends EventEmitter {
|
|
17
17
|
private ipcRecordKit;
|
package/out/RecordKit.js
CHANGED
|
@@ -12,7 +12,7 @@ import { existsSync } from "node:fs";
|
|
|
12
12
|
* Check and request the apps permission to access the recording devices.
|
|
13
13
|
*
|
|
14
14
|
* @groupDescription Logging
|
|
15
|
-
* Log what's going on to the console for easy debugging and troubleshooting.
|
|
15
|
+
* Log what's going on to the console for easy debugging and troubleshooting. See the [Logging and Error Handling guide](https://recordkit.dev/guides/logging-and-errors) for more information.
|
|
16
16
|
*/
|
|
17
17
|
export class RecordKit extends EventEmitter {
|
|
18
18
|
ipcRecordKit = new IpcRecordKit();
|
package/out/Recorder.d.ts
CHANGED
|
@@ -49,6 +49,10 @@ export interface WebcamSchema {
|
|
|
49
49
|
export type DisplaySchema = {
|
|
50
50
|
type: 'display';
|
|
51
51
|
display: Display | number;
|
|
52
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
53
|
+
colorSpace?: ColorSpace;
|
|
54
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
55
|
+
videoCodec?: VideoCodec;
|
|
52
56
|
shows_cursor?: boolean;
|
|
53
57
|
mouse_events?: boolean;
|
|
54
58
|
keyboard_events?: boolean;
|
|
@@ -58,6 +62,10 @@ export type DisplaySchema = {
|
|
|
58
62
|
} | {
|
|
59
63
|
type: 'display';
|
|
60
64
|
display: Display | number;
|
|
65
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
66
|
+
colorSpace?: ColorSpace;
|
|
67
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
68
|
+
videoCodec?: VideoCodec;
|
|
61
69
|
shows_cursor?: boolean;
|
|
62
70
|
mouse_events?: boolean;
|
|
63
71
|
keyboard_events?: boolean;
|
|
@@ -74,6 +82,10 @@ export type DisplaySchema = {
|
|
|
74
82
|
export type WindowBasedCropSchema = {
|
|
75
83
|
type: 'windowBasedCrop';
|
|
76
84
|
window: Window | number;
|
|
85
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
86
|
+
colorSpace?: ColorSpace;
|
|
87
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
88
|
+
videoCodec?: VideoCodec;
|
|
77
89
|
shows_cursor?: boolean;
|
|
78
90
|
mouse_events?: boolean;
|
|
79
91
|
keyboard_events?: boolean;
|
|
@@ -82,6 +94,10 @@ export type WindowBasedCropSchema = {
|
|
|
82
94
|
} | {
|
|
83
95
|
type: 'windowBasedCrop';
|
|
84
96
|
window: Window | number;
|
|
97
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
98
|
+
colorSpace?: ColorSpace;
|
|
99
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
100
|
+
videoCodec?: VideoCodec;
|
|
85
101
|
shows_cursor?: boolean;
|
|
86
102
|
mouse_events?: boolean;
|
|
87
103
|
keyboard_events?: boolean;
|
|
@@ -99,6 +115,25 @@ export interface AppleDeviceStaticOrientationSchema {
|
|
|
99
115
|
filename?: string;
|
|
100
116
|
device: AppleDevice | string;
|
|
101
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Video codec for screen recording.
|
|
120
|
+
* - `h264`: H.264/AVC codec - most compatible, works on all devices.
|
|
121
|
+
* - `hevc`: H.265/HEVC codec - smaller file sizes, requires newer devices for playback.
|
|
122
|
+
*
|
|
123
|
+
* @group Recording Schemas
|
|
124
|
+
*/
|
|
125
|
+
export type VideoCodec = 'h264' | 'hevc';
|
|
126
|
+
/**
|
|
127
|
+
* Color space for screen recording.
|
|
128
|
+
* - `sRGB`: Standard RGB color space, compatible with all modern displays.
|
|
129
|
+
* - `displayP3`: Display P3 color space, used in high-end Apple displays for wide gamut colors.
|
|
130
|
+
*
|
|
131
|
+
* Note: Display P3 is only supported with HEVC codec. If Display P3 is requested with H.264,
|
|
132
|
+
* it will automatically fall back to sRGB.
|
|
133
|
+
*
|
|
134
|
+
* @group Recording Schemas
|
|
135
|
+
*/
|
|
136
|
+
export type ColorSpace = 'sRGB' | 'displayP3';
|
|
102
137
|
/**
|
|
103
138
|
* @group Recording Schemas
|
|
104
139
|
*/
|
|
@@ -267,11 +302,20 @@ export interface RecordingResult {
|
|
|
267
302
|
url: string;
|
|
268
303
|
info: BundleInfo;
|
|
269
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* Errors produced by RecordKit include user-friendly messages suitable for display in your UI.
|
|
307
|
+
*
|
|
308
|
+
* See the [Logging and Error Handling guide](https://recordkit.dev/guides/logging-and-errors#error-handling) for more information.
|
|
309
|
+
*/
|
|
270
310
|
export interface RecordKitError {
|
|
271
311
|
name: "RecordKitError";
|
|
312
|
+
/** Error code, used for grouping related errors */
|
|
272
313
|
code: string;
|
|
314
|
+
/** Error code number */
|
|
273
315
|
codeNumber: number;
|
|
316
|
+
/** Message describing the problem and possible recovery options, intended to be shown directly to the end-user. */
|
|
274
317
|
message: string;
|
|
318
|
+
/** Detailed technical description of this error, used in debugging */
|
|
275
319
|
debugDescription: string;
|
|
276
320
|
}
|
|
277
321
|
/**
|
package/out/index.cjs
CHANGED
|
@@ -452,7 +452,7 @@ class Recorder extends events.EventEmitter {
|
|
|
452
452
|
* Check and request the apps permission to access the recording devices.
|
|
453
453
|
*
|
|
454
454
|
* @groupDescription Logging
|
|
455
|
-
* Log what's going on to the console for easy debugging and troubleshooting.
|
|
455
|
+
* Log what's going on to the console for easy debugging and troubleshooting. See the [Logging and Error Handling guide](https://recordkit.dev/guides/logging-and-errors) for more information.
|
|
456
456
|
*/
|
|
457
457
|
class RecordKit extends events.EventEmitter {
|
|
458
458
|
ipcRecordKit = new IpcRecordKit();
|
package/out/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["finalizationRegistry.js","NonstrictRPC.js","IpcRecordKit.js","Recorder.js","RecordKit.js"],"sourcesContent":["export const finalizationRegistry = new FinalizationRegistry(async (destructor) => { await destructor(); });\n//# sourceMappingURL=finalizationRegistry.js.map","import { randomUUID } from \"crypto\";\nimport { finalizationRegistry } from \"./finalizationRegistry.js\";\nexport class NSRPC {\n logMessages = false;\n send;\n responseHandlers = new Map();\n closureTargets = new Map();\n constructor(send) {\n this.send = send;\n }\n receive(data) {\n // TODO: For now we just assume the message is a valid NSRPC message, but we should:\n // - Check if the nsrpc property is set to a number in the range of 1..<2\n // - Validate the message against the defined interfaces above\n let message;\n try {\n if (this.logMessages) {\n console.log(\"RecordKit: [RPC] <\", data.trimEnd());\n }\n message = JSON.parse(data);\n }\n catch (error) {\n if (this.logMessages) {\n console.error(\"RecordKit: [RPC] !! Above message is invalid JSON, will be ignored.\");\n }\n return;\n }\n if (\"status\" in message) {\n // This is a response, dispatch it so it can be handled\n const responseHandler = this.responseHandlers.get(message.id);\n this.responseHandlers.delete(message.id);\n if (responseHandler === undefined) {\n console.error(\"RecordKit: [RPC] !! Got a response for an unknown request.\", message.id);\n return;\n }\n if (\"error\" in message) {\n responseHandler.reject(message.error);\n }\n else {\n responseHandler.resolve(message.result);\n }\n }\n else {\n // This is a request\n const responseBody = this.handleRequest(message);\n if (responseBody !== undefined) {\n this.sendResponse(message.id, responseBody);\n }\n }\n }\n /* Sending helpers */\n sendMessage(message) {\n const stringMessage = JSON.stringify(message);\n if (this.logMessages) {\n console.log(\"RecordKit: [RPC] >\", stringMessage);\n }\n this.send(stringMessage);\n }\n sendResponse(id, response) {\n if (id === undefined) {\n return;\n }\n this.sendMessage({ ...response, nsrpc: 1, id });\n }\n async sendRequest(request) {\n const id = \"req_\" + randomUUID();\n const response = new Promise((resolve, reject) => {\n this.responseHandlers.set(id, { resolve, reject });\n });\n this.sendMessage({ ...request, nsrpc: 1, id });\n return response;\n }\n /* Request handling */\n handleRequest(request) {\n switch (request.procedure) {\n case \"init\":\n return {\n status: 501,\n error: {\n debugDescription: \"Init procedure not implemented.\",\n userMessage: \"Failed to communicate with external process. (Procedure not implemented)\",\n },\n };\n case \"perform\":\n if (\"action\" in request) {\n return {\n status: 501,\n error: {\n debugDescription: \"Perform procedure for (static) methods not implemented.\",\n userMessage: \"Failed to communicate with external process. (Procedure not implemented)\",\n },\n };\n }\n else {\n return this.handleClosureRequest(request);\n }\n case \"release\":\n return {\n status: 501,\n error: {\n debugDescription: \"Release procedure not implemented.\",\n userMessage: \"Failed to communicate with external process. (Procedure not implemented)\",\n },\n };\n }\n }\n handleClosureRequest(request) {\n const handler = this.closureTargets.get(request.target);\n if (handler === undefined) {\n return {\n status: 404,\n error: {\n debugDescription: `Perform target '${request.target}' not found.`,\n userMessage: \"Failed to communicate with external process. (Target not found)\",\n },\n };\n }\n try {\n const rawresult = handler(request.params ?? {});\n const result = rawresult === undefined ? undefined : rawresult;\n return {\n status: 200,\n result,\n };\n }\n catch (error) {\n return {\n status: 202,\n // TODO: Would be good to have an error type that we can throw that fills these fields more specifically. (But for now it doesn't matter since this is just communicated back the the CLI and not to the user.)\n error: {\n debugDescription: `${error}`,\n userMessage: \"Handler failed to perform request.\",\n underlyingError: error,\n },\n };\n }\n }\n /* Perform remote procedures */\n async initialize(args) {\n const target = args.target;\n finalizationRegistry.register(args.lifecycle, async () => {\n await this.release(target);\n });\n await this.sendRequest({\n target: args.target,\n type: args.type,\n params: args.params,\n procedure: \"init\",\n });\n }\n async perform(body) {\n return await this.sendRequest({\n ...body,\n procedure: \"perform\",\n });\n }\n async release(target) {\n await this.sendRequest({\n procedure: \"release\",\n target,\n });\n }\n async manualRelease(target) {\n await this.sendRequest({\n procedure: \"manual-release\",\n target,\n });\n }\n /* Register locally available targets/actions */\n registerClosure(options) {\n const target = `target_${options.prefix}_${randomUUID()}`;\n this.closureTargets.set(target, options.handler);\n finalizationRegistry.register(options.lifecycle, () => {\n this.closureTargets.delete(target);\n });\n return target;\n }\n}\n//# sourceMappingURL=NonstrictRPC.js.map","import { spawn } from 'node:child_process';\nimport * as readline from 'readline';\nimport { NSRPC } from \"./NonstrictRPC.js\";\nexport class IpcRecordKit {\n childProcess;\n nsrpc;\n constructor() {\n this.nsrpc = new NSRPC((message) => this.write(message));\n }\n async initialize(recordKitRpcPath, logMessages = false) {\n if (this.childProcess !== undefined) {\n throw new Error('RecordKit: [RPC] Already initialized.');\n }\n this.nsrpc.logMessages = logMessages;\n this.childProcess = await new Promise((resolve, reject) => {\n const childProcess = spawn(recordKitRpcPath, { stdio: ['pipe', 'pipe', logMessages ? 'pipe' : 'ignore'] });\n childProcess.on('close', (code, signal) => { console.error(`RecordKit: [RPC] Closed with code ${code} and signal ${signal}`); });\n childProcess.on('error', (error) => { reject(error); });\n childProcess.on('exit', (code, signal) => { console.error(`RecordKit: [RPC] Exited with code ${code} and signal ${signal}`); });\n childProcess.on('spawn', () => { resolve(childProcess); });\n });\n const { stdout, stderr } = this.childProcess;\n if (!stdout) {\n throw new Error('RecordKit: [RPC] !! No stdout stream on child process.');\n }\n readline.createInterface({ input: stdout }).on('line', (line) => {\n this.nsrpc.receive(line);\n });\n if (stderr) {\n readline.createInterface({ input: stderr }).on('line', (line) => {\n console.log(`RecordKit: [RPC] Lognoise on stderr: ${line}`);\n });\n }\n }\n write(message) {\n const stdin = this.childProcess?.stdin;\n if (!stdin) {\n throw new Error('RecordKit: [RPC] !! Missing stdin stream.');\n }\n stdin.write(message + \"\\n\");\n }\n}\n//# sourceMappingURL=IpcRecordKit.js.map","import { randomUUID } from \"crypto\";\nimport { EventEmitter } from \"events\";\n/**\n * Converts RPC audio buffer data to AudioStreamBuffer format\n * @internal\n */\nfunction convertRPCParamsToAudioStreamBuffer(params) {\n try {\n // params is the AudioBufferData directly from Swift\n const rawAudioBuffer = params;\n if (!rawAudioBuffer || !Array.isArray(rawAudioBuffer.channelData)) {\n console.error('RecordKit: Invalid audio buffer received from RPC');\n return null;\n }\n const channelData = [];\n for (const base64Data of rawAudioBuffer.channelData) {\n if (typeof base64Data !== 'string') {\n console.error('RecordKit: Invalid base64 data received');\n return null;\n }\n // Decode base64 to binary data\n const binaryString = atob(base64Data);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n // Convert bytes to Float32Array\n const float32Array = new Float32Array(bytes.buffer);\n channelData.push(float32Array);\n }\n const audioStreamBuffer = {\n sampleRate: rawAudioBuffer.sampleRate,\n numberOfChannels: rawAudioBuffer.numberOfChannels,\n numberOfFrames: rawAudioBuffer.numberOfFrames,\n channelData: channelData\n };\n return audioStreamBuffer;\n }\n catch (error) {\n console.error('RecordKit: Error processing audio stream buffer:', error);\n return null;\n }\n}\n/**\n * @group Recording\n */\nexport class Recorder extends EventEmitter {\n rpc;\n target;\n /** @ignore */\n static async newInstance(rpc, schema) {\n const target = 'Recorder_' + randomUUID();\n const object = new Recorder(rpc, target);\n schema.items.forEach(item => {\n if (item.type == 'webcam') {\n if (typeof item.camera != 'string') {\n item.camera = item.camera.id;\n }\n if (typeof item.microphone != 'string') {\n item.microphone = item.microphone.id;\n }\n }\n if (item.type == 'display') {\n if (typeof item.display != 'number') {\n item.display = item.display.id;\n }\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'Display.onSegment',\n lifecycle: object\n });\n }\n }\n if (item.type == 'windowBasedCrop') {\n if (typeof item.window != 'number') {\n item.window = item.window.id;\n }\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'Window.onSegment',\n lifecycle: object\n });\n }\n }\n if (item.type == 'appleDeviceStaticOrientation') {\n if (typeof item.device != 'string') {\n item.device = item.device.id;\n }\n }\n if (item.type == 'systemAudio') {\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'SystemAudio.onSegment',\n lifecycle: object\n });\n }\n if (item.output == 'stream' && item.streamCallback) {\n const streamHandler = item.streamCallback;\n item.streamCallback = rpc.registerClosure({\n handler: (params) => {\n const audioBuffer = convertRPCParamsToAudioStreamBuffer(params);\n if (audioBuffer) {\n streamHandler(audioBuffer);\n }\n },\n prefix: 'SystemAudioStream.onAudioBuffer',\n lifecycle: object\n });\n }\n }\n if (item.type == 'applicationAudio') {\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'ApplicationAudio.onSegment',\n lifecycle: object\n });\n }\n if (item.output == 'stream' && item.streamCallback) {\n const streamHandler = item.streamCallback;\n item.streamCallback = rpc.registerClosure({\n handler: (params) => {\n const audioBuffer = convertRPCParamsToAudioStreamBuffer(params);\n if (audioBuffer) {\n streamHandler(audioBuffer);\n }\n },\n prefix: 'ApplicationAudioStream.onAudioBuffer',\n lifecycle: object\n });\n }\n }\n if (item.type == 'microphone') {\n if (typeof item.microphone != 'string') {\n item.microphone = item.microphone.id;\n }\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'Microphone.onSegment',\n lifecycle: object\n });\n }\n if (item.output == 'stream' && item.streamCallback) {\n const streamHandler = item.streamCallback;\n item.streamCallback = rpc.registerClosure({\n handler: (params) => {\n const audioBuffer = convertRPCParamsToAudioStreamBuffer(params);\n if (audioBuffer) {\n streamHandler(audioBuffer);\n }\n },\n prefix: 'MicrophoneStream.onAudioBuffer',\n lifecycle: object\n });\n }\n }\n });\n const weakRefObject = new WeakRef(object);\n const onAbortInstance = rpc.registerClosure({\n handler: (params) => { weakRefObject.deref()?.emit('abort', params); },\n prefix: 'Recorder.onAbort',\n lifecycle: object\n });\n await rpc.initialize({\n target,\n type: 'Recorder',\n params: { schema, onAbortInstance },\n lifecycle: object\n });\n return object;\n }\n /** @ignore */\n constructor(rpc, target) {\n super();\n this.rpc = rpc;\n this.target = target;\n }\n async prepare() {\n await this.rpc.perform({ target: this.target, action: 'prepare' });\n }\n async start() {\n await this.rpc.perform({ target: this.target, action: 'start' });\n }\n async stop() {\n return await this.rpc.perform({ target: this.target, action: 'stop' });\n }\n async cancel() {\n await this.rpc.manualRelease(this.target);\n }\n}\n//# sourceMappingURL=Recorder.js.map","import { IpcRecordKit } from \"./IpcRecordKit.js\";\nimport { Recorder } from \"./Recorder.js\";\nimport { EventEmitter } from \"events\";\nimport { existsSync } from \"node:fs\";\n/**\n * Entry point for the RecordKit SDK, an instance is available as `recordkit` that can be imported from the module. Do not instantiate this class directly.\n *\n * @groupDescription Discovery\n * Discover the windows and devices that are available to record.\n *\n * @groupDescription Permissions\n * Check and request the apps permission to access the recording devices.\n *\n * @groupDescription Logging\n * Log what's going on to the console for easy debugging and troubleshooting.\n */\nexport class RecordKit extends EventEmitter {\n ipcRecordKit = new IpcRecordKit();\n /** @ignore */\n constructor() {\n super();\n }\n /**\n * Initialize the RecordKit SDK.\n *\n * ⚠️ Must be called before calling any other RecordKit method.\n *\n * @param args\n */\n async initialize(args) {\n let rpcBinaryPath = args.rpcBinaryPath;\n if (args.fallbackToNodeModules ?? true) {\n if (!existsSync(rpcBinaryPath)) {\n rpcBinaryPath = rpcBinaryPath.replace('node_modules/electron/dist/Electron.app/Contents/Resources', 'node_modules/@nonstrict/recordkit/bin');\n console.error(`RecordKit: [RPC] !! Falling back to RPC binary from node_modules at ${rpcBinaryPath}`);\n }\n }\n await this.ipcRecordKit.initialize(rpcBinaryPath, args.logRpcMessages);\n const logHandlerInstance = this.ipcRecordKit.nsrpc.registerClosure({\n handler: (params) => {\n console.log('RecordKit:', params.formattedMessage);\n this.emit('log', params);\n },\n prefix: 'RecordKit.logHandler',\n lifecycle: this\n });\n await this.ipcRecordKit.nsrpc.perform({ type: 'Logger', action: 'setLogHandler', params: { logHandlerInstance } });\n if (args.logLevel) {\n await this.setLogLevel(args.logLevel);\n }\n }\n /**\n * Set the global log level. Defaults to `debug`.\n *\n * Messages with a lower level than this will be ignored and not passed to any log handlers.\n *\n * @group Logging\n */\n async setLogLevel(logLevel) {\n await this.ipcRecordKit.nsrpc.perform({ type: 'Logger', action: 'setLogLevel', params: { logLevel } });\n }\n /**\n * Overrides the global log level for a specific category. Defaults to the global log level.\n *\n * Messages in the given category with a lower level than this will be ignored and not passed to any log handlers.\n *\n * @group Logging\n */\n async setCategoryLogLevel(params) {\n await this.ipcRecordKit.nsrpc.perform({ type: 'Logger', action: 'setLogLevel', params });\n }\n /**\n * A list of Mac displays that can be used for screen recording.\n *\n * @group Discovery\n */\n async getDisplays() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getDisplays' });\n }\n /**\n * A list of macOS windows that can be used for screen recording.\n *\n * @group Discovery\n */\n async getWindows() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getWindows' });\n }\n /**\n * A list of cameras that are connected to the system.\n *\n * @param params.includeDeskView - Whether to include Desk View cameras in the results\n * @group Discovery\n */\n async getCameras(params) {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getCameras', params: { includeDeskView: params?.includeDeskView ?? false } });\n }\n /**\n * A list of microphones that are connected to the system.\n *\n * @group Discovery\n */\n async getMicrophones() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getMicrophones' });\n }\n /**\n * A list of iOS devices that are connected to the system.\n *\n * @group Discovery\n */\n async getAppleDevices() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getAppleDevices' });\n }\n /**\n * A list of currently running applications that can be used for screen or audio recording.\n *\n * @group Discovery\n */\n async getRunningApplications() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getRunningApplications' });\n }\n /**\n * Indicates if camera can be used.\n *\n * Authorization status that indicates whether the user grants the app permission to capture video.\n *\n * @group Permissions\n */\n async getCameraAuthorizationStatus() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getCameraAuthorizationStatus' });\n }\n /**\n * Indicates if microphone can be used.\n *\n * Authorization status that indicates whether the user grants the app permission to capture audio.\n *\n * @group Permissions\n */\n async getMicrophoneAuthorizationStatus() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getMicrophoneAuthorizationStatus' });\n }\n /**\n * Indicates if screen can be recorded.\n *\n * @group Permissions\n */\n async getScreenRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getScreenRecordingAccess' });\n }\n /**\n * Indicates if system audio can be recorded.\n *\n * @group Permissions\n */\n async getSystemAudioRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getSystemAudioRecordingAccess' });\n }\n /**\n * Indicates if keystroke events of other apps can be recorded via Input Monitoring.\n *\n * @group Permissions\n */\n async getInputMonitoringAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getInputMonitoringAccess' });\n }\n /**\n * Indicates if other apps can be controlled via Accessibility.\n *\n * @group Permissions\n */\n async getAccessibilityControlAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getAccessibilityControlAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture the camera.\n *\n * Prompts the users if this is the first time requesting access, otherwise immediately returns.\n *\n * @returns Boolean value that indicates whether the user granted or denied access to your app.\n * @group Permissions\n */\n async requestCameraAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestCameraAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture the microphone.\n *\n * Prompts the users if this is the first time requesting access, otherwise immediately returns.\n *\n * @returns Boolean value that indicates whether the user granted or denied access to your app.\n * @group Permissions\n */\n async requestMicrophoneAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestMicrophoneAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture the screen.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to do screen recording.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @group Permissions\n */\n async requestScreenRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestScreenRecordingAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture system audio.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to do screen recording.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @remarks Currently, system audio recording is currently implemented using ScreenCaptureKit,\n * which means the users needs to grant screen recording access.\n *\n * @group Permissions\n */\n async requestSystemAudioRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestSystemAudioRecordingAccess' });\n }\n /**\n * Requests the users's permission to monitor keystrokes of other apps via Input Monitoring.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to monitor other apps.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @group Permissions\n */\n async requestInputMonitoringAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestInputMonitoringAccess' });\n }\n /**\n * Requests the users's permission to control other apps via Accessibility permissions.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to control apps.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @group Permissions\n */\n async requestAccessibilityControlAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestAccessibilityControlAccess' });\n }\n async createRecorder(schema) {\n return Recorder.newInstance(this.ipcRecordKit.nsrpc, schema);\n }\n}\n/** @ignore */\nexport let recordkit = new RecordKit();\n//# sourceMappingURL=RecordKit.js.map"],"names":["randomUUID","spawn","readline","EventEmitter","existsSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,OAAO,UAAU,KAAK,EAAE,MAAM,UAAU,EAAE,CAAC,EAAE,CAAC;;ACEpG,MAAM,KAAK,CAAC;AACnB,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB,IAAI,IAAI,CAAC;AACT,IAAI,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;AACjC,IAAI,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;AAC/B,IAAI,WAAW,CAAC,IAAI,EAAE;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,KAAK;AACL,IAAI,OAAO,CAAC,IAAI,EAAE;AAClB;AACA;AACA;AACA,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI;AACZ,YAAY,IAAI,IAAI,CAAC,WAAW,EAAE;AAClC,gBAAgB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAClE,aAAa;AACb,YAAY,O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E,mCAAmC,EAAE,CAAC,CAAC;AACnI,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,MAAM,EAAE;AACjC,QAAQ,OAAO,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACrE,KAAK;AACL,CAAC;AACD;AACU,IAAC,SAAS,GAAG,IAAI,SAAS;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["finalizationRegistry.js","NonstrictRPC.js","IpcRecordKit.js","Recorder.js","RecordKit.js"],"sourcesContent":["export const finalizationRegistry = new FinalizationRegistry(async (destructor) => { await destructor(); });\n//# sourceMappingURL=finalizationRegistry.js.map","import { randomUUID } from \"crypto\";\nimport { finalizationRegistry } from \"./finalizationRegistry.js\";\nexport class NSRPC {\n logMessages = false;\n send;\n responseHandlers = new Map();\n closureTargets = new Map();\n constructor(send) {\n this.send = send;\n }\n receive(data) {\n // TODO: For now we just assume the message is a valid NSRPC message, but we should:\n // - Check if the nsrpc property is set to a number in the range of 1..<2\n // - Validate the message against the defined interfaces above\n let message;\n try {\n if (this.logMessages) {\n console.log(\"RecordKit: [RPC] <\", data.trimEnd());\n }\n message = JSON.parse(data);\n }\n catch (error) {\n if (this.logMessages) {\n console.error(\"RecordKit: [RPC] !! Above message is invalid JSON, will be ignored.\");\n }\n return;\n }\n if (\"status\" in message) {\n // This is a response, dispatch it so it can be handled\n const responseHandler = this.responseHandlers.get(message.id);\n this.responseHandlers.delete(message.id);\n if (responseHandler === undefined) {\n console.error(\"RecordKit: [RPC] !! Got a response for an unknown request.\", message.id);\n return;\n }\n if (\"error\" in message) {\n responseHandler.reject(message.error);\n }\n else {\n responseHandler.resolve(message.result);\n }\n }\n else {\n // This is a request\n const responseBody = this.handleRequest(message);\n if (responseBody !== undefined) {\n this.sendResponse(message.id, responseBody);\n }\n }\n }\n /* Sending helpers */\n sendMessage(message) {\n const stringMessage = JSON.stringify(message);\n if (this.logMessages) {\n console.log(\"RecordKit: [RPC] >\", stringMessage);\n }\n this.send(stringMessage);\n }\n sendResponse(id, response) {\n if (id === undefined) {\n return;\n }\n this.sendMessage({ ...response, nsrpc: 1, id });\n }\n async sendRequest(request) {\n const id = \"req_\" + randomUUID();\n const response = new Promise((resolve, reject) => {\n this.responseHandlers.set(id, { resolve, reject });\n });\n this.sendMessage({ ...request, nsrpc: 1, id });\n return response;\n }\n /* Request handling */\n handleRequest(request) {\n switch (request.procedure) {\n case \"init\":\n return {\n status: 501,\n error: {\n debugDescription: \"Init procedure not implemented.\",\n userMessage: \"Failed to communicate with external process. (Procedure not implemented)\",\n },\n };\n case \"perform\":\n if (\"action\" in request) {\n return {\n status: 501,\n error: {\n debugDescription: \"Perform procedure for (static) methods not implemented.\",\n userMessage: \"Failed to communicate with external process. (Procedure not implemented)\",\n },\n };\n }\n else {\n return this.handleClosureRequest(request);\n }\n case \"release\":\n return {\n status: 501,\n error: {\n debugDescription: \"Release procedure not implemented.\",\n userMessage: \"Failed to communicate with external process. (Procedure not implemented)\",\n },\n };\n }\n }\n handleClosureRequest(request) {\n const handler = this.closureTargets.get(request.target);\n if (handler === undefined) {\n return {\n status: 404,\n error: {\n debugDescription: `Perform target '${request.target}' not found.`,\n userMessage: \"Failed to communicate with external process. (Target not found)\",\n },\n };\n }\n try {\n const rawresult = handler(request.params ?? {});\n const result = rawresult === undefined ? undefined : rawresult;\n return {\n status: 200,\n result,\n };\n }\n catch (error) {\n return {\n status: 202,\n // TODO: Would be good to have an error type that we can throw that fills these fields more specifically. (But for now it doesn't matter since this is just communicated back the the CLI and not to the user.)\n error: {\n debugDescription: `${error}`,\n userMessage: \"Handler failed to perform request.\",\n underlyingError: error,\n },\n };\n }\n }\n /* Perform remote procedures */\n async initialize(args) {\n const target = args.target;\n finalizationRegistry.register(args.lifecycle, async () => {\n await this.release(target);\n });\n await this.sendRequest({\n target: args.target,\n type: args.type,\n params: args.params,\n procedure: \"init\",\n });\n }\n async perform(body) {\n return await this.sendRequest({\n ...body,\n procedure: \"perform\",\n });\n }\n async release(target) {\n await this.sendRequest({\n procedure: \"release\",\n target,\n });\n }\n async manualRelease(target) {\n await this.sendRequest({\n procedure: \"manual-release\",\n target,\n });\n }\n /* Register locally available targets/actions */\n registerClosure(options) {\n const target = `target_${options.prefix}_${randomUUID()}`;\n this.closureTargets.set(target, options.handler);\n finalizationRegistry.register(options.lifecycle, () => {\n this.closureTargets.delete(target);\n });\n return target;\n }\n}\n//# sourceMappingURL=NonstrictRPC.js.map","import { spawn } from 'node:child_process';\nimport * as readline from 'readline';\nimport { NSRPC } from \"./NonstrictRPC.js\";\nexport class IpcRecordKit {\n childProcess;\n nsrpc;\n constructor() {\n this.nsrpc = new NSRPC((message) => this.write(message));\n }\n async initialize(recordKitRpcPath, logMessages = false) {\n if (this.childProcess !== undefined) {\n throw new Error('RecordKit: [RPC] Already initialized.');\n }\n this.nsrpc.logMessages = logMessages;\n this.childProcess = await new Promise((resolve, reject) => {\n const childProcess = spawn(recordKitRpcPath, { stdio: ['pipe', 'pipe', logMessages ? 'pipe' : 'ignore'] });\n childProcess.on('close', (code, signal) => { console.error(`RecordKit: [RPC] Closed with code ${code} and signal ${signal}`); });\n childProcess.on('error', (error) => { reject(error); });\n childProcess.on('exit', (code, signal) => { console.error(`RecordKit: [RPC] Exited with code ${code} and signal ${signal}`); });\n childProcess.on('spawn', () => { resolve(childProcess); });\n });\n const { stdout, stderr } = this.childProcess;\n if (!stdout) {\n throw new Error('RecordKit: [RPC] !! No stdout stream on child process.');\n }\n readline.createInterface({ input: stdout }).on('line', (line) => {\n this.nsrpc.receive(line);\n });\n if (stderr) {\n readline.createInterface({ input: stderr }).on('line', (line) => {\n console.log(`RecordKit: [RPC] Lognoise on stderr: ${line}`);\n });\n }\n }\n write(message) {\n const stdin = this.childProcess?.stdin;\n if (!stdin) {\n throw new Error('RecordKit: [RPC] !! Missing stdin stream.');\n }\n stdin.write(message + \"\\n\");\n }\n}\n//# sourceMappingURL=IpcRecordKit.js.map","import { randomUUID } from \"crypto\";\nimport { EventEmitter } from \"events\";\n/**\n * Converts RPC audio buffer data to AudioStreamBuffer format\n * @internal\n */\nfunction convertRPCParamsToAudioStreamBuffer(params) {\n try {\n // params is the AudioBufferData directly from Swift\n const rawAudioBuffer = params;\n if (!rawAudioBuffer || !Array.isArray(rawAudioBuffer.channelData)) {\n console.error('RecordKit: Invalid audio buffer received from RPC');\n return null;\n }\n const channelData = [];\n for (const base64Data of rawAudioBuffer.channelData) {\n if (typeof base64Data !== 'string') {\n console.error('RecordKit: Invalid base64 data received');\n return null;\n }\n // Decode base64 to binary data\n const binaryString = atob(base64Data);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n // Convert bytes to Float32Array\n const float32Array = new Float32Array(bytes.buffer);\n channelData.push(float32Array);\n }\n const audioStreamBuffer = {\n sampleRate: rawAudioBuffer.sampleRate,\n numberOfChannels: rawAudioBuffer.numberOfChannels,\n numberOfFrames: rawAudioBuffer.numberOfFrames,\n channelData: channelData\n };\n return audioStreamBuffer;\n }\n catch (error) {\n console.error('RecordKit: Error processing audio stream buffer:', error);\n return null;\n }\n}\n/**\n * @group Recording\n */\nexport class Recorder extends EventEmitter {\n rpc;\n target;\n /** @ignore */\n static async newInstance(rpc, schema) {\n const target = 'Recorder_' + randomUUID();\n const object = new Recorder(rpc, target);\n schema.items.forEach(item => {\n if (item.type == 'webcam') {\n if (typeof item.camera != 'string') {\n item.camera = item.camera.id;\n }\n if (typeof item.microphone != 'string') {\n item.microphone = item.microphone.id;\n }\n }\n if (item.type == 'display') {\n if (typeof item.display != 'number') {\n item.display = item.display.id;\n }\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'Display.onSegment',\n lifecycle: object\n });\n }\n }\n if (item.type == 'windowBasedCrop') {\n if (typeof item.window != 'number') {\n item.window = item.window.id;\n }\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'Window.onSegment',\n lifecycle: object\n });\n }\n }\n if (item.type == 'appleDeviceStaticOrientation') {\n if (typeof item.device != 'string') {\n item.device = item.device.id;\n }\n }\n if (item.type == 'systemAudio') {\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'SystemAudio.onSegment',\n lifecycle: object\n });\n }\n if (item.output == 'stream' && item.streamCallback) {\n const streamHandler = item.streamCallback;\n item.streamCallback = rpc.registerClosure({\n handler: (params) => {\n const audioBuffer = convertRPCParamsToAudioStreamBuffer(params);\n if (audioBuffer) {\n streamHandler(audioBuffer);\n }\n },\n prefix: 'SystemAudioStream.onAudioBuffer',\n lifecycle: object\n });\n }\n }\n if (item.type == 'applicationAudio') {\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'ApplicationAudio.onSegment',\n lifecycle: object\n });\n }\n if (item.output == 'stream' && item.streamCallback) {\n const streamHandler = item.streamCallback;\n item.streamCallback = rpc.registerClosure({\n handler: (params) => {\n const audioBuffer = convertRPCParamsToAudioStreamBuffer(params);\n if (audioBuffer) {\n streamHandler(audioBuffer);\n }\n },\n prefix: 'ApplicationAudioStream.onAudioBuffer',\n lifecycle: object\n });\n }\n }\n if (item.type == 'microphone') {\n if (typeof item.microphone != 'string') {\n item.microphone = item.microphone.id;\n }\n if (item.output == 'segmented' && item.segmentCallback) {\n const segmentHandler = item.segmentCallback;\n item.segmentCallback = rpc.registerClosure({\n handler: (params) => { segmentHandler(params.path); },\n prefix: 'Microphone.onSegment',\n lifecycle: object\n });\n }\n if (item.output == 'stream' && item.streamCallback) {\n const streamHandler = item.streamCallback;\n item.streamCallback = rpc.registerClosure({\n handler: (params) => {\n const audioBuffer = convertRPCParamsToAudioStreamBuffer(params);\n if (audioBuffer) {\n streamHandler(audioBuffer);\n }\n },\n prefix: 'MicrophoneStream.onAudioBuffer',\n lifecycle: object\n });\n }\n }\n });\n const weakRefObject = new WeakRef(object);\n const onAbortInstance = rpc.registerClosure({\n handler: (params) => { weakRefObject.deref()?.emit('abort', params); },\n prefix: 'Recorder.onAbort',\n lifecycle: object\n });\n await rpc.initialize({\n target,\n type: 'Recorder',\n params: { schema, onAbortInstance },\n lifecycle: object\n });\n return object;\n }\n /** @ignore */\n constructor(rpc, target) {\n super();\n this.rpc = rpc;\n this.target = target;\n }\n async prepare() {\n await this.rpc.perform({ target: this.target, action: 'prepare' });\n }\n async start() {\n await this.rpc.perform({ target: this.target, action: 'start' });\n }\n async stop() {\n return await this.rpc.perform({ target: this.target, action: 'stop' });\n }\n async cancel() {\n await this.rpc.manualRelease(this.target);\n }\n}\n//# sourceMappingURL=Recorder.js.map","import { IpcRecordKit } from \"./IpcRecordKit.js\";\nimport { Recorder } from \"./Recorder.js\";\nimport { EventEmitter } from \"events\";\nimport { existsSync } from \"node:fs\";\n/**\n * Entry point for the RecordKit SDK, an instance is available as `recordkit` that can be imported from the module. Do not instantiate this class directly.\n *\n * @groupDescription Discovery\n * Discover the windows and devices that are available to record.\n *\n * @groupDescription Permissions\n * Check and request the apps permission to access the recording devices.\n *\n * @groupDescription Logging\n * Log what's going on to the console for easy debugging and troubleshooting. See the [Logging and Error Handling guide](https://recordkit.dev/guides/logging-and-errors) for more information.\n */\nexport class RecordKit extends EventEmitter {\n ipcRecordKit = new IpcRecordKit();\n /** @ignore */\n constructor() {\n super();\n }\n /**\n * Initialize the RecordKit SDK.\n *\n * ⚠️ Must be called before calling any other RecordKit method.\n *\n * @param args\n */\n async initialize(args) {\n let rpcBinaryPath = args.rpcBinaryPath;\n if (args.fallbackToNodeModules ?? true) {\n if (!existsSync(rpcBinaryPath)) {\n rpcBinaryPath = rpcBinaryPath.replace('node_modules/electron/dist/Electron.app/Contents/Resources', 'node_modules/@nonstrict/recordkit/bin');\n console.error(`RecordKit: [RPC] !! Falling back to RPC binary from node_modules at ${rpcBinaryPath}`);\n }\n }\n await this.ipcRecordKit.initialize(rpcBinaryPath, args.logRpcMessages);\n const logHandlerInstance = this.ipcRecordKit.nsrpc.registerClosure({\n handler: (params) => {\n console.log('RecordKit:', params.formattedMessage);\n this.emit('log', params);\n },\n prefix: 'RecordKit.logHandler',\n lifecycle: this\n });\n await this.ipcRecordKit.nsrpc.perform({ type: 'Logger', action: 'setLogHandler', params: { logHandlerInstance } });\n if (args.logLevel) {\n await this.setLogLevel(args.logLevel);\n }\n }\n /**\n * Set the global log level. Defaults to `debug`.\n *\n * Messages with a lower level than this will be ignored and not passed to any log handlers.\n *\n * @group Logging\n */\n async setLogLevel(logLevel) {\n await this.ipcRecordKit.nsrpc.perform({ type: 'Logger', action: 'setLogLevel', params: { logLevel } });\n }\n /**\n * Overrides the global log level for a specific category. Defaults to the global log level.\n *\n * Messages in the given category with a lower level than this will be ignored and not passed to any log handlers.\n *\n * @group Logging\n */\n async setCategoryLogLevel(params) {\n await this.ipcRecordKit.nsrpc.perform({ type: 'Logger', action: 'setLogLevel', params });\n }\n /**\n * A list of Mac displays that can be used for screen recording.\n *\n * @group Discovery\n */\n async getDisplays() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getDisplays' });\n }\n /**\n * A list of macOS windows that can be used for screen recording.\n *\n * @group Discovery\n */\n async getWindows() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getWindows' });\n }\n /**\n * A list of cameras that are connected to the system.\n *\n * @param params.includeDeskView - Whether to include Desk View cameras in the results\n * @group Discovery\n */\n async getCameras(params) {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getCameras', params: { includeDeskView: params?.includeDeskView ?? false } });\n }\n /**\n * A list of microphones that are connected to the system.\n *\n * @group Discovery\n */\n async getMicrophones() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getMicrophones' });\n }\n /**\n * A list of iOS devices that are connected to the system.\n *\n * @group Discovery\n */\n async getAppleDevices() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getAppleDevices' });\n }\n /**\n * A list of currently running applications that can be used for screen or audio recording.\n *\n * @group Discovery\n */\n async getRunningApplications() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'Recorder', action: 'getRunningApplications' });\n }\n /**\n * Indicates if camera can be used.\n *\n * Authorization status that indicates whether the user grants the app permission to capture video.\n *\n * @group Permissions\n */\n async getCameraAuthorizationStatus() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getCameraAuthorizationStatus' });\n }\n /**\n * Indicates if microphone can be used.\n *\n * Authorization status that indicates whether the user grants the app permission to capture audio.\n *\n * @group Permissions\n */\n async getMicrophoneAuthorizationStatus() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getMicrophoneAuthorizationStatus' });\n }\n /**\n * Indicates if screen can be recorded.\n *\n * @group Permissions\n */\n async getScreenRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getScreenRecordingAccess' });\n }\n /**\n * Indicates if system audio can be recorded.\n *\n * @group Permissions\n */\n async getSystemAudioRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getSystemAudioRecordingAccess' });\n }\n /**\n * Indicates if keystroke events of other apps can be recorded via Input Monitoring.\n *\n * @group Permissions\n */\n async getInputMonitoringAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getInputMonitoringAccess' });\n }\n /**\n * Indicates if other apps can be controlled via Accessibility.\n *\n * @group Permissions\n */\n async getAccessibilityControlAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'getAccessibilityControlAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture the camera.\n *\n * Prompts the users if this is the first time requesting access, otherwise immediately returns.\n *\n * @returns Boolean value that indicates whether the user granted or denied access to your app.\n * @group Permissions\n */\n async requestCameraAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestCameraAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture the microphone.\n *\n * Prompts the users if this is the first time requesting access, otherwise immediately returns.\n *\n * @returns Boolean value that indicates whether the user granted or denied access to your app.\n * @group Permissions\n */\n async requestMicrophoneAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestMicrophoneAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture the screen.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to do screen recording.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @group Permissions\n */\n async requestScreenRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestScreenRecordingAccess' });\n }\n /**\n * Requests the user's permission to allow the app to capture system audio.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to do screen recording.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @remarks Currently, system audio recording is currently implemented using ScreenCaptureKit,\n * which means the users needs to grant screen recording access.\n *\n * @group Permissions\n */\n async requestSystemAudioRecordingAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestSystemAudioRecordingAccess' });\n }\n /**\n * Requests the users's permission to monitor keystrokes of other apps via Input Monitoring.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to monitor other apps.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @group Permissions\n */\n async requestInputMonitoringAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestInputMonitoringAccess' });\n }\n /**\n * Requests the users's permission to control other apps via Accessibility permissions.\n *\n * If this is the first time requesting access, this shows dialog that lets th users open System Settings.\n * In System Settings, the user can allow the app permission to control apps.\n *\n * Afterwards, the users needs to restart this app, for the permission to become active in the app.\n *\n * @group Permissions\n */\n async requestAccessibilityControlAccess() {\n return await this.ipcRecordKit.nsrpc.perform({ type: 'AuthorizationStatus', action: 'requestAccessibilityControlAccess' });\n }\n async createRecorder(schema) {\n return Recorder.newInstance(this.ipcRecordKit.nsrpc, schema);\n }\n}\n/** @ignore */\nexport let recordkit = new RecordKit();\n//# sourceMappingURL=RecordKit.js.map"],"names":["randomUUID","spawn","readline","EventEmitter","existsSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,OAAO,UAAU,KAAK,EAAE,MAAM,UAAU,EAAE,CAAC,EAAE,CAAC;;ACEpG,MAAM,KAAK,CAAC;AACnB,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB,IAAI,IAAI,CAAC;AACT,IAAI,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;AACjC,IAAI,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;AAC/B,IAAI,WAAW,CAAC,IAAI,EAAE;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,KAAK;AACL,IAAI,OAAO,CAAC,IAAI,EAAE;AAClB;AACA;AACA;AACA,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI;AACZ,YAAY,IAAI,IAAI,CAAC,WAAW,EAAE;AAClC,gBAAgB,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAClE,aAAa;AACb,YAAY,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,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AAI,MAAM,cAAc,CAAC,MAAM,EAAE;AACjC,QAAQ,OAAO,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACrE,KAAK;AACL,CAAC;AACD;AACU,IAAC,SAAS,GAAG,IAAI,SAAS;;;;"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nonstrict/recordkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"description": "Powerful screen recording for your Electron app on macOS.",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://recordkit.dev",
|
|
6
6
|
"repository": "nonstrict-hq/RecordKit.Electron",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "out/index.js",
|
package/src/RecordKit.ts
CHANGED
|
@@ -3,17 +3,17 @@ import { Recorder, RecorderSchemaItem } from "./Recorder.js";
|
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
7
|
* Entry point for the RecordKit SDK, an instance is available as `recordkit` that can be imported from the module. Do not instantiate this class directly.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* @groupDescription Discovery
|
|
10
10
|
* Discover the windows and devices that are available to record.
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* @groupDescription Permissions
|
|
13
13
|
* Check and request the apps permission to access the recording devices.
|
|
14
|
-
*
|
|
14
|
+
*
|
|
15
15
|
* @groupDescription Logging
|
|
16
|
-
* Log what's going on to the console for easy debugging and troubleshooting.
|
|
16
|
+
* Log what's going on to the console for easy debugging and troubleshooting. See the [Logging and Error Handling guide](https://recordkit.dev/guides/logging-and-errors) for more information.
|
|
17
17
|
*/
|
|
18
18
|
export class RecordKit extends EventEmitter {
|
|
19
19
|
private ipcRecordKit = new IpcRecordKit()
|
package/src/Recorder.ts
CHANGED
|
@@ -253,12 +253,16 @@ export interface WebcamSchema {
|
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* Creates a recorder item for recording a single display. Output is stored in a RecordKit bundle.
|
|
256
|
-
*
|
|
256
|
+
*
|
|
257
257
|
* @group Recording Schemas
|
|
258
258
|
*/
|
|
259
259
|
export type DisplaySchema = {
|
|
260
260
|
type: 'display'
|
|
261
261
|
display: Display | number // UInt32
|
|
262
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
263
|
+
colorSpace?: ColorSpace
|
|
264
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
265
|
+
videoCodec?: VideoCodec
|
|
262
266
|
shows_cursor?: boolean
|
|
263
267
|
mouse_events?: boolean
|
|
264
268
|
keyboard_events?: boolean
|
|
@@ -268,6 +272,10 @@ export type DisplaySchema = {
|
|
|
268
272
|
} | {
|
|
269
273
|
type: 'display'
|
|
270
274
|
display: Display | number // UInt32
|
|
275
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
276
|
+
colorSpace?: ColorSpace
|
|
277
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
278
|
+
videoCodec?: VideoCodec
|
|
271
279
|
shows_cursor?: boolean
|
|
272
280
|
mouse_events?: boolean
|
|
273
281
|
keyboard_events?: boolean
|
|
@@ -279,12 +287,16 @@ export type DisplaySchema = {
|
|
|
279
287
|
|
|
280
288
|
/**
|
|
281
289
|
* Creates a recorder item for recording the initial crop of a window on a display. Output is stored in a RecordKit bundle.
|
|
282
|
-
*
|
|
290
|
+
*
|
|
283
291
|
* @group Recording Schemas
|
|
284
292
|
*/
|
|
285
293
|
export type WindowBasedCropSchema = {
|
|
286
294
|
type: 'windowBasedCrop'
|
|
287
295
|
window: Window | number // UInt32
|
|
296
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
297
|
+
colorSpace?: ColorSpace
|
|
298
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
299
|
+
videoCodec?: VideoCodec
|
|
288
300
|
shows_cursor?: boolean
|
|
289
301
|
mouse_events?: boolean
|
|
290
302
|
keyboard_events?: boolean
|
|
@@ -293,6 +305,10 @@ export type WindowBasedCropSchema = {
|
|
|
293
305
|
} | {
|
|
294
306
|
type: 'windowBasedCrop'
|
|
295
307
|
window: Window | number // UInt32
|
|
308
|
+
/** Color space for the recording. Defaults to 'sRGB'. Note: 'displayP3' requires 'hevc' video codec. */
|
|
309
|
+
colorSpace?: ColorSpace
|
|
310
|
+
/** Video codec for the recording. Defaults to 'h264'. */
|
|
311
|
+
videoCodec?: VideoCodec
|
|
296
312
|
shows_cursor?: boolean
|
|
297
313
|
mouse_events?: boolean
|
|
298
314
|
keyboard_events?: boolean
|
|
@@ -312,6 +328,27 @@ export interface AppleDeviceStaticOrientationSchema {
|
|
|
312
328
|
device: AppleDevice | string
|
|
313
329
|
}
|
|
314
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Video codec for screen recording.
|
|
333
|
+
* - `h264`: H.264/AVC codec - most compatible, works on all devices.
|
|
334
|
+
* - `hevc`: H.265/HEVC codec - smaller file sizes, requires newer devices for playback.
|
|
335
|
+
*
|
|
336
|
+
* @group Recording Schemas
|
|
337
|
+
*/
|
|
338
|
+
export type VideoCodec = 'h264' | 'hevc'
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Color space for screen recording.
|
|
342
|
+
* - `sRGB`: Standard RGB color space, compatible with all modern displays.
|
|
343
|
+
* - `displayP3`: Display P3 color space, used in high-end Apple displays for wide gamut colors.
|
|
344
|
+
*
|
|
345
|
+
* Note: Display P3 is only supported with HEVC codec. If Display P3 is requested with H.264,
|
|
346
|
+
* it will automatically fall back to sRGB.
|
|
347
|
+
*
|
|
348
|
+
* @group Recording Schemas
|
|
349
|
+
*/
|
|
350
|
+
export type ColorSpace = 'sRGB' | 'displayP3'
|
|
351
|
+
|
|
315
352
|
/**
|
|
316
353
|
* @group Recording Schemas
|
|
317
354
|
*/
|
|
@@ -484,12 +521,21 @@ export interface RecordingResult {
|
|
|
484
521
|
info: BundleInfo
|
|
485
522
|
}
|
|
486
523
|
|
|
524
|
+
/**
|
|
525
|
+
* Errors produced by RecordKit include user-friendly messages suitable for display in your UI.
|
|
526
|
+
*
|
|
527
|
+
* See the [Logging and Error Handling guide](https://recordkit.dev/guides/logging-and-errors#error-handling) for more information.
|
|
528
|
+
*/
|
|
487
529
|
export interface RecordKitError {
|
|
488
530
|
name: "RecordKitError"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
531
|
+
/** Error code, used for grouping related errors */
|
|
532
|
+
code: string
|
|
533
|
+
/** Error code number */
|
|
534
|
+
codeNumber: number
|
|
535
|
+
/** Message describing the problem and possible recovery options, intended to be shown directly to the end-user. */
|
|
536
|
+
message: string
|
|
537
|
+
/** Detailed technical description of this error, used in debugging */
|
|
538
|
+
debugDescription: string
|
|
493
539
|
}
|
|
494
540
|
|
|
495
541
|
/**
|
package/typedoc.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"src/index.ts"
|
|
4
4
|
],
|
|
5
5
|
"navigationLinks": {
|
|
6
|
-
"Back to the Homepage": "
|
|
6
|
+
"Back to the Homepage": "https://recordkit.dev"
|
|
7
7
|
},
|
|
8
8
|
"excludeExternals": true,
|
|
9
9
|
"excludePrivate": true,
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"alphabetical"
|
|
17
17
|
],
|
|
18
18
|
"sortEntryPoints": false,
|
|
19
|
-
"sitemapBaseUrl": "
|
|
19
|
+
"sitemapBaseUrl": "https://recordkit.dev/api/electron/",
|
|
20
20
|
}
|