Browse Source

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

master
Horatiu Muresan 3 years ago
parent
commit
e273a05dd0
No account linked to committer's email address

+ 14
- 0
modules/API/API.js View File

1462
         });
1462
         });
1463
     }
1463
     }
1464
 
1464
 
1465
+    /**
1466
+     * Notify external application (if API is enabled) that the current recording link is
1467
+     * available.
1468
+     *
1469
+     * @param {string} link - The recording download link.
1470
+     * @returns {void}
1471
+     */
1472
+    notifyRecordingLinkAvailable(link: string) {
1473
+        this._sendEvent({
1474
+            name: 'recording-link-available',
1475
+            link
1476
+        });
1477
+    }
1478
+
1465
     /**
1479
     /**
1466
      * Notify external application (if API is enabled) that a participant is knocking in the lobby.
1480
      * Notify external application (if API is enabled) that a participant is knocking in the lobby.
1467
      *
1481
      *

+ 1
- 0
modules/API/external/external_api.js View File

112
     'password-required': 'passwordRequired',
112
     'password-required': 'passwordRequired',
113
     'proxy-connection-event': 'proxyConnectionEvent',
113
     'proxy-connection-event': 'proxyConnectionEvent',
114
     'raise-hand-updated': 'raiseHandUpdated',
114
     'raise-hand-updated': 'raiseHandUpdated',
115
+    'recording-link-available': 'recordingLinkAvailable',
115
     'recording-status-changed': 'recordingStatusChanged',
116
     'recording-status-changed': 'recordingStatusChanged',
116
     'video-ready-to-close': 'readyToClose',
117
     'video-ready-to-close': 'readyToClose',
117
     'video-conference-joined': 'videoConferenceJoined',
118
     'video-conference-joined': 'videoConferenceJoined',

+ 6
- 0
react/features/recording/actions.any.js View File

22
 import { getRecordingLink, getResourceId, isSavingRecordingOnDropbox } from './functions';
22
 import { getRecordingLink, getResourceId, isSavingRecordingOnDropbox } from './functions';
23
 import logger from './logger';
23
 import logger from './logger';
24
 
24
 
25
+declare var APP: Object;
26
+
25
 /**
27
 /**
26
  * Clears the data of every recording sessions.
28
  * Clears the data of every recording sessions.
27
  *
29
  *
188
                 try {
190
                 try {
189
                     const link = await getRecordingLink(recordingSharingUrl, sessionId, region, tenant);
191
                     const link = await getRecordingLink(recordingSharingUrl, sessionId, region, tenant);
190
 
192
 
193
+                    if (typeof APP === 'object') {
194
+                        APP.API.notifyRecordingLinkAvailable(link);
195
+                    }
196
+
191
                     // add the option to copy recording link
197
                     // add the option to copy recording link
192
                     dialogProps.customActionNameKey = 'recording.copyLink';
198
                     dialogProps.customActionNameKey = 'recording.copyLink';
193
                     dialogProps.customActionHandler = () => copyText(link);
199
                     dialogProps.customActionHandler = () => copyText(link);

Loading…
Cancel
Save