Преглед на файлове

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,7 +374,6 @@ JitsiConference.prototype._init = function(options = {}) {
374 374
         this.statistics = new Statistics(this.xmpp, {
375 375
             aliasName: this._statsCurrentId,
376 376
             userName: config.statisticsDisplayName ? config.statisticsDisplayName : this.myUserId(),
377
-            callStatsConfIDNamespace: this.connection.options.hosts.domain,
378 377
             confID: config.confID || `${this.connection.options.hosts.domain}/${this.options.name}`,
379 378
             siteID: config.siteID,
380 379
             customScriptUrl: config.callStatsCustomScriptUrl,

+ 0
- 1
doc/API.md Целия файл

@@ -50,7 +50,6 @@ The ```options``` parameter is JS object with the following properties:
50 50
     - `disableThirdPartyRequests` - if true - callstats will be disabled and the callstats API won't be included.
51 51
     - `enableAnalyticsLogging` - boolean property (default false). Enables/disables analytics logging.
52 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 53
     - `disableRtx` - (optional) boolean property (default to false).  Enables/disable the use of RTX.
55 54
     - `disableH264` - (optional) boolean property (default to false).  If enabled, strips the H.264 codec from the local SDP.
56 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,8 +129,6 @@ Statistics.init = function(options) {
129 129
  * callstats.
130 130
  * @property {string} aliasName - The alias name to use when initializing callstats.
131 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 132
  * @property {string} confID - The callstats conference ID to use.
135 133
  * @property {string} callStatsID - Callstats credentials - the id.
136 134
  * @property {string} callStatsSecret - Callstats credentials - the secret.
@@ -174,10 +172,6 @@ export default function Statistics(xmpp, options) {
174 172
         if (!this.options.confID) {
175 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,7 +368,7 @@ Statistics.prototype.startCallStats = function(tpc, remoteUserID) {
374 368
         = new CallStats(
375 369
             tpc,
376 370
             {
377
-                confID: this._getCallStatsConfID(),
371
+                confID: this.options.confID,
378 372
                 remoteUserID
379 373
             });
380 374
 
@@ -399,19 +393,6 @@ Statistics._getAllCallStatsInstances = function() {
399 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 397
  * Removes the callstats.io instances.
417 398
  */
@@ -707,7 +688,7 @@ Statistics.prototype.sendFeedback = function(overall, comment) {
707 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 694
 Statistics.LOCAL_JID = require('../../service/statistics/constants').LOCAL_JID;

Loading…
Отказ
Запис