feat(external-api): enhance recordingLinkAvailable to provide ttl info

pull/10532/head jitsi-meet_6694
Mihaela Dumitru 3 years ago committed by Saúl Ibarra Corretgé
parent 822850d888
commit 0fb29a0c7a
  1. 6
      modules/API/API.js
  2. 5
      react/features/recording/actions.any.js
  3. 2
      react/features/recording/functions.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
});
}

@ -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

@ -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);
}
/**

Loading…
Cancel
Save