Skip to content

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

fixup!

Saúl Ibarra Corretgéf7926c9cfb74
diff --git a/modules/API/API.js b/modules/API/API.js
index 2330faae2b..e61e5a394e 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -1450,6 +1450,22 @@ class API {
});
}
+ /**
+ * Notify external application that the data channel has been closed.
+ *
+ * @param {number} code - The close code.
+ * @param {string} reason - The close reason.
+ *
+ * @returns {void}
+ */
+ notifyDataChannelClosed(code: number, reason: string) {
+ this._sendEvent({
+ name: 'data-channel-closed',
+ code,
+ reason
+ });
+ }
+
/**
* Notify external application that the data channel has been opened.
*
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index d8b290245c..47c288459a 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -106,6 +106,7 @@ const events = {
'camera-error': 'cameraError',
'chat-updated': 'chatUpdated',
'content-sharing-participants-changed': 'contentSharingParticipantsChanged',
+ 'data-channel-closed': 'dataChannelClosed',
'data-channel-opened': 'dataChannelOpened',
'device-list-changed': 'deviceListChanged',
'display-name-change': 'displayNameChange',