Configure capture devices, such as selecting a camera's active format or fetching an application's icon.
Discover the windows and devices that are available to record.
Log what's going on to the console for easy debugging and troubleshooting. See the Logging and Error Handling guide for more information.
Check and request the apps permission to access the recording devices.
Read and update the user's preferred devices, so you can pre-select sensible defaults in your UI.
Move, resize, center and maximize windows of other applications (requires Accessibility Control permission).
Initialize the RecordKit SDK.
⚠️ Must be called before calling any other RecordKit method.
Path to the recordkit-rpc binary, most of the time this should be set to path.join(process.resourcesPath, 'recordkit-rpc').
Optional fallbackWhether to fallback to the RPC binary from node_modules if the given path does not exist. When enabled an extra check to see if the given path exists is performed. Most of the time this should be set to !app.isPackaged.
Optional logSet the global log level. Defaults to debug.
This is the same as calling setLogLevel right after initialization.
Fires for every log message emitted by RecordKit. See LogMessage.
Selects the camera's active capture format that best matches the given dimensions (in pixels).
Use this when you want the camera to deliver a specific resolution — typically before recording or before showing a live preview, so the preview renders at the intended resolution. The format stays in effect until something else changes it.
The chosen format is the smallest format whose dimensions are ≥ the target, preferring biplanar YUV pixel formats, and falling back to the largest available format if nothing meets the target.
Rejects if the camera is unavailable, has no usable video format, or its configuration is locked by another process.
Returns the camera capture format that setCameraActiveFormat would select for the given
dimensions (in pixels), without applying it. Returns undefined if the camera has no suitable format.
Returns the icon of the given running application as a data:image/png;base64,... URL,
usable directly as the src of an HTML <img> tag.
A list of microphones that are connected to the system.
A list of iOS devices that are connected to the system.
A list of currently running applications that can be used for screen or audio recording.
Set the global log level. Defaults to debug.
Messages with a lower level than this will be ignored and not passed to any log handlers.
Indicates if camera can be used.
Authorization status that indicates whether the user grants the app permission to capture video.
Indicates if microphone can be used.
Authorization status that indicates whether the user grants the app permission to capture audio.
Indicates if system audio can be recorded.
Optional options: { Optional backend?: SystemAudioPermissionBackendProbes whether system audio can actually be recorded with the given backend by attempting a short silent capture.
Unlike getSystemAudioRecordingAccess, which reads the recorded permission state, this verifies the permission is truly usable, immediately detecting cases where the OS reports a permission as granted but capture would still fail (e.g. after the user revokes it).
Optional options: { Optional backend?: SystemAudioPermissionBackendIf the permission state is still undetermined, this may trigger the system audio permission prompt.
Requests the user's permission to allow the app to capture the camera.
Prompts the users if this is the first time requesting access, otherwise immediately returns.
Boolean value that indicates whether the user granted or denied access to your app.
Requests the user's permission to allow the app to capture the microphone.
Prompts the users if this is the first time requesting access, otherwise immediately returns.
Boolean value that indicates whether the user granted or denied access to your app.
Requests the user's permission to allow the app to capture system audio.
Permission path depends on the selected backend:
default and coreAudio: system audio capture permissionscreenCaptureKit: Screen Recording permission_beta_coreAudio: deprecated alias for coreAudioFor the screenCaptureKit backend the user must restart the app before the granted permission
becomes active. The default and coreAudio backends return the live granted/denied result
with no restart required (macOS 14.2+).
Optional options: { Optional backend?: SystemAudioPermissionBackendBoolean value that indicates whether the user granted or denied access to your app.
Requests the users's permission to monitor keystrokes of other apps via Input Monitoring.
If this is the first time requesting access, this shows dialog that lets th users open System Settings. In System Settings, the user can allow the app permission to monitor other apps.
Afterwards, the users needs to restart this app, for the permission to become active in the app.
Requests the users's permission to control other apps via Accessibility permissions.
If this is the first time requesting access, this shows dialog that lets th users open System Settings. In System Settings, the user can allow the app permission to control apps.
Afterwards, the users needs to restart this app, for the permission to become active in the app.
The user's preferred devices for each source type, ordered most-preferred first.
RecordKit remembers which devices the user last recorded with (unless disabled via the recorder's
updatesUserPreferred setting). Use this to pre-select a sensible default device in your UI.
Records the given microphone as the user's most-preferred microphone.
Call this whenever the user manually selects a microphone, so it can be pre-selected later via getUserPreferred. The selection moves to the front of UserPreferred.microphoneIDs.
The microphone to prefer, either a Microphone or its Microphone.id.
Records the given camera as the user's most-preferred camera.
Call this whenever the user manually selects a camera, so it can be pre-selected later via getUserPreferred. The selection moves to the front of UserPreferred.cameraIDs.
Records the given display as the user's most-preferred display.
Call this whenever the user manually selects a display, so it can be pre-selected later via getUserPreferred. The selection moves to the front of UserPreferred.displayIDs.
The display to prefer, either a Display or its Display.id.
Records the given Apple device as the user's most-preferred Apple device.
Call this whenever the user manually selects an Apple device, so it can be pre-selected later via getUserPreferred. The selection moves to the front of UserPreferred.appleDeviceIDs.
The Apple device to prefer, either an AppleDevice or its AppleDevice.id.
Creates a Recorder for the given schema.
The schema describes what to record (its items, e.g. a webcam, display, microphone or system audio),
where to write the resulting RecordKit bundle (output_directory), and optional session-wide
RecorderSettings. Call Recorder.prepare then Recorder.start on the returned recorder.
Optional output_Optional settings?: RecorderSettingsThe given schema is consumed: device/window objects in its items are replaced by their IDs and
any callbacks are registered internally. Pass a fresh schema object per call rather than reusing one.
Maximizes the given window, resizing it to fill the display's visible area (excluding the menu bar and Dock) and centering it on that display.
Requires Accessibility Control permission (see getAccessibilityControlAccess).
Optional options: { Optional display?: number | DisplayThe display to maximize onto, either a Display or its Display.id. Defaults to the window's current display.
Rejects if the window cannot be maximized — typically because Accessibility permission is missing, the target display cannot be found, or the window is minimized or closed.
Resizes the given window to the given size (in points), keeping it centered on its display.
Requires Accessibility Control permission (see getAccessibilityControlAccess).
The requested size is clipped to the display's visible frame if it would be larger. After resizing, the window is re-centered so that a window which could not shrink/grow to the requested size still ends up centered. Rejects if Accessibility permission is missing, the target display cannot be found, or the window is minimized, closed, or does not support resizing.
Centers the given window within the visible area (excluding the menu bar and Dock) of its display, keeping its current size.
Requires Accessibility Control permission (see getAccessibilityControlAccess).
Optional options: { Optional display?: number | DisplayThe display to center on, either a Display or its Display.id. Defaults to the window's current display.
Rejects if Accessibility permission is missing, the target display cannot be found, or the window is minimized, closed, or does not support moving.
Moves the given window so its top-left corner is at the given position (in points, top-left origin).
Requires Accessibility Control permission (see getAccessibilityControlAccess).
The new top-left origin for the window, in points (top-left coordinate space).
Rejects if Accessibility permission is missing, or the window is minimized, closed, or does not support moving.
Generated using TypeDoc
Entry point for the RecordKit SDK, an instance is available as
recordkitthat can be imported from the module. Do not instantiate this class directly.