ucservice 1.0.3 → 1.0.6

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ucservice",
3
3
  "private": false,
4
- "version": "1.0.3",
4
+ "version": "1.0.6",
5
5
  "description": "统一通信服务",
6
6
  "main": "dist/ucservice.common.js",
7
7
  "style": "ucservice.css",
@@ -15,7 +15,7 @@ export const loadJson = function(url, param, backSuccfn, async, method, headers)
15
15
  async = (async == undefined? true:async);
16
16
  let ajaxContent = {
17
17
  'method': method,
18
- 'url': server + url,
18
+ 'url': url,
19
19
  'data': param,
20
20
  'async' : async
21
21
  }
@@ -31,16 +31,17 @@ export const loadJson = function(url, param, backSuccfn, async, method, headers)
31
31
  }
32
32
 
33
33
  /**
34
- *
34
+ * @param {*} sip //用户传过来的服务ip地址 http://{ip}:{port}
35
35
  * @param {*} meetcallfunc 会议通知处理
36
36
  * @param {*} callfunc 呼叫通知处理
37
37
  * @param {*} videocallfunc 视频通知处理
38
38
  * @param {*} connectcallfunc 通讯录通知处理
39
39
  */
40
- export const initCometd = function(meetcallfunc, callfunc, videocallfunc, connectcallfunc){ //初始
40
+ export const initCometd = function(meetcallfunc, callfunc, videocallfunc, connectcallfunc, sip){ //初始
41
+ let server_ = sip || server;
41
42
  let _cometd = new cometd.CometD("xjInfoReport");
42
43
  _cometd.websocketEnabled = true;
43
- let cometdUrl = server + cometd_server;
44
+ let cometdUrl = server_ + cometd_server;
44
45
  _cometd.init({
45
46
  url: cometdUrl,
46
47
  logLevel: "info"
@@ -105,13 +106,15 @@ function doSubscribe(_cometd, callback) {
105
106
 
106
107
  /**
107
108
  * 初始化视频获取视频对象
109
+ * @param {*} sip //用户传过来的服务ip地址 http://{ip}:{port}
108
110
  * @param {*} token
109
111
  * @param {*} videoArea //展示视频的容器模块
110
112
  * 使用该方法前提是videoArea等相关dom节点必须已加载完毕
111
113
  */
112
- export const initVideo = function(token, videoArea){ //读取视频服务配置初始化视频
114
+ export const initVideo = function(token, videoArea, sip){ //读取视频服务配置初始化视频
115
+ let server_ = sip || server;
113
116
  return new Promise((resolve, reject) =>{
114
- let url = server + '/scooper-video/conf/data';
117
+ let url = server_ + '/scooper-video/conf/data';
115
118
  var param = {};
116
119
  $.getJSON(url,param,function (conf) {
117
120
  // 初始化视频播放方式
package/src/config.js CHANGED
@@ -9,7 +9,7 @@ import message from '@/net_url/message_url'; //短信
9
9
  import record from '@/net_url/record_url'; //录音录像
10
10
  import video from '@/net_url/video_net_url'; //视频
11
11
 
12
- export const server = 'http://10.249.4.152:8080'; //服务地址
12
+ export const server = 'http://10.249.4.152:8080'; //内网服务地址
13
13
  export const cometd_server = '/scooper-msg-queue/cometd'; //
14
14
 
15
15
  export { account, aduio, aduio_video, dept_ry, dept, location, meet, message, record, video}