@nonstrict/recordkit 0.87.2 → 0.97.1
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/bin/README.md +1 -1
- package/bin/recordkit-rpc +0 -0
- package/out/Errors.d.ts +91 -0
- package/out/Errors.js +63 -0
- package/out/Errors.js.map +1 -0
- package/out/InputEvents.d.ts +661 -0
- package/out/InputEvents.js +8 -0
- package/out/InputEvents.js.map +1 -0
- package/out/IpcRecordKit.js +13 -0
- package/out/IpcRecordKit.js.map +1 -1
- package/out/NonstrictRPC.d.ts +9 -0
- package/out/NonstrictRPC.js +27 -4
- package/out/NonstrictRPC.js.map +1 -1
- package/out/RecordKit.d.ts +267 -5
- package/out/RecordKit.js +243 -3
- package/out/RecordKit.js.map +1 -1
- package/out/Recorder.d.ts +451 -53
- package/out/Recorder.js +80 -2
- package/out/Recorder.js.map +1 -1
- package/out/RecordingMetadata.d.ts +96 -0
- package/out/RecordingMetadata.js +12 -0
- package/out/RecordingMetadata.js.map +1 -0
- package/out/WebAudioUtils.d.ts +35 -0
- package/out/WebAudioUtils.js +37 -0
- package/out/WebAudioUtils.js.map +1 -1
- package/out/WindowLevels.d.ts +46 -0
- package/out/WindowLevels.js +41 -0
- package/out/WindowLevels.js.map +1 -0
- package/out/browser.d.ts +8 -1
- package/out/browser.js +3 -1
- package/out/browser.js.map +1 -1
- package/out/index.cjs +603 -9
- package/out/index.cjs.map +1 -1
- package/out/index.d.ts +8 -0
- package/out/index.js +3 -0
- package/out/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Errors.test.ts +38 -0
- package/src/Errors.ts +151 -0
- package/src/InputEvents.ts +695 -0
- package/src/IpcRecordKit.ts +12 -0
- package/src/NonstrictRPC.test.ts +24 -1
- package/src/NonstrictRPC.ts +29 -5
- package/src/RecordKit.ts +347 -11
- package/src/Recorder.schema.test.ts +167 -0
- package/src/Recorder.ts +558 -80
- package/src/RecordingMetadata.ts +125 -0
- package/src/WebAudioUtils.test.ts +78 -0
- package/src/WebAudioUtils.ts +57 -1
- package/src/WindowLevels.test.ts +34 -0
- package/src/WindowLevels.ts +47 -0
- package/src/browser.ts +12 -2
- package/src/index.ts +8 -0
- package/src/__snapshots__/NonstrictRPC.test.ts.snap +0 -24
package/bin/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# recordkit-rpc 0.
|
|
1
|
+
# recordkit-rpc 0.97.1
|
package/bin/recordkit-rpc
CHANGED
|
Binary file
|
package/out/Errors.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The set of error code names that can occur in RecordKit.
|
|
3
|
+
*
|
|
4
|
+
* Each member is the exact case-name string returned by the Swift
|
|
5
|
+
* `RKError.Code.description` and reported as `RecordKitError.code`. The trailing
|
|
6
|
+
* comment on each line is the matching numeric raw value, available at runtime
|
|
7
|
+
* as `RecordKitError.codeNumber` (see {@link RECORDKIT_ERROR_CODE_NUMBERS}).
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Codes are grouped into ranges by category, mirroring the Swift `RKError.Code`
|
|
11
|
+
* enum. The associated `RecordKitError` carries a user-facing message
|
|
12
|
+
* (`message`) and technical detail; the meaning of each code:
|
|
13
|
+
*
|
|
14
|
+
* - **Configuration** (`-100x`):
|
|
15
|
+
* `invalidLicense` (no valid RecordKit license),
|
|
16
|
+
* `invalidConfiguration` (the provided configuration is not valid).
|
|
17
|
+
* - **Permission** (`-110x`): the corresponding permission is required but not
|
|
18
|
+
* granted — `microphonePermissionRequired`, `cameraPermissionRequired`,
|
|
19
|
+
* `screenRecordingPermissionRequired`, `systemAudioPermissionRequired`.
|
|
20
|
+
* - **Device availability** (`-120x`): the requested device/source is
|
|
21
|
+
* unavailable for recording — `microphoneUnavailable`, `cameraUnavailable`,
|
|
22
|
+
* `displayUnavailable`, `windowUnavailable`, `systemAudioUnavailable`,
|
|
23
|
+
* `appleDeviceUnavailable`, `inputRecordingUnavailable`.
|
|
24
|
+
* - **Recording state** (`-130x`): `noVideoFramesReceived` /
|
|
25
|
+
* `noAudioSamplesReceived` (nothing was captured), `screenCaptureStoppedLowDiskSpace`,
|
|
26
|
+
* `screenCaptureStoppedWithError`, `screenCaptureStoppedWithoutError`,
|
|
27
|
+
* `insufficientDiskSpace` (not enough free disk space to start or continue the recording).
|
|
28
|
+
* - **Internal** (`-16xx`): unexpected failures inside RecordKit (e.g.
|
|
29
|
+
* `internalError`, `uncaughtError`, `internalConductorError`,
|
|
30
|
+
* `configurationFailed`, `configurationNotSupported`, audio/video/media
|
|
31
|
+
* format and device init/configuration failures, `assetWriterFailed`,
|
|
32
|
+
* `tccUnavailableError` — the permission system interface is unavailable).
|
|
33
|
+
* - **Processing/operation** (`-17xx`): a runtime operation failed — e.g.
|
|
34
|
+
* `audioProcessingFailed`, `audioBufferProcessingFailed`,
|
|
35
|
+
* `audioBufferCreationFailed`, `inputEventProcessingFailed`,
|
|
36
|
+
* `assetWriterCreationFailed`, `fileOperationFailed`, `windowOperationFailed`.
|
|
37
|
+
*
|
|
38
|
+
* @group Recording
|
|
39
|
+
*/
|
|
40
|
+
export type RecordKitErrorCode = 'invalidLicense' | 'invalidConfiguration' | 'microphonePermissionRequired' | 'cameraPermissionRequired' | 'screenRecordingPermissionRequired' | 'systemAudioPermissionRequired' | 'microphoneUnavailable' | 'cameraUnavailable' | 'displayUnavailable' | 'windowUnavailable' | 'systemAudioUnavailable' | 'appleDeviceUnavailable' | 'inputRecordingUnavailable' | 'noVideoFramesReceived' | 'noAudioSamplesReceived' | 'screenCaptureStoppedLowDiskSpace' | 'screenCaptureStoppedWithError' | 'screenCaptureStoppedWithoutError' | 'insufficientDiskSpace' | 'internalError' | 'uncaughtError' | 'internalConductorError' | 'configurationFailed' | 'configurationNotSupported' | 'audioFormatError' | 'videoFormatError' | 'audioFormatConfigurationFailed' | 'videoFormatConfigurationFailed' | 'mediaFormatInitializationFailed' | 'mediaFormatConfigurationFailed' | 'audioDeviceInitializationFailed' | 'audioDeviceConfigurationFailed' | 'assetWriterFailed' | 'tccUnavailableError' | 'audioProcessingFailed' | 'audioBufferProcessingFailed' | 'audioBufferCreationFailed' | 'inputEventProcessingFailed' | 'assetWriterCreationFailed' | 'fileOperationFailed' | 'windowOperationFailed';
|
|
41
|
+
/**
|
|
42
|
+
* Mapping from each {@link RecordKitErrorCode} name to its numeric raw value.
|
|
43
|
+
*
|
|
44
|
+
* The numbers correspond to the `Int` raw values of the Swift `RKError.Code`
|
|
45
|
+
* enum and to the `RecordKitError.codeNumber` reported over RPC.
|
|
46
|
+
*
|
|
47
|
+
* @group Recording
|
|
48
|
+
*/
|
|
49
|
+
export declare const RECORDKIT_ERROR_CODE_NUMBERS: {
|
|
50
|
+
readonly invalidLicense: -1001;
|
|
51
|
+
readonly invalidConfiguration: -1002;
|
|
52
|
+
readonly microphonePermissionRequired: -1101;
|
|
53
|
+
readonly cameraPermissionRequired: -1102;
|
|
54
|
+
readonly screenRecordingPermissionRequired: -1103;
|
|
55
|
+
readonly systemAudioPermissionRequired: -1104;
|
|
56
|
+
readonly microphoneUnavailable: -1201;
|
|
57
|
+
readonly cameraUnavailable: -1202;
|
|
58
|
+
readonly displayUnavailable: -1203;
|
|
59
|
+
readonly windowUnavailable: -1204;
|
|
60
|
+
readonly systemAudioUnavailable: -1205;
|
|
61
|
+
readonly appleDeviceUnavailable: -1206;
|
|
62
|
+
readonly inputRecordingUnavailable: -1207;
|
|
63
|
+
readonly noVideoFramesReceived: -1301;
|
|
64
|
+
readonly noAudioSamplesReceived: -1302;
|
|
65
|
+
readonly screenCaptureStoppedLowDiskSpace: -1303;
|
|
66
|
+
readonly screenCaptureStoppedWithError: -1304;
|
|
67
|
+
readonly screenCaptureStoppedWithoutError: -1305;
|
|
68
|
+
readonly insufficientDiskSpace: -1306;
|
|
69
|
+
readonly internalError: -1600;
|
|
70
|
+
readonly uncaughtError: -1601;
|
|
71
|
+
readonly internalConductorError: -1602;
|
|
72
|
+
readonly configurationFailed: -1603;
|
|
73
|
+
readonly configurationNotSupported: -1604;
|
|
74
|
+
readonly audioFormatError: -1605;
|
|
75
|
+
readonly videoFormatError: -1606;
|
|
76
|
+
readonly audioFormatConfigurationFailed: -1607;
|
|
77
|
+
readonly videoFormatConfigurationFailed: -1608;
|
|
78
|
+
readonly mediaFormatInitializationFailed: -1609;
|
|
79
|
+
readonly mediaFormatConfigurationFailed: -1610;
|
|
80
|
+
readonly audioDeviceInitializationFailed: -1611;
|
|
81
|
+
readonly audioDeviceConfigurationFailed: -1612;
|
|
82
|
+
readonly assetWriterFailed: -1613;
|
|
83
|
+
readonly tccUnavailableError: -1614;
|
|
84
|
+
readonly audioProcessingFailed: -1701;
|
|
85
|
+
readonly audioBufferProcessingFailed: -1702;
|
|
86
|
+
readonly audioBufferCreationFailed: -1703;
|
|
87
|
+
readonly inputEventProcessingFailed: -1704;
|
|
88
|
+
readonly assetWriterCreationFailed: -1705;
|
|
89
|
+
readonly fileOperationFailed: -1706;
|
|
90
|
+
readonly windowOperationFailed: -1707;
|
|
91
|
+
};
|
package/out/Errors.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Error code types mirroring RecordKit's `RKError` / `RKError.Code` Swift enum, JSON-for-JSON, as
|
|
2
|
+
// surfaced over the RPC bridge. `RecordKitError.code` carries the Swift case name (from
|
|
3
|
+
// `RKError.Code.description`) and `RecordKitError.codeNumber` the corresponding `Int` raw value;
|
|
4
|
+
// user-facing text is on `RecordKitError.message`, technical detail on `RecordKitError.debugDescription`.
|
|
5
|
+
// See the RecordKitErrorCode docs below and https://recordkit.dev/guides/logging-and-errors#error-handling
|
|
6
|
+
/**
|
|
7
|
+
* Mapping from each {@link RecordKitErrorCode} name to its numeric raw value.
|
|
8
|
+
*
|
|
9
|
+
* The numbers correspond to the `Int` raw values of the Swift `RKError.Code`
|
|
10
|
+
* enum and to the `RecordKitError.codeNumber` reported over RPC.
|
|
11
|
+
*
|
|
12
|
+
* @group Recording
|
|
13
|
+
*/
|
|
14
|
+
export const RECORDKIT_ERROR_CODE_NUMBERS = {
|
|
15
|
+
// Configuration Errors
|
|
16
|
+
invalidLicense: -1001,
|
|
17
|
+
invalidConfiguration: -1002,
|
|
18
|
+
// Permission Errors
|
|
19
|
+
microphonePermissionRequired: -1101,
|
|
20
|
+
cameraPermissionRequired: -1102,
|
|
21
|
+
screenRecordingPermissionRequired: -1103,
|
|
22
|
+
systemAudioPermissionRequired: -1104,
|
|
23
|
+
// Device Availability Errors
|
|
24
|
+
microphoneUnavailable: -1201,
|
|
25
|
+
cameraUnavailable: -1202,
|
|
26
|
+
displayUnavailable: -1203,
|
|
27
|
+
windowUnavailable: -1204,
|
|
28
|
+
systemAudioUnavailable: -1205,
|
|
29
|
+
appleDeviceUnavailable: -1206,
|
|
30
|
+
inputRecordingUnavailable: -1207,
|
|
31
|
+
// Recording State Errors
|
|
32
|
+
noVideoFramesReceived: -1301,
|
|
33
|
+
noAudioSamplesReceived: -1302,
|
|
34
|
+
screenCaptureStoppedLowDiskSpace: -1303,
|
|
35
|
+
screenCaptureStoppedWithError: -1304,
|
|
36
|
+
screenCaptureStoppedWithoutError: -1305,
|
|
37
|
+
insufficientDiskSpace: -1306,
|
|
38
|
+
// Internal Errors
|
|
39
|
+
internalError: -1600,
|
|
40
|
+
uncaughtError: -1601,
|
|
41
|
+
internalConductorError: -1602,
|
|
42
|
+
configurationFailed: -1603,
|
|
43
|
+
configurationNotSupported: -1604,
|
|
44
|
+
audioFormatError: -1605,
|
|
45
|
+
videoFormatError: -1606,
|
|
46
|
+
audioFormatConfigurationFailed: -1607,
|
|
47
|
+
videoFormatConfigurationFailed: -1608,
|
|
48
|
+
mediaFormatInitializationFailed: -1609,
|
|
49
|
+
mediaFormatConfigurationFailed: -1610,
|
|
50
|
+
audioDeviceInitializationFailed: -1611,
|
|
51
|
+
audioDeviceConfigurationFailed: -1612,
|
|
52
|
+
assetWriterFailed: -1613,
|
|
53
|
+
tccUnavailableError: -1614,
|
|
54
|
+
// Processing/Operation Errors
|
|
55
|
+
audioProcessingFailed: -1701,
|
|
56
|
+
audioBufferProcessingFailed: -1702,
|
|
57
|
+
audioBufferCreationFailed: -1703,
|
|
58
|
+
inputEventProcessingFailed: -1704,
|
|
59
|
+
assetWriterCreationFailed: -1705,
|
|
60
|
+
fileOperationFailed: -1706,
|
|
61
|
+
windowOperationFailed: -1707,
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=Errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../src/Errors.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,wFAAwF;AACxF,iGAAiG;AACjG,0GAA0G;AAC1G,2GAA2G;AA0F3G;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,uBAAuB;IACvB,cAAc,EAAE,CAAC,IAAI;IACrB,oBAAoB,EAAE,CAAC,IAAI;IAC3B,oBAAoB;IACpB,4BAA4B,EAAE,CAAC,IAAI;IACnC,wBAAwB,EAAE,CAAC,IAAI;IAC/B,iCAAiC,EAAE,CAAC,IAAI;IACxC,6BAA6B,EAAE,CAAC,IAAI;IACpC,6BAA6B;IAC7B,qBAAqB,EAAE,CAAC,IAAI;IAC5B,iBAAiB,EAAE,CAAC,IAAI;IACxB,kBAAkB,EAAE,CAAC,IAAI;IACzB,iBAAiB,EAAE,CAAC,IAAI;IACxB,sBAAsB,EAAE,CAAC,IAAI;IAC7B,sBAAsB,EAAE,CAAC,IAAI;IAC7B,yBAAyB,EAAE,CAAC,IAAI;IAChC,yBAAyB;IACzB,qBAAqB,EAAE,CAAC,IAAI;IAC5B,sBAAsB,EAAE,CAAC,IAAI;IAC7B,gCAAgC,EAAE,CAAC,IAAI;IACvC,6BAA6B,EAAE,CAAC,IAAI;IACpC,gCAAgC,EAAE,CAAC,IAAI;IACvC,qBAAqB,EAAE,CAAC,IAAI;IAC5B,kBAAkB;IAClB,aAAa,EAAE,CAAC,IAAI;IACpB,aAAa,EAAE,CAAC,IAAI;IACpB,sBAAsB,EAAE,CAAC,IAAI;IAC7B,mBAAmB,EAAE,CAAC,IAAI;IAC1B,yBAAyB,EAAE,CAAC,IAAI;IAChC,gBAAgB,EAAE,CAAC,IAAI;IACvB,gBAAgB,EAAE,CAAC,IAAI;IACvB,8BAA8B,EAAE,CAAC,IAAI;IACrC,8BAA8B,EAAE,CAAC,IAAI;IACrC,+BAA+B,EAAE,CAAC,IAAI;IACtC,8BAA8B,EAAE,CAAC,IAAI;IACrC,+BAA+B,EAAE,CAAC,IAAI;IACtC,8BAA8B,EAAE,CAAC,IAAI;IACrC,iBAAiB,EAAE,CAAC,IAAI;IACxB,mBAAmB,EAAE,CAAC,IAAI;IAC1B,8BAA8B;IAC9B,qBAAqB,EAAE,CAAC,IAAI;IAC5B,2BAA2B,EAAE,CAAC,IAAI;IAClC,yBAAyB,EAAE,CAAC,IAAI;IAChC,0BAA0B,EAAE,CAAC,IAAI;IACjC,yBAAyB,EAAE,CAAC,IAAI;IAChC,mBAAmB,EAAE,CAAC,IAAI;IAC1B,qBAAqB,EAAE,CAAC,IAAI;CACyB,CAAC"}
|