Skip to content

Commit

Permalink
Adds a disco feature to distinguish jibri participants.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed Feb 14, 2020
1 parent 64cbfb6 commit 15fb8a1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 15fb8a1

Please sign in to comment.