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})
init({apiUrl})RecallAiSdk.init({
apiUrl: "https://us-west-2.recall.ai",
});Initializes the SDK. You'll need to pass this parameter on startup:
apiUrl: The URL corresponding to the region your Recall.ai workspace belongs to:
| Region | Base URL |
|---|---|
| US (Pay-as-you-go) | https://us-west-2.recall.ai |
| US (Monthly plan) | https://us-east-1.recall.ai |
| EU | https://eu-central-1.recall.ai |
| Japan | https://ap-northeast-1.recall.ai |
requestPermission(permission)
requestPermission(permission)let permission = ...; // one of `accessibility`, `screen-capture`, or `microphone`.
RecallAiSdk.requestPermission(permission);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.
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.
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);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 5 hours ago