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})

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:

requestPermission(permission)

let permission = ...;
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. You can pass in one of the permissions defined here.

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})

RecallAiSdk.stopRecording({
  windowId: ...,
});

Stop recording. This function can be called to end a recording before the meeting itself has naturally ended.

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})

RecallAiSdk.resumeRecording({
  windowId: ...,
});

Resume recording.

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.

shutdown()

RecallAiSdk.shutdown();

Shuts down the SDK. After calling this function, to resume use, the SDK must be initialized using init() again.