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): enhance recordingLinkAvailable to provide ttl info

Mihaela Dumitru0fb29a0c7ac7
diff --git a/modules/API/API.js b/modules/API/API.js
index eeddba6af5..9a8621f448 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -1470,12 +1470,14 @@ class API {
* available.
*
* @param {string} link - The recording download link.
+ * @param {number} ttl - The recording download link time to live.
* @returns {void}
*/
- notifyRecordingLinkAvailable(link: string) {
+ notifyRecordingLinkAvailable(link: string, ttl: number) {
this._sendEvent({
name: 'recording-link-available',
- link
+ link,
+ ttl
});
}
diff --git a/react/features/recording/actions.any.js b/react/features/recording/actions.any.js
index 96c65102b3..47365c2758 100644
--- a/react/features/recording/actions.any.js
+++ b/react/features/recording/actions.any.js
@@ -198,10 +198,11 @@ export function showStartedRecordingNotification(
const tenant = getVpaasTenant(state);
try {
- const link = await getRecordingLink(recordingSharingUrl, sessionId, region, tenant);
+ const response = await getRecordingLink(recordingSharingUrl, sessionId, region, tenant);
+ const { url: link, urlExpirationTimeMillis: ttl } = response;
if (typeof APP === 'object') {
- APP.API.notifyRecordingLinkAvailable(link);
+ APP.API.notifyRecordingLinkAvailable(link, ttl);
}
// add the option to copy recording link
diff --git a/react/features/recording/functions.js b/react/features/recording/functions.js
index 7206f51154..82592e333c 100644
--- a/react/features/recording/functions.js
+++ b/react/features/recording/functions.js
@@ -65,7 +65,7 @@ export async function getRecordingLink(url: string, recordingSessionId: string,
});
const json = await res.json();
- return res.ok ? json.url : Promise.reject(json);
+ return res.ok ? json : Promise.reject(json);
}
/**