瀏覽代碼

ref: Drops callStatsConfIDNamespace and uses only confID.

master
damencho 5 年之前
父節點
當前提交
8366abe364
共有 3 個文件被更改,包括 2 次插入23 次删除
  1. 0
    1
      JitsiConference.js
  2. 0
    1
      doc/API.md
  3. 2
    21
      modules/statistics/statistics.js

+ 0
- 1
JitsiConference.js 查看文件

374
         this.statistics = new Statistics(this.xmpp, {
374
         this.statistics = new Statistics(this.xmpp, {
375
             aliasName: this._statsCurrentId,
375
             aliasName: this._statsCurrentId,
376
             userName: config.statisticsDisplayName ? config.statisticsDisplayName : this.myUserId(),
376
             userName: config.statisticsDisplayName ? config.statisticsDisplayName : this.myUserId(),
377
-            callStatsConfIDNamespace: this.connection.options.hosts.domain,
378
             confID: config.confID || `${this.connection.options.hosts.domain}/${this.options.name}`,
377
             confID: config.confID || `${this.connection.options.hosts.domain}/${this.options.name}`,
379
             siteID: config.siteID,
378
             siteID: config.siteID,
380
             customScriptUrl: config.callStatsCustomScriptUrl,
379
             customScriptUrl: config.callStatsCustomScriptUrl,

+ 0
- 1
doc/API.md 查看文件

50
     - `disableThirdPartyRequests` - if true - callstats will be disabled and the callstats API won't be included.
50
     - `disableThirdPartyRequests` - if true - callstats will be disabled and the callstats API won't be included.
51
     - `enableAnalyticsLogging` - boolean property (default false). Enables/disables analytics logging.
51
     - `enableAnalyticsLogging` - boolean property (default false). Enables/disables analytics logging.
52
     - `callStatsCustomScriptUrl` - (optional) custom url to access callstats client script
52
     - `callStatsCustomScriptUrl` - (optional) custom url to access callstats client script
53
-    - `callStatsConfIDNamespace` - (optional) a namespace to prepend the callstats conference ID with. Defaults to the window.location.hostname
54
     - `disableRtx` - (optional) boolean property (default to false).  Enables/disable the use of RTX.
53
     - `disableRtx` - (optional) boolean property (default to false).  Enables/disable the use of RTX.
55
     - `disableH264` - (optional) boolean property (default to false).  If enabled, strips the H.264 codec from the local SDP.
54
     - `disableH264` - (optional) boolean property (default to false).  If enabled, strips the H.264 codec from the local SDP.
56
     - `preferH264` - (optional) boolean property (default to false).  Enables/disable preferring the first instance of an h264 codec in an offer by moving it to the front of the codec list.
55
     - `preferH264` - (optional) boolean property (default to false).  Enables/disable preferring the first instance of an h264 codec in an offer by moving it to the front of the codec list.

+ 2
- 21
modules/statistics/statistics.js 查看文件

129
  * callstats.
129
  * callstats.
130
  * @property {string} aliasName - The alias name to use when initializing callstats.
130
  * @property {string} aliasName - The alias name to use when initializing callstats.
131
  * @property {string} userName - The user name to use when initializing callstats.
131
  * @property {string} userName - The user name to use when initializing callstats.
132
- * @property {string} callStatsConfIDNamespace - A namespace to prepend the
133
- * callstats conference ID with.
134
  * @property {string} confID - The callstats conference ID to use.
132
  * @property {string} confID - The callstats conference ID to use.
135
  * @property {string} callStatsID - Callstats credentials - the id.
133
  * @property {string} callStatsID - Callstats credentials - the id.
136
  * @property {string} callStatsSecret - Callstats credentials - the secret.
134
  * @property {string} callStatsSecret - Callstats credentials - the secret.
174
         if (!this.options.confID) {
172
         if (!this.options.confID) {
175
             logger.warn('"confID" is not defined');
173
             logger.warn('"confID" is not defined');
176
         }
174
         }
177
-
178
-        if (!this.options.callStatsConfIDNamespace) {
179
-            logger.warn('"callStatsConfIDNamespace" is not defined');
180
-        }
181
     }
175
     }
182
 
176
 
183
     /**
177
     /**
374
         = new CallStats(
368
         = new CallStats(
375
             tpc,
369
             tpc,
376
             {
370
             {
377
-                confID: this._getCallStatsConfID(),
371
+                confID: this.options.confID,
378
                 remoteUserID
372
                 remoteUserID
379
             });
373
             });
380
 
374
 
399
     return csInstances;
393
     return csInstances;
400
 };
394
 };
401
 
395
 
402
-/**
403
- * Constructs the CallStats conference ID based on the options currently
404
- * configured in this instance.
405
- * @return {string}
406
- * @private
407
- */
408
-Statistics.prototype._getCallStatsConfID = function() {
409
-    // The conference ID is case sensitive!!!
410
-    return this.options.callStatsConfIDNamespace
411
-        ? `${this.options.callStatsConfIDNamespace}/${this.options.roomName}`
412
-        : this.options.roomName;
413
-};
414
-
415
 /**
396
 /**
416
  * Removes the callstats.io instances.
397
  * Removes the callstats.io instances.
417
  */
398
  */
707
             comment
688
             comment
708
         });
689
         });
709
 
690
 
710
-    return CallStats.sendFeedback(this._getCallStatsConfID(), overall, comment);
691
+    return CallStats.sendFeedback(this.options.confID, overall, comment);
711
 };
692
 };
712
 
693
 
713
 Statistics.LOCAL_JID = require('../../service/statistics/constants').LOCAL_JID;
694
 Statistics.LOCAL_JID = require('../../service/statistics/constants').LOCAL_JID;

Loading…
取消
儲存