react_hsbc_teller 1.1.8 → 1.2.1
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.
|
@@ -19,10 +19,14 @@ import message from "antd/lib/message";
|
|
|
19
19
|
import 'antd/lib/message/style'
|
|
20
20
|
import Spin from "antd/lib/spin";
|
|
21
21
|
import 'antd/lib/spin/style'
|
|
22
|
+
import Select from "antd/lib/select";
|
|
23
|
+
import 'antd/lib/select/style'
|
|
24
|
+
|
|
22
25
|
import { Button } from '../../../node_modules/antd/lib/index';
|
|
23
26
|
import CanvasDraw from "react-canvas-draw";
|
|
24
27
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
25
28
|
import axios from 'axios';
|
|
29
|
+
const { Option } = Select;
|
|
26
30
|
const LEAVE_TYPE = {
|
|
27
31
|
TELLER_EXIT: 1, // 坐席退出
|
|
28
32
|
ROOM_DESTROYED: -1, // 房间异常
|
|
@@ -141,6 +145,8 @@ class Video extends Component {
|
|
|
141
145
|
noVideoEleven: false,
|
|
142
146
|
noVideoTwelve: false,
|
|
143
147
|
manualClose: false,
|
|
148
|
+
defaultValue: '1',
|
|
149
|
+
customOcrSid: ''
|
|
144
150
|
};
|
|
145
151
|
// eslint-disable-next-line no-undef
|
|
146
152
|
test_controller = '';
|
|
@@ -164,6 +170,8 @@ class Video extends Component {
|
|
|
164
170
|
let publish_config = {}
|
|
165
171
|
publish_config.media_type = 1
|
|
166
172
|
publish_config.publish_device = 1
|
|
173
|
+
publish_config.videoSource = this.state.cameraValue
|
|
174
|
+
publish_config.audioSource = this.state.microphoneValue
|
|
167
175
|
publish_config.need_volume_analyser = true
|
|
168
176
|
// publish_config.video_profile_type = 3
|
|
169
177
|
publish_config.video_profile_type=100
|
|
@@ -173,11 +181,13 @@ class Video extends Component {
|
|
|
173
181
|
publish_config.publish_tag = 'tag1'
|
|
174
182
|
this.test_controller.Publish(publish_config)
|
|
175
183
|
// eslint-disable-next-line no-undef
|
|
176
|
-
|
|
184
|
+
setTimeout(() => {
|
|
185
|
+
if(this.state.imStatus && !this.state.imJoinRoom) {
|
|
177
186
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
178
187
|
this.state.imJoinRoom =true
|
|
179
188
|
console.log('加入IM房间')
|
|
180
189
|
}
|
|
190
|
+
})
|
|
181
191
|
this.props.createRoomCallback({
|
|
182
192
|
type: 1,
|
|
183
193
|
errorManage: '',
|
|
@@ -244,8 +254,10 @@ class Video extends Component {
|
|
|
244
254
|
// eslint-disable-next-line no-undef
|
|
245
255
|
// initWebSocket('wss://im.uat.dsp.hsbcfts.com.cn:443/wealth/im/ws/')
|
|
246
256
|
// initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + '15603' + '/ws/');
|
|
257
|
+
if(!this.state.imStatus){
|
|
258
|
+
initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
|
|
247
259
|
|
|
248
|
-
|
|
260
|
+
}
|
|
249
261
|
const config_param = {};
|
|
250
262
|
config_param.workspaceId = this.state.workSpaceId;
|
|
251
263
|
config_param.uid = this.props.tellerAccount;
|
|
@@ -263,7 +275,6 @@ class Video extends Component {
|
|
|
263
275
|
const config_param = {};
|
|
264
276
|
config_param.auto_publish_subscribe = 4;
|
|
265
277
|
config_param.media_type = 1;
|
|
266
|
-
config_param.publish_device = 1;
|
|
267
278
|
config_param.video_profile_type = '3';
|
|
268
279
|
config_param.need_volume_analyser = true;
|
|
269
280
|
config_param.initPublish = [
|
|
@@ -356,6 +367,106 @@ class Video extends Component {
|
|
|
356
367
|
url: '' // ⽔印图⽚ HTTP 地址
|
|
357
368
|
}
|
|
358
369
|
];
|
|
370
|
+
recordParam.tagPositions = [
|
|
371
|
+
{
|
|
372
|
+
tag: 'projectionWhiteboard',
|
|
373
|
+
xPosition: '0',
|
|
374
|
+
yPosition: '360',
|
|
375
|
+
width: '640',
|
|
376
|
+
height: '360'
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
tag: 'VIDEO_SOURCE_SCREEN',
|
|
380
|
+
xPosition: '0',
|
|
381
|
+
yPosition: '144',
|
|
382
|
+
width: '256',
|
|
383
|
+
height: '144'
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
tag: 'tag1',
|
|
387
|
+
xPosition: '0',
|
|
388
|
+
yPosition: '0',
|
|
389
|
+
width: '160',
|
|
390
|
+
height: '144'
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
tag: 'customer1',
|
|
394
|
+
xPosition: '160',
|
|
395
|
+
yPosition: '0',
|
|
396
|
+
width: '160',
|
|
397
|
+
height: '144'
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
tag: 'customer2',
|
|
401
|
+
xPosition: '320',
|
|
402
|
+
yPosition: '0',
|
|
403
|
+
width: '160',
|
|
404
|
+
height: '144'
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
tag: 'customer3',
|
|
408
|
+
xPosition: '480',
|
|
409
|
+
yPosition: '0',
|
|
410
|
+
width: '160',
|
|
411
|
+
height: '144'
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
tag: 'customer4',
|
|
415
|
+
xPosition: '640',
|
|
416
|
+
yPosition: '0',
|
|
417
|
+
width: '160',
|
|
418
|
+
height: '144'
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
tag: 'customer5',
|
|
422
|
+
xPosition: '800',
|
|
423
|
+
yPosition: '0',
|
|
424
|
+
width: '160',
|
|
425
|
+
height: '144'
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
tag: 'customer6',
|
|
429
|
+
xPosition: '960',
|
|
430
|
+
yPosition: '0',
|
|
431
|
+
width: '160',
|
|
432
|
+
height: '144'
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
tag: 'customer7',
|
|
436
|
+
xPosition: '1120',
|
|
437
|
+
yPosition: '0',
|
|
438
|
+
width: '160',
|
|
439
|
+
height: '144'
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
tag: 'customer8',
|
|
443
|
+
xPosition: '1120',
|
|
444
|
+
yPosition: '144',
|
|
445
|
+
width: '160',
|
|
446
|
+
height: '144'
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
tag: 'customer9',
|
|
450
|
+
xPosition: '1120',
|
|
451
|
+
yPosition: '288',
|
|
452
|
+
width: '160',
|
|
453
|
+
height: '144'
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
tag: 'customer10',
|
|
457
|
+
xPosition: '1120',
|
|
458
|
+
yPosition: '432',
|
|
459
|
+
width: '160',
|
|
460
|
+
height: '144'
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
tag: 'customer11',
|
|
464
|
+
xPosition: '1120',
|
|
465
|
+
yPosition: '576',
|
|
466
|
+
width: '160',
|
|
467
|
+
height: '144'
|
|
468
|
+
}
|
|
469
|
+
]
|
|
359
470
|
console.log('recordParam', recordParam);
|
|
360
471
|
this.test_controller.StartRemoteRecord(filePath, recordParam, '')
|
|
361
472
|
|
|
@@ -404,11 +515,6 @@ class Video extends Component {
|
|
|
404
515
|
console.log(result);
|
|
405
516
|
if (this.state.faceCustomerType == 1) {
|
|
406
517
|
this.contrastFaceVerify(result.data)
|
|
407
|
-
} else if (this.state.faceCustomerType == 2) {
|
|
408
|
-
// ocr
|
|
409
|
-
this.setState({
|
|
410
|
-
isModalVisibleFacial: false
|
|
411
|
-
})
|
|
412
518
|
}
|
|
413
519
|
|
|
414
520
|
} catch (err) {
|
|
@@ -1071,7 +1177,10 @@ class Video extends Component {
|
|
|
1071
1177
|
noVideoTwelve: true
|
|
1072
1178
|
})
|
|
1073
1179
|
}
|
|
1074
|
-
this.
|
|
1180
|
+
if(this.state.isPictureInPicture) {
|
|
1181
|
+
this.pictureInPicture('Refresh')
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1075
1184
|
}
|
|
1076
1185
|
}
|
|
1077
1186
|
else if (Mival.typeId == 3003) {
|
|
@@ -1147,7 +1256,9 @@ class Video extends Component {
|
|
|
1147
1256
|
noVideoTwelve: false
|
|
1148
1257
|
})
|
|
1149
1258
|
}
|
|
1150
|
-
this.
|
|
1259
|
+
if(this.state.isPictureInPicture) {
|
|
1260
|
+
this.pictureInPicture('Refresh')
|
|
1261
|
+
}
|
|
1151
1262
|
}
|
|
1152
1263
|
}
|
|
1153
1264
|
else if (Mival.typeId == 1220) {
|
|
@@ -1366,10 +1477,10 @@ class Video extends Component {
|
|
|
1366
1477
|
window.IMOpenfire = msg =>{
|
|
1367
1478
|
console.log('im登录', msg)
|
|
1368
1479
|
if(msg.status == 'error') {
|
|
1369
|
-
this.state.
|
|
1480
|
+
this.state.imStatus = false
|
|
1370
1481
|
this.roomCallBack(2, 'im建立连接失败',5)
|
|
1371
1482
|
} else if (msg.status == 'success') {
|
|
1372
|
-
this.state.imStatus =
|
|
1483
|
+
this.state.imStatus = true
|
|
1373
1484
|
setTimeout(() => {
|
|
1374
1485
|
if(this.state.imRoomId && !this.state.imJoinRoom) {
|
|
1375
1486
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
@@ -1380,7 +1491,7 @@ class Video extends Component {
|
|
|
1380
1491
|
} else if (msg.status == 'close') {
|
|
1381
1492
|
if(!this.state.manualClose) {
|
|
1382
1493
|
this.timer && clearInterval(this.timer);
|
|
1383
|
-
this.state.
|
|
1494
|
+
this.state.imStatus = false
|
|
1384
1495
|
console.log('IMOpenfireclose')
|
|
1385
1496
|
this.roomCallBack(2, '账号重复登录',9)
|
|
1386
1497
|
|
|
@@ -1482,8 +1593,14 @@ class Video extends Component {
|
|
|
1482
1593
|
})
|
|
1483
1594
|
if (!this.state.appId && !this.state.sessionType) {
|
|
1484
1595
|
this.mpaasSig(data);
|
|
1596
|
+
let indexId = 0
|
|
1597
|
+
obj.map((item,index)=>{
|
|
1598
|
+
if(item.actionname.indexOf('Integrated Camera' != -1)) {
|
|
1599
|
+
indexId = index
|
|
1600
|
+
}
|
|
1601
|
+
})
|
|
1485
1602
|
this.setState({
|
|
1486
|
-
cameraValue: obj[
|
|
1603
|
+
cameraValue: obj[indexId].actionid,
|
|
1487
1604
|
microphoneValue: obj1[0].actionid
|
|
1488
1605
|
})
|
|
1489
1606
|
} else {
|
|
@@ -1562,7 +1679,11 @@ class Video extends Component {
|
|
|
1562
1679
|
this.test_controller.OnMediaClose = (code, sid) => {
|
|
1563
1680
|
console.log(code, sid)
|
|
1564
1681
|
if(code == 5003 || code == 5004 || code == 5005|| code == 5007|| code == 5009|| code == 5010 || code == 5011|| code == 5012) {
|
|
1682
|
+
if(sid == document.getElementById('publish_video1').name) {
|
|
1565
1683
|
this.roomCallBack(2, '音视频异常关闭',8)
|
|
1684
|
+
} else {
|
|
1685
|
+
this.state.isScreenSwitching = false
|
|
1686
|
+
}
|
|
1566
1687
|
}
|
|
1567
1688
|
};
|
|
1568
1689
|
// 加入房间成功
|
|
@@ -1572,6 +1693,8 @@ class Video extends Component {
|
|
|
1572
1693
|
publish_config.media_type = 1
|
|
1573
1694
|
publish_config.publish_device = 1
|
|
1574
1695
|
publish_config.need_volume_analyser = true
|
|
1696
|
+
publish_config.videoSource = this.state.cameraValue
|
|
1697
|
+
publish_config.audioSource = this.state.microphoneValue
|
|
1575
1698
|
// publish_config.video_profile_type = 3
|
|
1576
1699
|
publish_config.video_profile_type=100
|
|
1577
1700
|
publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
|
|
@@ -1593,7 +1716,6 @@ class Video extends Component {
|
|
|
1593
1716
|
this.state.rtoken = '',
|
|
1594
1717
|
this.state.sessionId = '',
|
|
1595
1718
|
this.state.imRoomId = ''
|
|
1596
|
-
|
|
1597
1719
|
this.test_controller.Disconnect()
|
|
1598
1720
|
let data = {
|
|
1599
1721
|
account: this.props.tellerAccount,
|
|
@@ -1616,7 +1738,7 @@ class Video extends Component {
|
|
|
1616
1738
|
'tellerId': this.props.tellerAccount
|
|
1617
1739
|
})
|
|
1618
1740
|
});
|
|
1619
|
-
if(this.state.screenName == '
|
|
1741
|
+
if(this.state.screenName == '切换共享') {
|
|
1620
1742
|
this.state.isSharedScreen = true
|
|
1621
1743
|
this.state.isScreenSwitching = false
|
|
1622
1744
|
}
|
|
@@ -1629,7 +1751,7 @@ class Video extends Component {
|
|
|
1629
1751
|
this.enterRoom()
|
|
1630
1752
|
this.timer = setInterval(
|
|
1631
1753
|
() => {
|
|
1632
|
-
if(!this.state.voiceStatue) {
|
|
1754
|
+
if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0) {
|
|
1633
1755
|
callNimIM('sendCustomCmdMsg', {
|
|
1634
1756
|
customId: this.state.imRoomId,
|
|
1635
1757
|
content: JSON.stringify({
|
|
@@ -1651,8 +1773,13 @@ class Video extends Component {
|
|
|
1651
1773
|
// 发布媒体流失败
|
|
1652
1774
|
this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
|
|
1653
1775
|
console.log('发布媒体流失败', sid, err_code, err_msg)
|
|
1654
|
-
|
|
1655
|
-
|
|
1776
|
+
if(sid == document.getElementById('publish_video1').name) {
|
|
1777
|
+
this.state.sessionType = false
|
|
1778
|
+
this.roomCallBack(2, '发布失败',4)
|
|
1779
|
+
} else {
|
|
1780
|
+
this.messageClick('投屏失败请重新投屏','error')
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1656
1783
|
};
|
|
1657
1784
|
// 订阅媒体流成功
|
|
1658
1785
|
this.test_controller.OnSubscribeSucc = (feed, sid) => {
|
|
@@ -2076,78 +2203,92 @@ class Video extends Component {
|
|
|
2076
2203
|
if (!document.getElementById("video1").name) {
|
|
2077
2204
|
this.setState({
|
|
2078
2205
|
videoOneName: '',
|
|
2079
|
-
voiceVideoOne: false
|
|
2206
|
+
voiceVideoOne: false,
|
|
2207
|
+
noVideoOne: false
|
|
2080
2208
|
})
|
|
2081
2209
|
}
|
|
2082
2210
|
if (!document.getElementById("video2").name) {
|
|
2083
2211
|
this.setState({
|
|
2084
2212
|
videoTwoName: '',
|
|
2085
|
-
voiceVideoTwo: false
|
|
2213
|
+
voiceVideoTwo: false,
|
|
2214
|
+
noVideoTwo: false
|
|
2086
2215
|
})
|
|
2087
2216
|
}
|
|
2088
2217
|
if (!document.getElementById("video3").name) {
|
|
2089
2218
|
this.setState({
|
|
2090
2219
|
videoThreeName: '',
|
|
2091
|
-
voiceVideoThree: false
|
|
2220
|
+
voiceVideoThree: false,
|
|
2221
|
+
noVideoThree: false
|
|
2092
2222
|
})
|
|
2093
2223
|
}
|
|
2094
2224
|
if (!document.getElementById("video4").name) {
|
|
2095
2225
|
this.setState({
|
|
2096
2226
|
videoFourName: '',
|
|
2097
2227
|
voiceVideoFour: false,
|
|
2228
|
+
noVideoFour: false
|
|
2098
2229
|
})
|
|
2099
2230
|
}
|
|
2100
2231
|
if (!document.getElementById("video5").name) {
|
|
2101
2232
|
this.setState({
|
|
2102
2233
|
videoFiveName: '',
|
|
2103
|
-
voiceVideoFive: false
|
|
2234
|
+
voiceVideoFive: false,
|
|
2235
|
+
noVideoFive: false
|
|
2104
2236
|
})
|
|
2105
2237
|
}
|
|
2106
2238
|
if (!document.getElementById("video6").name) {
|
|
2107
2239
|
this.setState({
|
|
2108
2240
|
videoSixName: '',
|
|
2109
|
-
voiceVideoSix: false
|
|
2241
|
+
voiceVideoSix: false,
|
|
2242
|
+
noVideoSix: false
|
|
2110
2243
|
})
|
|
2111
2244
|
}
|
|
2112
2245
|
|
|
2113
2246
|
if (!document.getElementById("video7").name) {
|
|
2114
2247
|
this.setState({
|
|
2115
2248
|
videoSevenName: '',
|
|
2116
|
-
voiceVideoSeven: false
|
|
2249
|
+
voiceVideoSeven: false,
|
|
2250
|
+
noVideoSeven: false
|
|
2117
2251
|
})
|
|
2118
2252
|
}
|
|
2119
2253
|
if (!document.getElementById("video8").name) {
|
|
2120
2254
|
this.setState({
|
|
2121
2255
|
videoEightName: '',
|
|
2122
|
-
voiceVideoEight: false
|
|
2256
|
+
voiceVideoEight: false,
|
|
2257
|
+
noVideoEight: false
|
|
2123
2258
|
})
|
|
2124
2259
|
}
|
|
2125
2260
|
if (!document.getElementById("video9").name) {
|
|
2126
2261
|
this.setState({
|
|
2127
2262
|
videoNineName: '',
|
|
2128
|
-
voiceVideoNine: false
|
|
2263
|
+
voiceVideoNine: false,
|
|
2264
|
+
noVideoNine: false
|
|
2129
2265
|
})
|
|
2130
2266
|
}
|
|
2131
2267
|
if (!document.getElementById("video10").name) {
|
|
2132
2268
|
this.setState({
|
|
2133
2269
|
videoTenName: '',
|
|
2134
|
-
voiceVideoTen: false
|
|
2270
|
+
voiceVideoTen: false,
|
|
2271
|
+
noVideoTen: false
|
|
2135
2272
|
})
|
|
2136
2273
|
}
|
|
2137
2274
|
if (!document.getElementById("video11").name) {
|
|
2138
2275
|
this.setState({
|
|
2139
2276
|
videoElevenName: '',
|
|
2140
|
-
voiceVideoEleven: false
|
|
2277
|
+
voiceVideoEleven: false,
|
|
2278
|
+
noVideoEleven: false
|
|
2141
2279
|
})
|
|
2142
2280
|
}
|
|
2143
2281
|
if (!document.getElementById("video12").name) {
|
|
2144
2282
|
this.setState({
|
|
2145
2283
|
videoTwelveName: '',
|
|
2146
|
-
voiceVideoTwelve: false
|
|
2284
|
+
voiceVideoTwelve: false,
|
|
2285
|
+
noVideoTwelve: false
|
|
2147
2286
|
})
|
|
2148
2287
|
}
|
|
2149
2288
|
this.state.analyserData.delete(sid)
|
|
2150
|
-
this.
|
|
2289
|
+
if(this.state.isPictureInPicture) {
|
|
2290
|
+
this.pictureInPicture('Refresh')
|
|
2291
|
+
}
|
|
2151
2292
|
};
|
|
2152
2293
|
// 推送“取消发布”给与会者
|
|
2153
2294
|
this.test_controller.OnUnPublish = (feed) => {
|
|
@@ -2342,7 +2483,7 @@ class Video extends Component {
|
|
|
2342
2483
|
})
|
|
2343
2484
|
}
|
|
2344
2485
|
if (sid == document.getElementById('video20').name) {
|
|
2345
|
-
if(this.state.screenName == '
|
|
2486
|
+
if(this.state.screenName == '切换共享') {
|
|
2346
2487
|
this.state.isSharedScreen = true
|
|
2347
2488
|
this.state.isScreenSwitching = false
|
|
2348
2489
|
}
|
|
@@ -2360,7 +2501,19 @@ class Video extends Component {
|
|
|
2360
2501
|
loading: false
|
|
2361
2502
|
})
|
|
2362
2503
|
this.messageClick('切换摄像头或麦克风失败,请先检查设备','error')
|
|
2363
|
-
}
|
|
2504
|
+
} else if(this.state.screenName == '切换共享') {
|
|
2505
|
+
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2506
|
+
this.state.isSharedScreen = false
|
|
2507
|
+
this.state.isScreenSwitching = false
|
|
2508
|
+
this.setState({
|
|
2509
|
+
screenName: '共享模式'
|
|
2510
|
+
});
|
|
2511
|
+
console.log(pictureInPictureVideo)
|
|
2512
|
+
this.tabTitlesClick('RMScreen', 'delect')
|
|
2513
|
+
if (this.state.isPictureInPicture) {
|
|
2514
|
+
document.exitPictureInPicture()
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2364
2517
|
};
|
|
2365
2518
|
// 服务端录制初始化成功
|
|
2366
2519
|
this.test_controller.OnInitRemoteRecordSucc = (
|
|
@@ -2371,20 +2524,20 @@ class Video extends Component {
|
|
|
2371
2524
|
};
|
|
2372
2525
|
this.test_controller.OnVolumeAnalyser = (sid, analyser) => {
|
|
2373
2526
|
clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
2374
|
-
let publish_sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name;
|
|
2375
|
-
let subscribe_sid1 = document.getElementById('video1').name || document.getElementById('audio1').name;
|
|
2376
|
-
let subscribe_sid2 = document.getElementById('video2').name || document.getElementById('audio2').name;
|
|
2377
|
-
let subscribe_sid3 = document.getElementById('video3').name || document.getElementById('audio3').name;
|
|
2378
|
-
let subscribe_sid4 = document.getElementById('video4').name || document.getElementById('audio4').name;
|
|
2379
|
-
let subscribe_sid5 = document.getElementById('video5').name || document.getElementById('audio5').name;
|
|
2380
|
-
let subscribe_sid6 = document.getElementById('video6').name || document.getElementById('audio6').name;
|
|
2381
|
-
|
|
2382
|
-
let subscribe_sid7 = document.getElementById('video7').name || document.getElementById('audio7').name;
|
|
2383
|
-
let subscribe_sid8 = document.getElementById('video8').name || document.getElementById('audio8').name;
|
|
2384
|
-
let subscribe_sid9 = document.getElementById('video9').name || document.getElementById('audio9').name;
|
|
2385
|
-
let subscribe_sid10 = document.getElementById('video10').name || document.getElementById('audio10').name;
|
|
2386
|
-
let subscribe_sid11 = document.getElementById('video11').name || document.getElementById('audio11').name;
|
|
2387
|
-
let subscribe_sid12 = document.getElementById('video12').name || document.getElementById('audio12').name;
|
|
2527
|
+
let publish_sid = (document.getElementById('publish_video1') ? document.getElementById('publish_video1').name : '') || (document.getElementById('publish_streamId1') ? document.getElementById('publish_streamId1').name : '');
|
|
2528
|
+
let subscribe_sid1 = (document.getElementById('video1') ? document.getElementById('video1').name : '') || (document.getElementById('audio1') ? document.getElementById('audio1').name : '');
|
|
2529
|
+
let subscribe_sid2 = (document.getElementById('video2') ? document.getElementById('video2').name : '') || (document.getElementById('audio2') ? document.getElementById('audio2').name : '');
|
|
2530
|
+
let subscribe_sid3 =(document.getElementById('video3') ? document.getElementById('video3').name : '') || (document.getElementById('audio3') ? document.getElementById('audio3').name : '');
|
|
2531
|
+
let subscribe_sid4 = (document.getElementById('video4') ? document.getElementById('video4').name : '') || (document.getElementById('audio4') ? document.getElementById('audio4').name : '');
|
|
2532
|
+
let subscribe_sid5 = (document.getElementById('video5') ? document.getElementById('video5').name : '') || (document.getElementById('audio5') ? document.getElementById('audio5').name : '');
|
|
2533
|
+
let subscribe_sid6 = (document.getElementById('video6') ? document.getElementById('video6').name : '') || (document.getElementById('audio6') ? document.getElementById('audio6').name : '');
|
|
2534
|
+
|
|
2535
|
+
let subscribe_sid7 = (document.getElementById('video7') ? document.getElementById('video7').name : '') || (document.getElementById('audio7') ? document.getElementById('audio7').name : '');
|
|
2536
|
+
let subscribe_sid8 = (document.getElementById('video8') ? document.getElementById('video8').name : '') || (document.getElementById('audio8') ? document.getElementById('audio8').name : '');
|
|
2537
|
+
let subscribe_sid9 = (document.getElementById('video9') ? document.getElementById('video9').name : '') || (document.getElementById('audio9') ? document.getElementById('audio9').name : '');
|
|
2538
|
+
let subscribe_sid10 = (document.getElementById('video10') ? document.getElementById('video10').name : '') || (document.getElementById('audio10') ? document.getElementById('audio10').name : '');
|
|
2539
|
+
let subscribe_sid11 = (document.getElementById('video11') ? document.getElementById('video11').name : '') || (document.getElementById('audio11') ? document.getElementById('audio11').name : '');
|
|
2540
|
+
let subscribe_sid12 = (document.getElementById('video12') ? document.getElementById('video12').name : '') || (document.getElementById('audio12') ? document.getElementById('audio12').name : '');
|
|
2388
2541
|
|
|
2389
2542
|
let volumeView;
|
|
2390
2543
|
switch (sid) {
|
|
@@ -2461,7 +2614,7 @@ class Video extends Component {
|
|
|
2461
2614
|
let startY = y1 - height // 绘制起始点y
|
|
2462
2615
|
ctx.fillRect(startX, startY, width, height)
|
|
2463
2616
|
if(document.getElementById('publish_video1').name == sid) {
|
|
2464
|
-
this.state.analyserHeight.set(sid,energy/
|
|
2617
|
+
this.state.analyserHeight.set(sid,energy/25)
|
|
2465
2618
|
this.state.analyserHeight = this.state.analyserHeight
|
|
2466
2619
|
}
|
|
2467
2620
|
|
|
@@ -2482,13 +2635,36 @@ class Video extends Component {
|
|
|
2482
2635
|
if(this.state.isScreenSwitching) {
|
|
2483
2636
|
this.state.isScreenSwitching = false
|
|
2484
2637
|
} else {
|
|
2485
|
-
|
|
2486
|
-
|
|
2638
|
+
// if (this.state.isWhiteboard) {
|
|
2639
|
+
// publish_config.publish_device = 4
|
|
2640
|
+
// publish_config.media_type = 1
|
|
2641
|
+
// publish_config.sid = document.getElementById('video20').name
|
|
2642
|
+
// publish_config.part_of_screen_id = 'touBoxItem'
|
|
2643
|
+
// publish_config.video_profile_type = 5
|
|
2644
|
+
// this.test_controller.ChangeMediaStream(publish_config);
|
|
2645
|
+
// this.setState({
|
|
2646
|
+
// isPDF: true,
|
|
2647
|
+
// })
|
|
2648
|
+
// } else {
|
|
2649
|
+
document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
|
|
2650
|
+
// }
|
|
2651
|
+
this.state.isSharedScreen = false
|
|
2652
|
+
this.state.isScreenSwitching = false
|
|
2653
|
+
this.setState({
|
|
2654
|
+
screenName: '共享模式'
|
|
2655
|
+
});
|
|
2656
|
+
console.log(pictureInPictureVideo)
|
|
2657
|
+
this.tabTitlesClick('RMScreen', 'delect')
|
|
2658
|
+
if (this.state.isPictureInPicture) {
|
|
2659
|
+
document.exitPictureInPicture()
|
|
2487
2660
|
}
|
|
2661
|
+
// if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
|
|
2662
|
+
// this.sharedScreen()
|
|
2663
|
+
// }
|
|
2488
2664
|
}
|
|
2489
2665
|
|
|
2490
2666
|
|
|
2491
|
-
}
|
|
2667
|
+
};
|
|
2492
2668
|
}
|
|
2493
2669
|
enterRoom = async () =>{
|
|
2494
2670
|
try {
|
|
@@ -2559,6 +2735,10 @@ class Video extends Component {
|
|
|
2559
2735
|
}
|
|
2560
2736
|
}
|
|
2561
2737
|
finishSession = () => {
|
|
2738
|
+
// clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
2739
|
+
this.state.OnVolumeAnalyserMap.forEach((value,key,map)=>{
|
|
2740
|
+
clearInterval(value)
|
|
2741
|
+
})
|
|
2562
2742
|
this.timer && clearInterval(this.timer);
|
|
2563
2743
|
if(this.state.isSharedScreen) {
|
|
2564
2744
|
this.setState({
|
|
@@ -2787,7 +2967,7 @@ class Video extends Component {
|
|
|
2787
2967
|
}
|
|
2788
2968
|
};
|
|
2789
2969
|
isFileSuccuse = () => {
|
|
2790
|
-
if (!this.state.sessionId || this.state.
|
|
2970
|
+
if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
|
|
2791
2971
|
this.messageClick('当前程序异常请先退出重开','error')
|
|
2792
2972
|
return false
|
|
2793
2973
|
} else {
|
|
@@ -2844,9 +3024,13 @@ class Video extends Component {
|
|
|
2844
3024
|
}
|
|
2845
3025
|
}
|
|
2846
3026
|
};
|
|
2847
|
-
|
|
3027
|
+
sharedScreen = () => {
|
|
3028
|
+
console.log('投屏')
|
|
2848
3029
|
if (this.isFileSuccuse()) {
|
|
2849
3030
|
const publish_config = {};
|
|
3031
|
+
if(streamShare) {
|
|
3032
|
+
streamShare.getTracks().forEach(track => track.stop());
|
|
3033
|
+
}
|
|
2850
3034
|
if (this.state.isSharedScreen) {
|
|
2851
3035
|
const publish_config = {}
|
|
2852
3036
|
publish_config.media_type = 1
|
|
@@ -2859,40 +3043,6 @@ class Video extends Component {
|
|
|
2859
3043
|
publish_config.sid = document.getElementById('video20').name
|
|
2860
3044
|
this.test_controller.ChangeMediaStream(publish_config)
|
|
2861
3045
|
this.state.isScreenSwitching = true
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
sharedScreen = () => {
|
|
2866
|
-
console.log('投屏')
|
|
2867
|
-
if (this.isFileSuccuse()) {
|
|
2868
|
-
const publish_config = {};
|
|
2869
|
-
if(streamShare) {
|
|
2870
|
-
streamShare.getTracks().forEach(track => track.stop());
|
|
2871
|
-
}
|
|
2872
|
-
if (this.state.isSharedScreen) {
|
|
2873
|
-
// if (this.state.isWhiteboard) {
|
|
2874
|
-
// publish_config.publish_device = 4
|
|
2875
|
-
// publish_config.media_type = 1
|
|
2876
|
-
// publish_config.sid = document.getElementById('video20').name
|
|
2877
|
-
// publish_config.part_of_screen_id = 'touBoxItem'
|
|
2878
|
-
// publish_config.video_profile_type = 5
|
|
2879
|
-
// this.test_controller.ChangeMediaStream(publish_config);
|
|
2880
|
-
// this.setState({
|
|
2881
|
-
// isPDF: true,
|
|
2882
|
-
// })
|
|
2883
|
-
// } else {
|
|
2884
|
-
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2885
|
-
// }
|
|
2886
|
-
this.state.isSharedScreen = false
|
|
2887
|
-
this.state.isScreenSwitching = false
|
|
2888
|
-
this.setState({
|
|
2889
|
-
screenName: '共享模式'
|
|
2890
|
-
});
|
|
2891
|
-
console.log(pictureInPictureVideo)
|
|
2892
|
-
this.tabTitlesClick('RMScreen', 'delect')
|
|
2893
|
-
if (this.state.isPictureInPicture) {
|
|
2894
|
-
document.exitPictureInPicture()
|
|
2895
|
-
}
|
|
2896
3046
|
} else {
|
|
2897
3047
|
if (document.getElementById('video20').name) {
|
|
2898
3048
|
publish_config.media_type = 1;
|
|
@@ -2919,7 +3069,7 @@ class Video extends Component {
|
|
|
2919
3069
|
// this.state.isSharedScreen = true
|
|
2920
3070
|
// this.state.isScreenSwitching = false
|
|
2921
3071
|
this.setState({
|
|
2922
|
-
screenName: '
|
|
3072
|
+
screenName: '切换共享',
|
|
2923
3073
|
isPDF: false
|
|
2924
3074
|
})
|
|
2925
3075
|
this.tabTitlesClick(
|
|
@@ -3044,12 +3194,41 @@ class Video extends Component {
|
|
|
3044
3194
|
isModalVisibleEnd: false
|
|
3045
3195
|
})
|
|
3046
3196
|
};
|
|
3197
|
+
ocrCallback= async () => {
|
|
3198
|
+
try {
|
|
3199
|
+
let result = await API.ocrCallback({
|
|
3200
|
+
sessionId: this.state.sessionId,
|
|
3201
|
+
staffId: this.props.tellerAccount,
|
|
3202
|
+
activityId: this.props.businessNumber,
|
|
3203
|
+
appAccount: this.state.faceCustomerUid,
|
|
3204
|
+
fileBase64: this.state.facialImg.replace(/^data:image\/\w+;base64,/,""),
|
|
3205
|
+
type: this.state.defaultValue
|
|
3206
|
+
});
|
|
3207
|
+
if (result.code == 200) {
|
|
3208
|
+
this.messageClick('识别成功','success')
|
|
3209
|
+
this.setState({
|
|
3210
|
+
isModalVisibleFacial: false
|
|
3211
|
+
})
|
|
3212
|
+
} else {
|
|
3213
|
+
this.messageClick('识别失败','error')
|
|
3214
|
+
}
|
|
3215
|
+
} catch (err) {
|
|
3216
|
+
this.messageClick('识别失败','error')
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3047
3219
|
handleOkFacial = () => {
|
|
3048
|
-
|
|
3220
|
+
if (this.state.faceCustomerType == 2) {
|
|
3221
|
+
// ocr
|
|
3222
|
+
this.ocrCallback()
|
|
3223
|
+
|
|
3224
|
+
} else {
|
|
3225
|
+
const frontIdcard = new File([this.dataURLtoFile(this.state.facialImg, 'image/jpeg')], new Date() + '.png'); // 重命名了
|
|
3049
3226
|
const formData = new FormData();
|
|
3050
3227
|
formData.append('file', frontIdcard);
|
|
3051
3228
|
formData.append('sessionId', this.state.sessionId);
|
|
3052
3229
|
this.uploadImg(formData)
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3053
3232
|
};
|
|
3054
3233
|
handleCancelFacial = () => {
|
|
3055
3234
|
this.setState({
|
|
@@ -3134,6 +3313,7 @@ class Video extends Component {
|
|
|
3134
3313
|
sid = document.getElementById('video12').name;
|
|
3135
3314
|
}
|
|
3136
3315
|
console.log(sid)
|
|
3316
|
+
this.state.customOcrSid = sid
|
|
3137
3317
|
this.state.faceCustomerUid = item.customId,
|
|
3138
3318
|
this.setState({
|
|
3139
3319
|
clickedFacial: false,
|
|
@@ -3143,6 +3323,13 @@ class Video extends Component {
|
|
|
3143
3323
|
facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
|
|
3144
3324
|
})
|
|
3145
3325
|
}
|
|
3326
|
+
handleChangeOcr =(val)=> {
|
|
3327
|
+
console.log(val)
|
|
3328
|
+
this.setState({
|
|
3329
|
+
defaultValue: val,
|
|
3330
|
+
facialImg: this.test_controller.TakePicture(1, undefined, undefined, this.state.customOcrSid, 'png')
|
|
3331
|
+
})
|
|
3332
|
+
}
|
|
3146
3333
|
componentWillReceiveProps(props) {
|
|
3147
3334
|
this.state.channelId = props.roomId,
|
|
3148
3335
|
this.state.rtoken = props.mtoken,
|
|
@@ -3258,7 +3445,9 @@ class Video extends Component {
|
|
|
3258
3445
|
videoTwelveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户12'
|
|
3259
3446
|
})
|
|
3260
3447
|
}
|
|
3261
|
-
this.
|
|
3448
|
+
if(this.state.isPictureInPicture) {
|
|
3449
|
+
this.pictureInPicture('Refresh')
|
|
3450
|
+
}
|
|
3262
3451
|
} catch (err) {
|
|
3263
3452
|
if(err.status == 502 || err.status== 404) {
|
|
3264
3453
|
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
@@ -3482,6 +3671,7 @@ class Video extends Component {
|
|
|
3482
3671
|
console.log('whiteboardDIV', this.state.whiteboardHeight,box.clientHeight,this.state.whiteboardWidth)
|
|
3483
3672
|
}
|
|
3484
3673
|
}
|
|
3674
|
+
|
|
3485
3675
|
render() {
|
|
3486
3676
|
const { meetingInfo,isTranscribing } = this.props
|
|
3487
3677
|
var pdfChildren
|
|
@@ -4065,7 +4255,6 @@ class Video extends Component {
|
|
|
4065
4255
|
ocrClick={this.ocrClick}
|
|
4066
4256
|
switchExternal={this.switchExternalAge}
|
|
4067
4257
|
inspection={this.inspection}
|
|
4068
|
-
screenSwitching={this.screenSwitching}
|
|
4069
4258
|
></Foot>
|
|
4070
4259
|
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
4071
4260
|
onCancel={this.handleCancel}>
|
|
@@ -4091,7 +4280,16 @@ class Video extends Component {
|
|
|
4091
4280
|
</div>
|
|
4092
4281
|
]}>
|
|
4093
4282
|
<div className="faceBody">
|
|
4094
|
-
|
|
4283
|
+
{this.state.faceCustomerType == 2 &&
|
|
4284
|
+
<Select defaultValue={this.state.defaultValue} style={{ width: 120,marginBottom: '20px' }} onChange={this.handleChangeOcr}>
|
|
4285
|
+
<Option value="1">正面</Option>
|
|
4286
|
+
<Option value="2">反面</Option>
|
|
4287
|
+
</Select>
|
|
4288
|
+
}
|
|
4289
|
+
<div>
|
|
4290
|
+
<img className="faceImg" src={this.state.facialImg} alt=""></img>
|
|
4291
|
+
</div>
|
|
4292
|
+
|
|
4095
4293
|
</div>
|
|
4096
4294
|
</Modal>
|
|
4097
4295
|
{/* <Modal title={this.state.titleModal} cancelText="取消" okText="确定" visible={this.state.isModalVisibleFacial}
|