Adds a disco feature to distinguish jibri participants.

This commit is contained in:
damencho 2020-02-14 18:05:39 +00:00 committed by Дамян Минков
parent 64cbfb648f
commit 15fb8a1525
1 changed files with 11 additions and 0 deletions

View File

@ -15,6 +15,13 @@ import {
const logger = require('jitsi-meet-logger').getLogger(__filename);
/**
* The feature announced so we can distinguish jibri participants.
*
* @type {string}
*/
export const DISCO_JIBRI_FEATURE = 'http://jitsi.org/protocol/jibri';
/**
* Checks if we have data to use attach instead of connect. If we have the data
* executes attach otherwise check if we have to wait for the data. If we have
@ -91,6 +98,10 @@ function connect(id, password, roomName) {
jwt && issuer && issuer !== 'anonymous' ? jwt : undefined,
connectionConfig);
if (config.iAmRecorder) {
connection.addFeature(DISCO_JIBRI_FEATURE);
}
return new Promise((resolve, reject) => {
connection.addEventListener(
JitsiConnectionEvents.CONNECTION_ESTABLISHED,