ucservice 1.2.1 → 1.2.4

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.
@@ -14230,10 +14230,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
14230
14230
  return;
14231
14231
  }
14232
14232
 
14233
- let janusUrl = me._opts.conf.janusUrl;
14234
- checkIsHttps() && (janusUrl = janusUrl.replace('ws:', 'wss:'));
14233
+ let janusUrl = me._opts.conf.janusUrl; //没有证书,项目需要不使用wss
14234
+ // checkIsHttps() && (janusUrl = janusUrl.replace('ws:','wss:'));
14235
+
14235
14236
  me._opts.janus = new Janus({
14236
- server: janusUrl.indexOf("127.0.0.1") == -1 ? janusUrl : janusUrl.split("//")[0] + "//" + location.hostname + ":" + janusUrl.split(":")[2],
14237
+ // server: janusUrl.indexOf("127.0.0.1") == -1 ? janusUrl : janusUrl.split("//")[0] + "//" + (location.hostname)+":"+janusUrl.split(":")[2],
14238
+ //使用项目必须定义window.janusHttpsHost来适应https
14239
+ server: location.protocol == "https:" ? janusUrl.split("//")[0] + "//" + "szh.rfb.zj.gov.cn/tytx" + "/janus/" : janusUrl,
14237
14240
  success: function () {
14238
14241
  console.log("Janus服务连接成功!");
14239
14242
 
@@ -16030,9 +16033,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
16030
16033
  if (_connecting) {
16031
16034
  return;
16032
16035
  } // Mangle the URL, changing the scheme from 'http' to 'ws'.
16036
+ // var url = _cometd.getURL().replace(/^http/, 'ws');
16037
+ //因证书问题,暂时将https和http都改成ws
16033
16038
 
16034
16039
 
16035
- var url = _cometd.getURL().replace(/^http/, 'ws');
16040
+ var url = _cometd.getURL().replace(/^https/, 'ws').replace(/^http/, 'ws');
16036
16041
 
16037
16042
  this._debug('Transport', this.getType(), 'connecting to URL', url);
16038
16043
 
Binary file