Desktop Recording SDK Event Types

The Desktop Recording SDK monitors for a variety of different events that you'll be able to subscribe to in your application. Below is a comprehensive list of all events that are currently available:

EventType

Definition

permissions-granted

Triggered when the user has granted all the required permissions to start recording.

meeting-detected

Triggered when a meeting is found, either when a new one starts, or after the SDK initializes and there is a meeting already in progress.

sdk-state-change

Triggered when the in-progress recording changes state, either to "idle" to indicate that recording is over, or "recording" to indicate that a recording is in progress.

recording-started

Triggered when a recording has started.

recording-ended

Triggered when a recording has stopped, due to the meeting ending, or calling stopRecording.

meeting-closed

Triggered when a detected meeting has ended.

media-capture-status

Triggered when media capture has been interrupted or resumed. In some cases, the meeting window can't be captured, so only audio is received (for instance, when the meeting window is on an inactive virtual desktop).

participant-capture-status

realtime-event

Triggered when real-time data is available, such as transcript information or participant join/leave events. Subscribe to real-time events with startRecording to receive these callbacks.

upload-progress

Triggered to notify your code of the state of a video upload. progress is a number from 0 to 100 representing upload completion.

meeting-updated

Triggered when meeting information has updated (usually when title or url have become known)

error:

Triggered when the Desktop Recording SDK has encountered an error. Right now, the only type is process, which indicates that the SDK has exited unexpectedly or failed to start. The SDK automatically tries to restart in case of unexpected shutdown, so it's not necessary to initialize and set up callbacks again.

permission-status

Triggered on startup to indicate the current status of the required permissions. The permission will be one of accessibility, screen-capture, or microphone. Status will be one of:

  • granted - Indicates that the permission was successfully granted.
  • not_requested - A soft failure; the user has not yet been prompted for permission. The SDK is expected to display the permission dialog shortly.
  • denied - A hard failure; the end user has explicitly denied the permission request.

shutdown

Triggered when the the Desktop Recording SDK shuts down normally.


Event listeners give you back different events with different structures, here they are:


RecallAiSdk.addEventListener("permissions-granted", async (evt) => {
  // The user has granted all the required permsisions to start recording
});

RecallAiSdk.addEventListener("meeting-detected", async (evt) => {
  const { window } = evt;
});

RecallAiSdk.addEventListener("sdk-state-change", async (evt) => {
  const {sdk: {state: { code }}} = evt;
  // code is either "recording" or "idle"
});

RecallAiSdk.addEventListener('recording-ended', async (evt) => {
  const { window } = evt;
});

RecallAiSdk.addEventListener('meeting-closed', async (evt) => {
  const { window } = evt;
});

RecallAiSdk.addEventListener('realtime-event', async (evt) => {
  const {window , type, status} = evt;
});

RecallAiSdk.addEventListener('upload-progress', async (evt) => {
  const {
    window: { id },
    progress: progress
  } = evt;
  // Progress is a number from 0-100 representing upload completion
});

RecallAiSdk.addEventListener('recording-started', async (evt) => {
  const { window } = evt;
});

RecallAiSdk.addEventListener('meeting-updated', async (evt) => {
  const { window } = evt;
});

RecallAiSdk.addEventListener('media-capture-status', async (evt) => {
  const { window, type, capturing } = evt;
  // type is 'video' or 'audio'
  // capturing is a boolean indicating capture status
});

RecallAiSdk.addEventListener('participant-capture-status', async (evt) => {
  const { window, type, participantId, capturing } = evt;
  // type is 'video', 'audio', or 'screenshare'
  // capturing is a boolean indicating capture status
});

RecallAiSdk.addEventListener('error', async (evt) => {
  const { window, type, message } = evt;
  const windowId = window?.id;
});

RecallAiSdk.addEventListener('permission-status', async (evt) => {
  const { permission, status } = evt;
  // Permission type (e.g. 'microphone'), 
  // status ["granted", "not_requested", "denied"] 
  //   (see event listener docs below for more information)
});

RecallAiSdk.addEventListener('shutdown', async (evt) => {
  const { code, signal } = evt;
});