Desktop Recording SDK Methods
The Desktop Recording SDK provides methods to control recording sessions and manage permissions. Below is a list of the currently-available SDK methods and their definitions:
init({apiUrl, acquirePermissionsOnStartup, restartOnError})
init({apiUrl, acquirePermissionsOnStartup, restartOnError})Initializes the SDK. You'll need to pass a few parameters on startup:
acquirePermissionsOnStartup: The list of permissions to automatically request when the Desktop Recording SDK initializes. By default, the SDK requests all permissions on initialization.
apiUrl: The URL corresponding to the region your Recall.ai workspace belongs to. See the table below for the correct mapping of region to base URL:
startRecording({windowId, uploadToken})
startRecording({windowId, uploadToken})RecallAiSdk.startRecording({
windowId: ...,
uploadToken: ...
});
Begin recording. This function is usually called inside an event listener for meeting-detected. windowId is provided by the meeting-detected callback, and uploadToken is acquired by creating an SDK Upload on your backend.
See Real-Time Event Payloads for more details on the schema of the data.
stopRecording({windowId})
stopRecording({windowId})RecallAiSdk.stopRecording({
windowId: ...,
});
Stop recording. This function can be called to end a recording before the meeting itself has naturally ended.
pauseRecording({windowId})
pauseRecording({windowId})RecallAiSdk.pauseRecording({
windowId: ...,
});
Pause recording. This will make cause the resulting video or audio to be blank for the duration of the paused period.
resumeRecording({windowId})
resumeRecording({windowId})RecallAiSdk.resumeRecording({
windowId: ...,
});
Resume recording.
uploadRecording({windowId})
uploadRecording({windowId})RecallAiSdk.uploadRecording({
windowId: ...
});
Initiate the upload of a recording. This function should be called only after a recording has completed, usually in a recording-ended callback.
prepareDesktopAudioRecording()
prepareDesktopAudioRecording()import RecallAiSdk from '@recallai/desktop-sdk';
const res = await Backend.fetch(`/api/create_sdk_recording`, AppState.client_token);
const payload = await res.json();
const windowId = await RecallAiSdk.prepareDesktopAudioRecording();
await RecallAiSdk.startRecording({
windowId,
uploadToken: res.upload_token
});In addition to recording video-platform meetings, the Desktop Recording SDK can also record whole-desktop audio. This can be used to implement, for example, realtime note-takers for in person meetings or for platforms not yet supported by the Desktop Recording SDK.
requestPermission(permission)
requestPermission(permission)let permission = ...; // one of `accessibility`, `screen-capture`, or `microphone`.
RecallAiSdk.requestPermission(permission);If the Desktop Recording SDK is initialized to not request permissions on startup, you can manually request a permission using requestPermission. This will cause a dialog box to be presented to the user if the permission hasn't been requested before. If it has been declined before, nothing will happen.
shutdown()
shutdown()RecallAiSdk.shutdown();Shuts down the SDK. After calling this function, to resume use, the SDK must be initialized using init() again.
Updated about 2 hours ago