This commit is contained in:
Saúl Ibarra Corretgé
2022-11-18 11:32:15 +01:00
committed by Saúl Ibarra Corretgé
parent 533501deb6
commit f7926c9cfb
2 changed files with 17 additions and 0 deletions

View File

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