From 15fb8a152520298580f69fdfa3579dffce2834e7 Mon Sep 17 00:00:00 2001 From: damencho Date: Fri, 14 Feb 2020 18:05:39 +0000 Subject: [PATCH] Adds a disco feature to distinguish jibri participants. --- connection.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/connection.js b/connection.js index 12a1beda6..761ddd2a9 100644 --- a/connection.js +++ b/connection.js @@ -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,