ucservice 1.8.0 → 1.8.2

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.
@@ -1,162 +0,0 @@
1
- let cometd = require('./lib/cometd.js');
2
- import { server, cometd_server } from '@/config';
3
- let Video = require('./scooper.video');
4
- let $ = require('jquery');
5
- /**
6
- * 接口请求通用方法
7
- * @param {*} url
8
- * @param {*} param
9
- * @param {*} backSuccfn
10
- * @param {*} async
11
- * @param {*} method
12
- */
13
- export const loadJson = function(url, param, backSuccfn, async, method, headers) {
14
- method = (method? method:'POST');
15
- async = ((async == undefined || async == '')? true:async);
16
- for(let key in param){ //检测手机号码, 外地号码头部(非杭州)加00,本地号码加0
17
- if(/_phone01$/.test(key)){
18
- let tel = key.replace(/_phone01$/, "");
19
- if(param[key] == 0){ //外地号码
20
- param[tel] = "00" + param[tel];
21
- }else{
22
- param[tel] = "0" + param[tel];
23
- }
24
- delete param[key];
25
- }
26
- }
27
- let ajaxContent = {
28
- 'type': method,
29
- 'url': url,
30
- 'data': param,
31
- 'async' : async
32
- }
33
- if(headers) Object.assign(ajaxContent, headers);
34
- $.ajax(ajaxContent).fail(function(jqXHR,sts){
35
- console.error('加载数据失败:' + sts + ", " + url);
36
- }).done(function(ret){
37
- if (!ret || ret.code != 0) {
38
- console.error('加载数据失败:' + JSON.stringify(ret) + ", " + url);
39
- }
40
- if (backSuccfn) backSuccfn(ret);
41
- });
42
- }
43
-
44
- /**
45
- * @param {*} sip //用户传过来的服务ip地址 http://{ip}:{port}
46
- * @param {*} meetcallfunc 会议通知处理
47
- * @param {*} callfunc 呼叫通知处理
48
- * @param {*} videocallfunc 视频通知处理
49
- * @param {*} connectcallfunc 通讯录通知处理
50
- */
51
- export const initCometd = function(meetcallfunc, callfunc, videocallfunc, connectcallfunc, sip){ //初始
52
- let server_ = sip || server;
53
- let _cometd = new cometd.CometD("xjInfoReport");
54
- _cometd.websocketEnabled = true;
55
- let cometdUrl = server_ + cometd_server;
56
- _cometd.init({
57
- url: cometdUrl,
58
- logLevel: "info"
59
- });
60
-
61
- _cometd.addListener("/meta/handshake", function(message) {
62
- if (message.successful) {
63
- console.log("handshake success.");
64
- }
65
- });
66
-
67
- let _connected = false;
68
- _cometd.addListener('/meta/connect', function(message) {
69
- if (message.successful) {
70
- if (!_connected) {
71
- doSubscribe(_cometd, {meetcallfunc, callfunc, videocallfunc, connectcallfunc});
72
- }
73
- _connected = true;
74
- } else {
75
- _connected = false;
76
- console.log("连接cometd后台失败");
77
- }
78
- });
79
- }
80
-
81
- function doSubscribe(_cometd, callback) {
82
-
83
- /**
84
- * 会场模块消息通知
85
- */
86
- if(callback.meetcallfunc){
87
- _cometd.subscribe("/dispatch-web/notify/meet/#", null, function(message) {
88
- callback.meetcallfunc(message);
89
- });
90
- }
91
-
92
- /**
93
- * 呼叫模块消息通知
94
- */
95
- if(callback.callfunc){
96
- _cometd.subscribe("/dispatch-web/notify/call/#", null, function(message) {
97
- callback.callfunc(message);
98
- });
99
- }
100
-
101
- /**
102
- * 视频通话状态消息通知(视频通话建立 和 中断)
103
- */
104
- if(callback.videocallfunc){
105
- _cometd.subscribe("/server/#", null, function(message) {
106
- callback.videocallfunc(message);
107
- });
108
- }
109
-
110
- //'#':多级通配,订阅所有的主题
111
- if(callback.connectcallfunc){
112
- _cometd.subscribe("/scooper_core/#", null, function(message) {
113
- callback.connectcallfunc(message);
114
- });
115
- }
116
- }
117
-
118
- /**
119
- * 初始化视频获取视频对象
120
- * @param {*} sip //用户传过来的服务ip地址 http://{ip}:{port}
121
- * @param {*} token
122
- * @param {*} videoArea //展示视频的容器模块
123
- * 使用该方法前提是videoArea等相关dom节点必须已加载完毕
124
- */
125
- export const initVideo = function(token, videoArea, videoOpts_, sip){ //读取视频服务配置初始化视频
126
- let server_ = sip || server;
127
- return new Promise((resolve, reject) =>{
128
- let url = server_ + '/scooper-video/conf/data';
129
- let param = {};
130
- $.getJSON(url,param,function (conf) {
131
- // 初始化视频播放方式
132
- // initplaVideoType();
133
- let janusUrl = conf['video.janus.url'];
134
- let videoOpts = {
135
- //初始化时的界面显示的分屏树
136
- windows: 4,
137
- //共有哪几种分屏
138
- windowsArr: [1, 2, 4, 9, 16],
139
- //总的窗口数
140
- windowsNum: 16,
141
- conf: {
142
- user: conf['video.username'],
143
- passwd: conf['video.password'],
144
- ip: conf['video.ip'],
145
- port: conf['video.port'],
146
- janusUrl: conf['video.janus.url'],
147
- token: token
148
- },
149
- extra: false,
150
- streamType: conf['video.stream'],
151
- openChangeWindowStrategy: conf['video.openChangeWindowStrategy'] === 'true',
152
- capImage: conf['video.cap.image'] === 'true',
153
- videoCapImagePath: conf['video.cap.image.path'],
154
- videoInfoInBottom: false
155
- };
156
- if(videoOpts_) Object.assign(videoOpts, videoOpts_);
157
- conf['video.poll.time'] && (videoOpts.pollInterval = conf['video.poll.time']);
158
- let videoController = new Video($(videoArea), videoOpts);
159
- resolve(videoController);
160
- })
161
- })
162
- }
package/src/config.js DELETED
@@ -1,15 +0,0 @@
1
- import account from '@/net_url/account_net_url'; //账号
2
- import aduio from '@/net_url/aduio_net_url'; //音频
3
- import aduio_video from '@/net_url/aduio_video_net_url'; //音频、视频公共接口
4
- import dept_ry from '@/net_url/dept_ry_url'; //部门成员
5
- import dept from '@/net_url/dept_url'; //部门
6
- import location from '@/net_url/location_url'; //定位
7
- import meet from '@/net_url/meet_url'; //会议
8
- import message from '@/net_url/message_url'; //短信
9
- import record from '@/net_url/record_url'; //录音录像
10
- import video from '@/net_url/video_net_url'; //视频
11
-
12
- export const server = 'http://10.249.4.152:8080'; //内网服务地址
13
- export const cometd_server = '/scooper-msg-queue/cometd'; //
14
-
15
- export { account, aduio, aduio_video, dept_ry, dept, location, meet, message, record, video}
@@ -1,343 +0,0 @@
1
- @charset "UTF-8";
2
- .video-main{
3
- position: absolute;
4
- top: 0px;
5
- left: -25px;
6
- right: -12px;
7
- bottom: -18px;
8
- }
9
- .video-main-full{
10
- position: absolute;
11
- top: 1px;
12
- left: 1px;
13
- right: 1px;
14
- bottom: 1px;
15
- /*border:1px solid #999;*/
16
- }
17
- .video-main>li, .video-main-full>li{
18
- border: 1px solid #aaa;
19
- float: left;
20
- position: relative;
21
- }
22
- .video-main>li.loading, .video-main-full>li.loading{
23
- background: #000;
24
- }
25
- .video-main>li:hover, .video-main-full>li:hover{
26
- border: 1px solid #ffb951;
27
- }
28
- .video-main>li.sel, .video-main-full>li.sel{
29
- border: 1px solid #ef8601;
30
- }
31
- .video-main.mode-1>li, .video-main-full.mode-1>li{
32
- width: 98.5%;
33
- height: 98.5%;
34
- list-style: none;
35
- }
36
- .video-main.mode-1>li .info, .video-main-full.mode-1>li .info{
37
- font-size:20px;
38
- bottom: 40px;
39
- }
40
- .video-main > li .info-self{
41
- position: absolute;
42
- left: 2.5rem;
43
- top: 1rem;
44
- font-size: 1rem;
45
- z-index: 9;
46
- }
47
- .video-main.mode-4>li{
48
- width: 49%;
49
- height: 49%;
50
- list-style: none;
51
- }
52
- .video-main.mode-4>li .info{
53
- font-size:18px;
54
- bottom: 20px;
55
- }
56
- .video-main.mode-6>li{
57
- width: 33.33%;
58
- height: 33.33%;
59
- }
60
- .video-main.mode-6>li .info{
61
- font-size:14px;
62
- bottom: 13px;
63
- }
64
- .video-main.mode-6 .screen-1{
65
- width: 66.66%;
66
- height: 66.65%;
67
- }
68
- .video-main.mode-6 .screen-1 .info{
69
- font-size:18px;
70
- bottom: 30px;
71
- }
72
- .video-main.mode-9>li{
73
- width: 32.5%;
74
- height: 32.5%;
75
- list-style: none;
76
- }
77
- .video-main.mode-9>li .info{
78
- font-size:12px;
79
- bottom: 14px;
80
- }
81
- .video-main.mode-16>li{
82
- width: 24.5%;
83
- height: 24.5%;
84
- list-style: none;
85
- }
86
- .video-main.mode-16>li .info{
87
- font-size:8px;
88
- bottom: 10px;
89
- }
90
- .video-box{
91
- object-fit: fill;
92
- display:none;
93
- width: 100%;
94
- height: 100%;
95
- }
96
- .video-main .video-box.scale-scene{
97
- width: 100%!important;
98
- height: 100%!important;
99
- object-fit: fill!important;
100
- }
101
- .video-main.mode-4 .close-btn {
102
- width: 1.1rem;
103
- height: 1.1rem;
104
- }
105
- .video-main.mode-9 .close-btn {
106
- width: 0.95rem;
107
- height: 0.95rem;
108
- }
109
- .video-main.mode-16 .close-btn {
110
- width: 0.85rem;
111
- height: 0.85rem;
112
- }
113
- .video-main.mode-4 .recv-audio-btn {
114
- bottom: -4px;
115
- right: 1.8rem;
116
- width: 2.5rem;
117
- height: 2.5rem;
118
- }
119
- .video-main.mode-9 .recv-audio-btn {
120
- bottom: -3px;
121
- right: 1.6rem;
122
- width: 2.2rem;
123
- height: 2.2rem;
124
- }
125
- .video-main.mode-16 .recv-audio-btn {
126
- bottom: -2px;
127
- right: 1.4rem;
128
- width: 2rem;
129
- height: 2rem;
130
- }
131
- .video-main.mode-4 .unrecv-audio-btn {
132
- bottom: -4px;
133
- right: 1.8rem;
134
- width: 2.5rem;
135
- height: 2.5rem;
136
- }
137
- .video-main.mode-9 .unrecv-audio-btn {
138
- bottom: -3px;
139
- right: 1.6rem;
140
- width: 2.2rem;
141
- height: 2.2rem;
142
- }
143
- .video-main.mode-16 .unrecv-audio-btn {
144
- bottom: -2px;
145
- right: 1.4rem;
146
- width: 2rem;
147
- height: 2rem;
148
- }
149
- .video-main.mode-4 .rotate-btn {
150
- bottom: 3px;
151
- right: 4.8rem;
152
- width: 1.5rem;
153
- height: 1.5rem;
154
- }
155
- .video-main.mode-9 .rotate-btn {
156
- bottom: 3px;
157
- right: 4.2rem;
158
- width: 1.42rem;
159
- height: 1.42rem;
160
- }
161
- .video-main.mode-16 .rotate-btn {
162
- bottom: 3px;
163
- right: 3.7rem;
164
- width: 1.3rem;
165
- height: 1.3rem;
166
- }
167
-
168
- .video-main.mode-4 .scale-btn {
169
- bottom: 7px;
170
- right: 7.5rem;
171
- width: 1rem;
172
- height: 1rem;
173
- }
174
- .video-main.mode-9 .scale-btn {
175
- bottom: 6px;
176
- right: 7rem;
177
- width: 0.9rem;
178
- height: 0.9rem;
179
- }
180
- .video-main.mode-16 .scale-btn {
181
- bottom: 7px;
182
- right: 6rem;
183
- width: 0.8rem;
184
- height: 0.8rem;
185
- }
186
- .video-main.mode-9 .stream-loading {
187
- width: 11.4rem;
188
- height: 2.1rem;
189
- line-height: 2.1rem;
190
- font-size: 15px;
191
- background-size: 15px;
192
- }
193
- .video-main.mode-16 .stream-loading {
194
- width: 9.3rem;
195
- height: 2.1rem;
196
- line-height: 2.1rem;
197
- font-size: 14px;
198
- background-size: 14px;
199
- margin-left: 5.7rem;
200
- }
201
- .video-main.mode-16 .real-result, .video-main.mode-16 .result {
202
- font-size: 12px;
203
- }
204
- .stream-loading{
205
- width: 14rem;
206
- height: 2.1rem;
207
- line-height: 2.1rem;
208
- position: absolute;
209
- top: 50%;
210
- left: 50%;
211
- margin-top: -1rem;
212
- margin-left: -7.1rem;
213
- color: #fff;
214
- font-size: 1.14rem;
215
- padding-left: 2.1rem;
216
- /* background: transparent url("~@/img/loading.gif") no-repeat 10px center; */
217
- }
218
- .info{
219
- position: absolute;
220
- float: left;
221
- color: #fff;
222
- left: 10px;
223
- width: 67%;
224
- /* bottom: 10px;
225
- width: 320px;
226
- height: 30px;
227
- text-align: center; */
228
- z-index:1;
229
- }
230
-
231
- .operate-btn{
232
- position: absolute;
233
- width: 1.5rem;
234
- height: 1.5rem;
235
- float: left;
236
- right: 1px;
237
- bottom: 2px;
238
- z-index:1;
239
- cursor: pointer;
240
- }
241
-
242
- .send-audio-btn {
243
- position: absolute;
244
- bottom: -8px;
245
- right: 70px;
246
- border: 0;
247
- width: 3rem;
248
- height: 3rem;
249
- float: left;
250
- /* background:url("~@/img/yy.png"); */
251
- background-size: 100% 100%;
252
- background-color: rgba(0,0,0,0);
253
- }
254
-
255
- .unsend-audio-btn {
256
- position: absolute;
257
- bottom: -8px;
258
- right: 70px;
259
- border: 0;
260
- width: 3rem;
261
- height: 3rem;
262
- float: left;
263
- /* background-image: url("~@/img/yy_gb.png"); */
264
- background-size: 100% 100%;
265
- background-color: rgba(0,0,0,0);
266
- }
267
- .rotate-btn {
268
- position: absolute;
269
- bottom: 1px;
270
- right: 6.07rem;
271
- border: 0;
272
- width: 1.75rem;
273
- height: 1.75rem;
274
- float: left;
275
- /* background-image: url("~@/img/yy_gb.png"); */
276
- background-size: 100% 100%;
277
- background-color: rgba(0,0,0,0);
278
- }
279
- .rotate-btn.bggray, .scale-btn.bggray{
280
- filter: contrast(0.5);
281
- }
282
- .scale-btn {
283
- position: absolute;
284
- bottom: 5px;
285
- right: 9.5rem;
286
- border: 0;
287
- width: 1.25rem;
288
- height: 1.25rem;
289
- float: left;
290
- /* background-image: url("~@/img/yy_gb.png"); */
291
- background-size: 100% 100%;
292
- background-color: rgba(0,0,0,0);
293
- }
294
- .recv-audio-btn {
295
- position: absolute;
296
- bottom: -8px;
297
- right: 30px;
298
- border: 0;
299
- width: 3rem;
300
- height: 3rem;
301
- float: left;
302
- /* background:url("~@/img/hm_shengyin_sel.png"); */
303
- background-size: 100% 100%;
304
- background-color: rgba(0,0,0,0);
305
- }
306
-
307
- .unrecv-audio-btn {
308
- position: absolute;
309
- bottom: -8px;
310
- right: 30px;
311
- border: 0;
312
- width: 3rem;
313
- height: 3rem;
314
- float: left;
315
- /* background-image: url("~@/img/hm_jingyin_sel.png"); */
316
- background-size: 100% 100%;
317
- background-color: rgba(0,0,0,0);
318
- }
319
-
320
- .close-btn {
321
- position: absolute;
322
- bottom: 5px;
323
- right: 5px;
324
- border: 0;
325
- width: 1.25rem;
326
- height: 1.25rem;
327
- float: left;
328
- /* background-image: url("~@/img/close.png"); */
329
- background-size: 100% 100%;
330
- background-color: rgba(0,0,0,0);
331
- }
332
- .operation {
333
- position: absolute;
334
- width: 100%;
335
- height: 12%;
336
- bottom: 0;
337
- background: rgba(0,0,0,0.3);
338
- color: #fff;
339
- }
340
-
341
- .hide {
342
- display: none;
343
- }