Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(external-api): Add recording download link available event (#10229)

Horatiu Muresane273a05dd091
diff --git a/modules/API/API.js b/modules/API/API.js
index 2e20ff44c2..41f1cb28e6 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -1462,6 +1462,20 @@ class API {
});
}
+ /**
+ * Notify external application (if API is enabled) that the current recording link is
+ * available.
+ *
+ * @param {string} link - The recording download link.
+ * @returns {void}
+ */
+ notifyRecordingLinkAvailable(link: string) {
+ this._sendEvent({
+ name: 'recording-link-available',
+ link
+ });
+ }
+
/**
* Notify external application (if API is enabled) that a participant is knocking in the lobby.
*
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index 112555a8a8..140376bc5a 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -112,6 +112,7 @@ const events = {
'password-required': 'passwordRequired',
'proxy-connection-event': 'proxyConnectionEvent',
'raise-hand-updated': 'raiseHandUpdated',
+ 'recording-link-available': 'recordingLinkAvailable',
'recording-status-changed': 'recordingStatusChanged',
'video-ready-to-close': 'readyToClose',
'video-conference-joined': 'videoConferenceJoined',
diff --git a/react/features/recording/actions.any.js b/react/features/recording/actions.any.js
index 9502d83c43..5c9551fdc2 100644
--- a/react/features/recording/actions.any.js
+++ b/react/features/recording/actions.any.js
@@ -22,6 +22,8 @@ import {
import { getRecordingLink, getResourceId, isSavingRecordingOnDropbox } from './functions';
import logger from './logger';
+declare var APP: Object;
+
/**
* Clears the data of every recording sessions.
*
@@ -188,6 +190,10 @@ export function showStartedRecordingNotification(
try {
const link = await getRecordingLink(recordingSharingUrl, sessionId, region, tenant);
+ if (typeof APP === 'object') {
+ APP.API.notifyRecordingLinkAvailable(link);
+ }
+
// add the option to copy recording link
dialogProps.customActionNameKey = 'recording.copyLink';
dialogProps.customActionHandler = () => copyText(link);