瀏覽代碼

Adds a disco feature to distinguish jibri participants.

master
damencho 5 年之前
父節點
當前提交
15fb8a1525
共有 1 個檔案被更改,包括 11 行新增0 行删除
  1. 11
    0
      connection.js

+ 11
- 0
connection.js 查看文件

15
 
15
 
16
 const logger = require('jitsi-meet-logger').getLogger(__filename);
16
 const logger = require('jitsi-meet-logger').getLogger(__filename);
17
 
17
 
18
+/**
19
+ * The feature announced so we can distinguish jibri participants.
20
+ *
21
+ * @type {string}
22
+ */
23
+export const DISCO_JIBRI_FEATURE = 'http://jitsi.org/protocol/jibri';
24
+
18
 /**
25
 /**
19
  * Checks if we have data to use attach instead of connect. If we have the data
26
  * Checks if we have data to use attach instead of connect. If we have the data
20
  * executes attach otherwise check if we have to wait for the data. If we have
27
  * executes attach otherwise check if we have to wait for the data. If we have
91
             jwt && issuer && issuer !== 'anonymous' ? jwt : undefined,
98
             jwt && issuer && issuer !== 'anonymous' ? jwt : undefined,
92
             connectionConfig);
99
             connectionConfig);
93
 
100
 
101
+    if (config.iAmRecorder) {
102
+        connection.addFeature(DISCO_JIBRI_FEATURE);
103
+    }
104
+
94
     return new Promise((resolve, reject) => {
105
     return new Promise((resolve, reject) => {
95
         connection.addEventListener(
106
         connection.addEventListener(
96
             JitsiConnectionEvents.CONNECTION_ESTABLISHED,
107
             JitsiConnectionEvents.CONNECTION_ESTABLISHED,

Loading…
取消
儲存