Desktop Recording SDK Event Types

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:

EventTypeDefinition
permissions-grantedTriggered when the user has granted all the required permissions to start recording.
meeting-detectedTriggered when a meeting is found, either when a new one starts, or after the SDK initializes and there is a meeting already in progress.
recording-startedTriggered when a recording has started.
recording-endedTriggered when a recording has stopped, due to the meeting ending, or calling stopRecording.
meeting-closedTriggered when a detected meeting has ended.
media-capture-statusTriggered 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-statusTriggered when media capture for a participant has been interrupted or resumed. For example, when a user's video tile becomes no longer visible due to overcrowding in the meeting window, this event will be triggered to notify your code that that participant's video is not captured.
realtime-eventTriggered 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.
meeting-updatedTriggered 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-statusTriggered 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.
network-statusTriggered to indicate the status of a user's network connection. The network status will be one of disconnected, reconnected.
  • disconnected - Network has been down for 5 seconds
  • reconnected - Network has been back up for 5 seconds after a disconnect
If the network has been disconnected for 2 minutes, all recordings will be stopped automatically.
shutdownTriggered when the the Desktop Recording SDK shuts down normally.

Event Listeners

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('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('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('network-status', async (evt) => {
    if (evt.status === 'disconnected') {
      // Network has been down for 5s
    } else if (evt.status === 'reconnected') {
      // Network has been back up for 5s after a disconnect
    }
  });

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