@flashphoner/websdk 2.0.277 → 2.0.281

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -466,7 +466,7 @@ var RTCMetricsCollector = /*#__PURE__*/function () {
466
466
  }, {
467
467
  key: "collect",
468
468
  value: function collect(enable) {
469
- this._logger.info(constants_1.LOG_PREFIX, "Collecting state changed: ", enable ? "enabled" : "disabled");
469
+ this._logger.info(constants_1.LOG_PREFIX, "Collecting state changed: ".concat(enable ? "enabled" : "disabled"));
470
470
  if (enable) {
471
471
  if (this._metricsScheduler == null) {
472
472
  this._metricsScheduler = setInterval(this._collectMetrics, this._description.sampling);
@@ -681,7 +681,7 @@ var RTCMetricsCollector = /*#__PURE__*/function () {
681
681
  return _regenerator().w(function (_context4) {
682
682
  while (1) switch (_context4.n) {
683
683
  case 0:
684
- this._logger.info(constants_1.LOG_PREFIX, "Send headers:", this._headers);
684
+ this._logger.info(constants_1.LOG_PREFIX, "Send headers: ".concat(this._headers));
685
685
  _context4.n = 1;
686
686
  return this._metricsSender.sendDescription({
687
687
  headers: this._headers,
@@ -724,7 +724,7 @@ var RTCMetricsCollector = /*#__PURE__*/function () {
724
724
  this._logger.debug(constants_1.LOG_PREFIX, "Successfully sent metrics batch");
725
725
  this._errorsCount = 0;
726
726
  } else {
727
- this._logger.error(constants_1.LOG_PREFIX, "Failed to send metrics batch with status:", status);
727
+ this._logger.error(constants_1.LOG_PREFIX, "Failed to send metrics batch with status: ".concat(status));
728
728
  this._errorsCount++;
729
729
  }
730
730
  this._batch.release();
@@ -885,7 +885,7 @@ exports.RTCMetricsDelimiter = exports.RTCMetricsCompressionType = exports.RTCMet
885
885
  /**
886
886
  * Prefix used for logging within the metrics collector.
887
887
  */
888
- exports.LOG_PREFIX = "stats-collector -";
888
+ exports.LOG_PREFIX = "stats-collector";
889
889
  /**
890
890
  * Supported connection types for metrics transport.
891
891
  */
@@ -16766,6 +16766,19 @@ var CONTENT_HINT_TYPE = Object.freeze({
16766
16766
  */
16767
16767
  TEXT: 'text'
16768
16768
  });
16769
+
16770
+ /**
16771
+ * Server information constants
16772
+ * @namespace Flashphoner.constants.SERVER_INFO
16773
+ */
16774
+ var SERVER_INFO = Object.freeze({
16775
+ /**
16776
+ * The version of the WCS that the current session is connected to
16777
+ * @see Session
16778
+ * @memberOf Flashphoner.constants.SERVER_INFO
16779
+ */
16780
+ SERVER_VERSION: 'serverVersion'
16781
+ });
16769
16782
  module.exports = {
16770
16783
  SESSION_STATUS: SESSION_STATUS,
16771
16784
  STREAM_STATUS: STREAM_STATUS,
@@ -16778,7 +16791,8 @@ module.exports = {
16778
16791
  CONNECTION_QUALITY: CONNECTION_QUALITY,
16779
16792
  STREAM_EVENT: STREAM_EVENT,
16780
16793
  STREAM_EVENT_TYPE: STREAM_EVENT_TYPE,
16781
- CONTENT_HINT_TYPE: CONTENT_HINT_TYPE
16794
+ CONTENT_HINT_TYPE: CONTENT_HINT_TYPE,
16795
+ SERVER_INFO: SERVER_INFO
16782
16796
  };
16783
16797
 
16784
16798
  },{}],73:[function(require,module,exports){
@@ -16827,6 +16841,7 @@ var clientUAData;
16827
16841
  */
16828
16842
 
16829
16843
  var SESSION_STATUS = constants.SESSION_STATUS;
16844
+ var SERVER_INFO = constants.SERVER_INFO;
16830
16845
  var STREAM_EVENT = constants.STREAM_EVENT;
16831
16846
  var STREAM_EVENT_TYPE = constants.STREAM_EVENT_TYPE;
16832
16847
  var STREAM_STATUS = constants.STREAM_STATUS;
@@ -17345,6 +17360,7 @@ var createSession = function createSession(options) {
17345
17360
  var wsPingSender = new WSPingSender(options.pingInterval || 0);
17346
17361
  var wsPingReceiver = new WSPingReceiver(options.receiveProbes || 0, options.probesInterval || 0);
17347
17362
  var connectionTimeout;
17363
+ var serverVersion;
17348
17364
  var cConfig;
17349
17365
  //SIP config
17350
17366
  var sipConfig;
@@ -17491,6 +17507,11 @@ var createSession = function createSession(options) {
17491
17507
  webRTCMetricsServerDescription = obj.webRTCMetricsServerDescription;
17492
17508
  onSessionStatusChange(SESSION_STATUS.ESTABLISHED, obj);
17493
17509
  break;
17510
+ case 'getVersion':
17511
+ serverVersion = obj;
17512
+ logger.info(LOG_PREFIX, "server version: " + serverVersion);
17513
+ callbacks[SERVER_INFO.SERVER_VERSION](session);
17514
+ break;
17494
17515
  case 'setRemoteSDP':
17495
17516
  var mediaSessionId = data.data[0];
17496
17517
  var sdp = data.data[1];
@@ -19763,6 +19784,17 @@ var createSession = function createSession(options) {
19763
19784
  return sessionStatus;
19764
19785
  };
19765
19786
 
19787
+ /**
19788
+ * Get server version
19789
+ *
19790
+ * @returns {string} serverVersion Server version
19791
+ * @memberof Session
19792
+ * @inner
19793
+ */
19794
+ var getServerVersion = function getServerVersion() {
19795
+ return serverVersion;
19796
+ };
19797
+
19766
19798
  /**
19767
19799
  * Get stream by id.
19768
19800
  *
@@ -20006,6 +20038,7 @@ var createSession = function createSession(options) {
20006
20038
  session.stopDebug = stopDebug;
20007
20039
  session.on = on;
20008
20040
  session.getLogger = getLogger;
20041
+ session.getServerVersion = getServerVersion;
20009
20042
 
20010
20043
  //save interface to global map
20011
20044
  sessions[id_] = session;
@@ -22298,7 +22331,7 @@ var getMobileDevices = /*#__PURE__*/function () {
22298
22331
  case 0:
22299
22332
  deviceId = null;
22300
22333
  mediaConstraints = {
22301
- audio: false,
22334
+ audio: constraints.audio,
22302
22335
  video: constraints.video
22303
22336
  };
22304
22337
  mediaConstraints.video.facingMode = facingMode;