react_hsbc_teller 0.9.0 → 1.0.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.
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/video/video.jsx +105 -159
- package/src/index.js +2 -2
package/package.json
CHANGED
|
@@ -41,6 +41,9 @@ class Video extends Component {
|
|
|
41
41
|
cancel = axios.CancelToken.source()
|
|
42
42
|
signCanvas = React.createRef();
|
|
43
43
|
state = {
|
|
44
|
+
whiteboardWidth: '',
|
|
45
|
+
whiteboardHeight: '',
|
|
46
|
+
laveRoomSharedScreen: false,
|
|
44
47
|
isJoinRoom: false,
|
|
45
48
|
sessionType: false,
|
|
46
49
|
isWhiteboard: false,
|
|
@@ -67,7 +70,6 @@ class Video extends Component {
|
|
|
67
70
|
voiceImg: voiceImgOpen,
|
|
68
71
|
voiceName: '静音',
|
|
69
72
|
isCustomer: false,
|
|
70
|
-
publishDevic: 1,
|
|
71
73
|
isSharedScreen: false,
|
|
72
74
|
isSuspend: false,
|
|
73
75
|
audioed: false,
|
|
@@ -137,12 +139,6 @@ class Video extends Component {
|
|
|
137
139
|
// eslint-disable-next-line no-undef
|
|
138
140
|
test_controller = '';
|
|
139
141
|
|
|
140
|
-
componentDidMount() {
|
|
141
|
-
window.onbeforeunload = () => {
|
|
142
|
-
this.finishSession()
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
142
|
/**
|
|
147
143
|
* 创建房间成功后回调后台
|
|
148
144
|
* @param {JSON} data 数据类型
|
|
@@ -157,9 +153,10 @@ class Video extends Component {
|
|
|
157
153
|
mtoken: this.state.rtoken
|
|
158
154
|
});
|
|
159
155
|
console.log(result);
|
|
156
|
+
this.state.imRoomId = result.imRoomId,
|
|
157
|
+
this.state.sessionId = result.sessionId,
|
|
160
158
|
this.setState({
|
|
161
|
-
|
|
162
|
-
sessionId: result.sessionId,
|
|
159
|
+
|
|
163
160
|
loading: false,
|
|
164
161
|
});
|
|
165
162
|
let publish_config = {}
|
|
@@ -174,9 +171,7 @@ class Video extends Component {
|
|
|
174
171
|
// eslint-disable-next-line no-undef
|
|
175
172
|
if(this.state.imStatus) {
|
|
176
173
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
177
|
-
|
|
178
|
-
imJoinRoom:true
|
|
179
|
-
})
|
|
174
|
+
this.state.imJoinRoom =true
|
|
180
175
|
console.log('加入IM房间')
|
|
181
176
|
}
|
|
182
177
|
this.props.createRoomCallback({
|
|
@@ -192,10 +187,8 @@ class Video extends Component {
|
|
|
192
187
|
})
|
|
193
188
|
} catch (err) {
|
|
194
189
|
console.error(err);
|
|
195
|
-
|
|
196
|
-
this.
|
|
197
|
-
sessionType: false
|
|
198
|
-
})
|
|
190
|
+
|
|
191
|
+
this.state.sessionType = false
|
|
199
192
|
if(err.status == 502 || err.status== 404) {
|
|
200
193
|
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
201
194
|
} else {
|
|
@@ -219,11 +212,9 @@ class Video extends Component {
|
|
|
219
212
|
let result = await API.mpaasSig({ account: data.account, type: data.type });
|
|
220
213
|
console.log(result);
|
|
221
214
|
window.sessionStorage.setItem('alimpassSig', result.mpsSig);
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
bizName: result.bizName
|
|
226
|
-
});
|
|
215
|
+
this.state.workSpaceId = result.workSpaceId,
|
|
216
|
+
this.state.appId = result.appId,
|
|
217
|
+
this.state.bizName = result.bizName
|
|
227
218
|
// const data1={
|
|
228
219
|
// hostname: 'im.uat.dsp.hsbcfts.com.cn',
|
|
229
220
|
// webPort: '443',
|
|
@@ -574,8 +565,8 @@ class Video extends Component {
|
|
|
574
565
|
// 人脸识别
|
|
575
566
|
facialRecognition = () => {
|
|
576
567
|
if (this.isFileSuccuse()) {
|
|
568
|
+
this.state.faceCustomerType = 1
|
|
577
569
|
this.setState({
|
|
578
|
-
faceCustomerType: 1,
|
|
579
570
|
titleModal: '人脸识别'
|
|
580
571
|
})
|
|
581
572
|
this.selectCustomer('facial')
|
|
@@ -583,8 +574,8 @@ class Video extends Component {
|
|
|
583
574
|
};
|
|
584
575
|
ocrClick = () => {
|
|
585
576
|
if (this.isFileSuccuse()) {
|
|
577
|
+
this.state.faceCustomerType = 2
|
|
586
578
|
this.setState({
|
|
587
|
-
faceCustomerType: 2,
|
|
588
579
|
titleModal: 'OCR识别'
|
|
589
580
|
})
|
|
590
581
|
this.selectCustomer('ocr')
|
|
@@ -878,18 +869,14 @@ class Video extends Component {
|
|
|
878
869
|
//可获取画中画窗口的一些数据,如宽高等
|
|
879
870
|
pictureInPictureVideo.style.display = 'block';
|
|
880
871
|
pictureInPictureVideo.play();
|
|
881
|
-
|
|
882
|
-
isPictureInPicture: true
|
|
883
|
-
})
|
|
872
|
+
this.state.isPictureInPicture = true
|
|
884
873
|
});
|
|
885
874
|
|
|
886
875
|
pictureInPictureVideo.addEventListener('leavepictureinpicture', (event) => {
|
|
887
876
|
pictureInPictureVideo.srcObject = null;
|
|
888
877
|
pictureInPictureVideo.style.display = "none";
|
|
889
878
|
clearInterval(interval);
|
|
890
|
-
this.
|
|
891
|
-
isPictureInPicture: false
|
|
892
|
-
})
|
|
879
|
+
this.state.isPictureInPicture = false
|
|
893
880
|
});
|
|
894
881
|
}
|
|
895
882
|
roomCallBack = (type, manege,code) => {
|
|
@@ -1146,14 +1133,10 @@ class Video extends Component {
|
|
|
1146
1133
|
} else if (Mival.type == 2) {
|
|
1147
1134
|
this.tabTitlesClick('RMWhiteboard', 'delect')
|
|
1148
1135
|
if (this.state.isSharedScreen) {
|
|
1149
|
-
this.
|
|
1150
|
-
isWhiteboard: false,
|
|
1151
|
-
})
|
|
1136
|
+
this.state.isWhiteboard = false
|
|
1152
1137
|
} else {
|
|
1153
1138
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
1154
|
-
this.
|
|
1155
|
-
isWhiteboard: false,
|
|
1156
|
-
})
|
|
1139
|
+
this.state.isWhiteboard = false
|
|
1157
1140
|
}
|
|
1158
1141
|
}
|
|
1159
1142
|
|
|
@@ -1336,19 +1319,13 @@ class Video extends Component {
|
|
|
1336
1319
|
window.IMOpenfire = msg =>{
|
|
1337
1320
|
console.log('im登录', msg)
|
|
1338
1321
|
if(!msg) {
|
|
1339
|
-
this.
|
|
1340
|
-
sessionType: false
|
|
1341
|
-
})
|
|
1322
|
+
this.state.sessionType = false
|
|
1342
1323
|
this.roomCallBack(2, 'im建立连接失败',5)
|
|
1343
1324
|
} else {
|
|
1344
|
-
|
|
1345
|
-
imStatus: msg
|
|
1346
|
-
})
|
|
1325
|
+
this.state.imStatus = msg
|
|
1347
1326
|
if(this.state.imRoomId && !this.state.imJoinRoom) {
|
|
1348
1327
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
1349
|
-
|
|
1350
|
-
imJoinRoom:true
|
|
1351
|
-
})
|
|
1328
|
+
this.state.imJoinRoom =true
|
|
1352
1329
|
console.log('加入im房间')
|
|
1353
1330
|
}
|
|
1354
1331
|
}
|
|
@@ -1461,9 +1438,7 @@ class Video extends Component {
|
|
|
1461
1438
|
// 获取设备失败
|
|
1462
1439
|
this.test_controller.OnGetDevicesFailed = (code, msg) => {
|
|
1463
1440
|
console.log('获取设备失败', code, msg)
|
|
1464
|
-
this.
|
|
1465
|
-
sessionType: false
|
|
1466
|
-
})
|
|
1441
|
+
this.state.sessionType = false
|
|
1467
1442
|
this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
|
|
1468
1443
|
this.roomCallBack(2, '获取设备失败',1)
|
|
1469
1444
|
};
|
|
@@ -1474,9 +1449,7 @@ class Video extends Component {
|
|
|
1474
1449
|
};
|
|
1475
1450
|
this.test_controller.OnConnectFailed = (code, msg) => {
|
|
1476
1451
|
console.log('建立连接失败', code, msg)
|
|
1477
|
-
this.
|
|
1478
|
-
sessionType: false
|
|
1479
|
-
})
|
|
1452
|
+
this.state.sessionType = false
|
|
1480
1453
|
this.roomCallBack(2, '连接失败',2)
|
|
1481
1454
|
};
|
|
1482
1455
|
// 断开连接回调
|
|
@@ -1491,9 +1464,7 @@ class Video extends Component {
|
|
|
1491
1464
|
// 初始化房间失败
|
|
1492
1465
|
this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
|
|
1493
1466
|
console.log('初始化房间失败', err_code, err_msg)
|
|
1494
|
-
this.
|
|
1495
|
-
sessionType: false
|
|
1496
|
-
})
|
|
1467
|
+
this.state.sessionType = false
|
|
1497
1468
|
this.roomCallBack(2, '初始化失败',3)
|
|
1498
1469
|
};
|
|
1499
1470
|
// 初始化成功回调
|
|
@@ -1511,18 +1482,14 @@ class Video extends Component {
|
|
|
1511
1482
|
|
|
1512
1483
|
this.test_controller.OnCreateRoomSucc = (room_id, rtoken) => {
|
|
1513
1484
|
console.log('创建房间成功', room_id, rtoken);
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
rtoken: rtoken
|
|
1517
|
-
});
|
|
1485
|
+
this.state.channelId = room_id,
|
|
1486
|
+
this.state.rtoken = rtoken
|
|
1518
1487
|
this.createRoom()
|
|
1519
1488
|
};
|
|
1520
1489
|
// 创建房间失败
|
|
1521
1490
|
this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
|
|
1522
1491
|
console.log('创建房间失败', err_code, err_msg)
|
|
1523
|
-
this.
|
|
1524
|
-
sessionType: false
|
|
1525
|
-
})
|
|
1492
|
+
this.state.sessionType = false
|
|
1526
1493
|
this.roomCallBack(2, '创建房间失败',7)
|
|
1527
1494
|
};
|
|
1528
1495
|
// 初始化⾳视频成功
|
|
@@ -1559,12 +1526,10 @@ class Video extends Component {
|
|
|
1559
1526
|
// isJoinRoom: true
|
|
1560
1527
|
// })
|
|
1561
1528
|
// this.roomCallBack(2, '加入失败',-5)
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
imRoomId: ''
|
|
1567
|
-
});
|
|
1529
|
+
this.state.channelId = '',
|
|
1530
|
+
this.state.rtoken = '',
|
|
1531
|
+
this.state.sessionId = '',
|
|
1532
|
+
this.state.imRoomId = ''
|
|
1568
1533
|
|
|
1569
1534
|
this.test_controller.Disconnect()
|
|
1570
1535
|
let data = {
|
|
@@ -1577,9 +1542,7 @@ class Video extends Component {
|
|
|
1577
1542
|
// 发布媒体流成功
|
|
1578
1543
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
1579
1544
|
console.log('发布媒体流成功', sid)
|
|
1580
|
-
this.
|
|
1581
|
-
sessionType: true
|
|
1582
|
-
})
|
|
1545
|
+
this.state.sessionType = true
|
|
1583
1546
|
if (sid == document.getElementById('video20').name) {
|
|
1584
1547
|
callNimIM('sendCustomCmdMsg', {
|
|
1585
1548
|
customId: this.state.imRoomId,
|
|
@@ -1617,9 +1580,7 @@ class Video extends Component {
|
|
|
1617
1580
|
// 发布媒体流失败
|
|
1618
1581
|
this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
|
|
1619
1582
|
console.log('发布媒体流失败', sid, err_code, err_msg)
|
|
1620
|
-
this.
|
|
1621
|
-
sessionType: false
|
|
1622
|
-
})
|
|
1583
|
+
this.state.sessionType = false
|
|
1623
1584
|
this.roomCallBack(2, '发布失败',4)
|
|
1624
1585
|
};
|
|
1625
1586
|
// 订阅媒体流成功
|
|
@@ -1649,9 +1610,7 @@ class Video extends Component {
|
|
|
1649
1610
|
tag: itemOne.tag
|
|
1650
1611
|
});
|
|
1651
1612
|
console.log(array, newArray, this.state.roomCustomerList);
|
|
1652
|
-
|
|
1653
|
-
roomCustomerList: newArray
|
|
1654
|
-
})
|
|
1613
|
+
this.state.roomCustomerList = newArray
|
|
1655
1614
|
let config_param
|
|
1656
1615
|
if (itemOne.tag == 'VIDEO_SOURCE_SCREEN') {
|
|
1657
1616
|
config_param = {
|
|
@@ -1792,11 +1751,7 @@ class Video extends Component {
|
|
|
1792
1751
|
this.test_controller.OnNewJoinerIn = (participant) => {
|
|
1793
1752
|
console.log('新加⼊房间者', participant);
|
|
1794
1753
|
// this.test_controller.ChangeStreamSize(document.getElementById('publish_video1').name, 5)
|
|
1795
|
-
|
|
1796
|
-
{
|
|
1797
|
-
isCustomer: true
|
|
1798
|
-
}
|
|
1799
|
-
)
|
|
1754
|
+
this.state.isCustomer= true
|
|
1800
1755
|
};
|
|
1801
1756
|
// 推送“有新发布”给与会者
|
|
1802
1757
|
this.test_controller.OnNewPublish = (feed) => {
|
|
@@ -1853,9 +1808,7 @@ class Video extends Component {
|
|
|
1853
1808
|
tag: feed.tag
|
|
1854
1809
|
});
|
|
1855
1810
|
console.log(array, newArray, this.state.roomCustomerList);
|
|
1856
|
-
this.
|
|
1857
|
-
roomCustomerList: newArray
|
|
1858
|
-
})
|
|
1811
|
+
this.state.roomCustomerList = newArray
|
|
1859
1812
|
let config_param
|
|
1860
1813
|
if (feed.uid != this.state.tellerAccount) {
|
|
1861
1814
|
if (feed.tag == 'VIDEO_SOURCE_SCREEN') {
|
|
@@ -2041,11 +1994,11 @@ class Video extends Component {
|
|
|
2041
1994
|
'tellerId': this.props.tellerAccount
|
|
2042
1995
|
})
|
|
2043
1996
|
})
|
|
1997
|
+
this.state.sessionType = false
|
|
1998
|
+
this.state.isSharedScreen = false
|
|
2044
1999
|
this.setState({
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
screenName: '投屏',
|
|
2048
|
-
sessionType: false
|
|
2000
|
+
|
|
2001
|
+
screenName: '投屏'
|
|
2049
2002
|
});
|
|
2050
2003
|
this.tabTitlesClick('RMScreen', 'delect')
|
|
2051
2004
|
if (this.state.isPictureInPicture) {
|
|
@@ -2151,9 +2104,8 @@ class Video extends Component {
|
|
|
2151
2104
|
|
|
2152
2105
|
if (this.state.roomCustomerList.length == 0) {
|
|
2153
2106
|
// this.test_controller.ChangeStreamSize(document.getElementById('publish_video1').name, 3)
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
})
|
|
2107
|
+
this.state.isCustomer = false
|
|
2108
|
+
|
|
2157
2109
|
}
|
|
2158
2110
|
};
|
|
2159
2111
|
// 推送“取消订阅”给与会者 OnUnSubscribe(unsubscriber,feed)
|
|
@@ -2184,9 +2136,7 @@ class Video extends Component {
|
|
|
2184
2136
|
// 开始服务端录制成功
|
|
2185
2137
|
this.test_controller.OnStartRemoteRecordSucc = (record_id) => {
|
|
2186
2138
|
console.log('开始服务端录制成功', record_id);
|
|
2187
|
-
this.
|
|
2188
|
-
recordId: record_id
|
|
2189
|
-
});
|
|
2139
|
+
this.state.recordId = record_id
|
|
2190
2140
|
};
|
|
2191
2141
|
// 开始服务端录制失败
|
|
2192
2142
|
this.test_controller.OnStartRemoteRecordFailed = (
|
|
@@ -2447,24 +2397,22 @@ class Video extends Component {
|
|
|
2447
2397
|
ctx.fillRect(startX, startY, width, height)
|
|
2448
2398
|
if(document.getElementById('publish_video1').name == sid) {
|
|
2449
2399
|
this.state.analyserHeight.set(sid,energy/80)
|
|
2450
|
-
|
|
2451
|
-
analyserHeight: this.state.analyserHeight
|
|
2452
|
-
})
|
|
2400
|
+
this.state.analyserHeight = this.state.analyserHeight
|
|
2453
2401
|
}
|
|
2454
2402
|
|
|
2455
2403
|
}
|
|
2456
2404
|
requestAnimationFrame(this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser));
|
|
2457
2405
|
|
|
2458
2406
|
this.state.analyserData.set(sid, analyser)
|
|
2459
|
-
|
|
2460
|
-
analyserData: this.state.analyserData
|
|
2461
|
-
})
|
|
2407
|
+
this.state.analyserData = this.state.analyserData
|
|
2462
2408
|
}
|
|
2463
2409
|
// 停止共享
|
|
2464
2410
|
this.test_controller.OnDesktopDisplayClosed = () => {
|
|
2465
|
-
|
|
2466
|
-
this.
|
|
2467
|
-
|
|
2411
|
+
console.log('OnDesktopDisplayClosed', this.state.isSharedScreen ,this.state.laveRoomSharedScreen)
|
|
2412
|
+
if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
|
|
2413
|
+
this.sharedScreen()
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2468
2416
|
}
|
|
2469
2417
|
}
|
|
2470
2418
|
enterRoom = async () =>{
|
|
@@ -2511,11 +2459,7 @@ class Video extends Component {
|
|
|
2511
2459
|
}
|
|
2512
2460
|
};
|
|
2513
2461
|
componentWillUnmount() {
|
|
2514
|
-
this.clearData()
|
|
2515
2462
|
|
|
2516
|
-
|
|
2517
|
-
}
|
|
2518
|
-
clearData=()=>{
|
|
2519
2463
|
if (this.state.roomCustomerList.length == 0 && this.state.sessionType) {
|
|
2520
2464
|
this.finishSessionClick()
|
|
2521
2465
|
}
|
|
@@ -2526,15 +2470,9 @@ class Video extends Component {
|
|
|
2526
2470
|
if(this.state.imStatus) {
|
|
2527
2471
|
disconnect();
|
|
2528
2472
|
}
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
isPictureInPicture: false,
|
|
2533
|
-
imStatus: false,
|
|
2534
|
-
imJoinRoom: false,
|
|
2535
|
-
sessionType: false
|
|
2536
|
-
});
|
|
2537
|
-
this.timer && clearInterval(this.timer);
|
|
2473
|
+
|
|
2474
|
+
}
|
|
2475
|
+
clearData=()=>{
|
|
2538
2476
|
this.setState = (state, callback) => {
|
|
2539
2477
|
return
|
|
2540
2478
|
}
|
|
@@ -2550,28 +2488,35 @@ class Video extends Component {
|
|
|
2550
2488
|
}
|
|
2551
2489
|
}
|
|
2552
2490
|
finishSession = () => {
|
|
2491
|
+
this.timer && clearInterval(this.timer);
|
|
2553
2492
|
if(this.state.isSharedScreen) {
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
console.log(pictureInPictureVideo)
|
|
2561
|
-
this.tabTitlesClick('RMScreen', 'delect')
|
|
2493
|
+
this.setState({
|
|
2494
|
+
screenName: '投屏',
|
|
2495
|
+
})
|
|
2496
|
+
this.state.isSharedScreen = false
|
|
2497
|
+
this.state.laveRoomSharedScreen = true
|
|
2498
|
+
// this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2562
2499
|
if (this.state.isPictureInPicture) {
|
|
2563
2500
|
document.exitPictureInPicture()
|
|
2564
2501
|
}
|
|
2502
|
+
|
|
2565
2503
|
this.props.onLeaveRoom({
|
|
2566
2504
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
2567
2505
|
errMsg: '坐席退出'
|
|
2568
2506
|
})
|
|
2569
2507
|
} else {
|
|
2508
|
+
this.setState({
|
|
2509
|
+
screenName: '投屏',
|
|
2510
|
+
});
|
|
2511
|
+
this.state.isSharedScreen = false
|
|
2512
|
+
this.state.laveRoomSharedScreen = true
|
|
2570
2513
|
this.props.onLeaveRoom({
|
|
2571
2514
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
2572
2515
|
errMsg: '坐席退出'
|
|
2573
2516
|
})
|
|
2517
|
+
|
|
2574
2518
|
}
|
|
2519
|
+
console.log('isSharedScreen', this.state.isSharedScreen,this.state.laveRoomSharedScreen)
|
|
2575
2520
|
|
|
2576
2521
|
}
|
|
2577
2522
|
getRoomStatus = async data => {
|
|
@@ -2582,12 +2527,10 @@ class Video extends Component {
|
|
|
2582
2527
|
if (result.code == 200 && result.data.roomStatus == 1) {
|
|
2583
2528
|
this.addToScript()
|
|
2584
2529
|
} else {
|
|
2585
|
-
this.
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
imRoomId: ''
|
|
2590
|
-
});
|
|
2530
|
+
this.state.channelId = '',
|
|
2531
|
+
this.state.rtoken = '',
|
|
2532
|
+
this.state.sessionId = '',
|
|
2533
|
+
this.state.imRoomId = ''
|
|
2591
2534
|
this.addToScript()
|
|
2592
2535
|
// this.setState({
|
|
2593
2536
|
// sessionType: false
|
|
@@ -2599,12 +2542,10 @@ class Video extends Component {
|
|
|
2599
2542
|
// })
|
|
2600
2543
|
}
|
|
2601
2544
|
} catch (err) {
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
imRoomId: ''
|
|
2607
|
-
});
|
|
2545
|
+
this.state.channelId = '',
|
|
2546
|
+
this.state.rtoken = '',
|
|
2547
|
+
this.state.sessionId = '',
|
|
2548
|
+
this.state.imRoomId = ''
|
|
2608
2549
|
this.addToScript()
|
|
2609
2550
|
// this.setState({
|
|
2610
2551
|
// sessionType: false
|
|
@@ -2624,8 +2565,8 @@ class Video extends Component {
|
|
|
2624
2565
|
axios.get(this.props.resourcePath + "/beauty/beauty.js")
|
|
2625
2566
|
.then(response => this.addToScriptClick()).catch(function (error) {
|
|
2626
2567
|
console.log(error);
|
|
2568
|
+
that.state.sessionType = false
|
|
2627
2569
|
that.setState({
|
|
2628
|
-
sessionType: false,
|
|
2629
2570
|
loading: false
|
|
2630
2571
|
})
|
|
2631
2572
|
that.roomCallBack(2, '加载资源失败','SYS-01')
|
|
@@ -2775,8 +2716,9 @@ class Video extends Component {
|
|
|
2775
2716
|
cameraClick = () => {
|
|
2776
2717
|
if (this.isFileSuccuse()) {
|
|
2777
2718
|
if (!this.state.audioed) {
|
|
2719
|
+
this.state.audioed = true,
|
|
2778
2720
|
this.setState({
|
|
2779
|
-
|
|
2721
|
+
|
|
2780
2722
|
cameraImg: cameraImgCloe
|
|
2781
2723
|
});
|
|
2782
2724
|
let sid = document.getElementById('publish_video1').name;
|
|
@@ -2797,8 +2739,8 @@ class Video extends Component {
|
|
|
2797
2739
|
console.log(data)
|
|
2798
2740
|
})
|
|
2799
2741
|
} else if (this.state.audioed) {
|
|
2742
|
+
this.state.audioed = false,
|
|
2800
2743
|
this.setState({
|
|
2801
|
-
audioed: false,
|
|
2802
2744
|
cameraImg: cameraImgOpen
|
|
2803
2745
|
});
|
|
2804
2746
|
let sid = document.getElementById('publish_video1').name;
|
|
@@ -2822,6 +2764,7 @@ class Video extends Component {
|
|
|
2822
2764
|
}
|
|
2823
2765
|
};
|
|
2824
2766
|
sharedScreen = () => {
|
|
2767
|
+
console.log('投屏')
|
|
2825
2768
|
if (this.isFileSuccuse()) {
|
|
2826
2769
|
const publish_config = {};
|
|
2827
2770
|
if (this.state.isSharedScreen) {
|
|
@@ -2838,9 +2781,8 @@ class Video extends Component {
|
|
|
2838
2781
|
} else {
|
|
2839
2782
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2840
2783
|
}
|
|
2784
|
+
this.state.isSharedScreen = false
|
|
2841
2785
|
this.setState({
|
|
2842
|
-
publishDevic: 1,
|
|
2843
|
-
isSharedScreen: false,
|
|
2844
2786
|
screenName: '投屏'
|
|
2845
2787
|
});
|
|
2846
2788
|
console.log(pictureInPictureVideo)
|
|
@@ -2865,9 +2807,8 @@ class Video extends Component {
|
|
|
2865
2807
|
publish_config.publish_tag = 'projectionWhiteboard'
|
|
2866
2808
|
this.test_controller.Publish(publish_config)
|
|
2867
2809
|
}
|
|
2810
|
+
this.state.isSharedScreen = true
|
|
2868
2811
|
this.setState({
|
|
2869
|
-
publishDevic: 2,
|
|
2870
|
-
isSharedScreen: true,
|
|
2871
2812
|
screenName: '取消共享',
|
|
2872
2813
|
isPDF: false
|
|
2873
2814
|
})
|
|
@@ -3012,12 +2953,13 @@ class Video extends Component {
|
|
|
3012
2953
|
})
|
|
3013
2954
|
};
|
|
3014
2955
|
invitationClick = () => {
|
|
2956
|
+
this.state.linkData = ''
|
|
3015
2957
|
this.setState({
|
|
3016
2958
|
isModalVisibleInvitation: true,
|
|
3017
2959
|
employeeNumber: '',
|
|
3018
2960
|
employeeName: '',
|
|
3019
2961
|
employeeError: '',
|
|
3020
|
-
|
|
2962
|
+
|
|
3021
2963
|
})
|
|
3022
2964
|
|
|
3023
2965
|
}
|
|
@@ -3084,22 +3026,21 @@ class Video extends Component {
|
|
|
3084
3026
|
sid = document.getElementById('video12').name;
|
|
3085
3027
|
}
|
|
3086
3028
|
console.log(sid)
|
|
3029
|
+
this.state.faceCustomerUid = item.customId,
|
|
3087
3030
|
this.setState({
|
|
3088
3031
|
clickedFacial: false,
|
|
3089
3032
|
clickedOcr: false,
|
|
3090
|
-
|
|
3033
|
+
|
|
3091
3034
|
isModalVisibleFacial: true,
|
|
3092
3035
|
facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
|
|
3093
3036
|
})
|
|
3094
3037
|
}
|
|
3095
3038
|
componentWillReceiveProps(props) {
|
|
3096
3039
|
console.log('componentWillReceiveProps',props)
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
imRoomId: props.imRoomId
|
|
3102
|
-
});
|
|
3040
|
+
this.state.channelId = props.roomId,
|
|
3041
|
+
this.state.rtoken = props.mtoken,
|
|
3042
|
+
this.state.sessionId = props.sessionId,
|
|
3043
|
+
this.state.imRoomId = props.imRoomId
|
|
3103
3044
|
}
|
|
3104
3045
|
appGetUsername = async (sid) => {
|
|
3105
3046
|
console.log(sid)
|
|
@@ -3239,9 +3180,8 @@ class Video extends Component {
|
|
|
3239
3180
|
employeeError: result.data.staffName ? '' : '查无此人',
|
|
3240
3181
|
})
|
|
3241
3182
|
if(result.data.staffName){
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
})
|
|
3183
|
+
this.state.linkData = 'https://wp-staff-gateway.wealth-platform.uat.ali.cloud.cn.hsbc/meeting-ui/OHB/CN/HSBC?chnlID=OHB&locale=zh_CN&chnlCC=CN&chnlGMC=HSBC&targetFunc=supervisorMeeting&sourceFunc=rmMeeting&appointmentID='+ this.props.businessNumber + '&staffID='+this.state.employeeNumber+'&staffName='+ encodeURIComponent(result.data.staffName)
|
|
3184
|
+
|
|
3245
3185
|
}
|
|
3246
3186
|
} else {
|
|
3247
3187
|
this.messageClick('查询失败','error')
|
|
@@ -3282,9 +3222,7 @@ class Video extends Component {
|
|
|
3282
3222
|
switchExternal = () => {
|
|
3283
3223
|
if (!this.state.isWhiteboard) {
|
|
3284
3224
|
const publish_config = {};
|
|
3285
|
-
this.
|
|
3286
|
-
isWhiteboard: true,
|
|
3287
|
-
})
|
|
3225
|
+
this.state.isWhiteboard = true
|
|
3288
3226
|
this.tabTitlesClick({
|
|
3289
3227
|
value: 'RMWhiteboard',
|
|
3290
3228
|
name: 'RM白板'
|
|
@@ -3362,11 +3300,19 @@ class Video extends Component {
|
|
|
3362
3300
|
microphoneValue: event.target.value
|
|
3363
3301
|
})
|
|
3364
3302
|
}
|
|
3303
|
+
componentDidMount() {
|
|
3304
|
+
var box=document.getElementById("whiteboardDIV");
|
|
3305
|
+
if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
|
|
3306
|
+
this.state.whiteboardWidth = box.offsetWidth,
|
|
3307
|
+
this.state.whiteboardHeight = box.offsetHeight,
|
|
3308
|
+
console.log('whiteboardDIV', this.state.whiteboardHeight,this.state.whiteboardWidth)
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3365
3311
|
render() {
|
|
3366
3312
|
const { meetingInfo } = this.props
|
|
3367
3313
|
var pdfChildren
|
|
3368
3314
|
if (this.props.children) {
|
|
3369
|
-
pdfChildren = React.cloneElement(this.props.children, { width:
|
|
3315
|
+
pdfChildren = React.cloneElement(this.props.children, { width: this.state.whiteboardWidth, height: this.state.whiteboardHeight, show: this.state.isSelect == 'RMWhiteboard'})
|
|
3370
3316
|
}
|
|
3371
3317
|
const customerNameList = (
|
|
3372
3318
|
<span className='labelClass'>
|
|
@@ -3468,7 +3414,7 @@ class Video extends Component {
|
|
|
3468
3414
|
<div className="projection">
|
|
3469
3415
|
{tabTitleList}
|
|
3470
3416
|
<img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" />
|
|
3471
|
-
<div style={{height: this.state.tabTitles.length > 0 ? 'calc(100% - 33px)' : '100%'}}>
|
|
3417
|
+
<div id="whiteboardDIV" style={{height: this.state.tabTitles.length > 0 ? 'calc(100% - 33px)' : '100%'}}>
|
|
3472
3418
|
|
|
3473
3419
|
<div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
|
|
3474
3420
|
<div className="videoDiv">
|
|
@@ -3528,7 +3474,7 @@ class Video extends Component {
|
|
|
3528
3474
|
</div>
|
|
3529
3475
|
<div className="wrapper" style={{ width: '20%', }}>
|
|
3530
3476
|
<div
|
|
3531
|
-
className={`itemed
|
|
3477
|
+
className={`itemed`}
|
|
3532
3478
|
>
|
|
3533
3479
|
<div className="publishVideoDiv">
|
|
3534
3480
|
|
package/src/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import "./index.less";
|
|
4
4
|
import '@babel/polyfill';
|
|
5
|
-
|
|
6
|
-
import {HSBC} from "../packages";
|
|
5
|
+
import { HSBC } from "../lib/hsbc";
|
|
6
|
+
// import {HSBC} from "../packages";
|
|
7
7
|
|
|
8
8
|
ReactDOM.render(
|
|
9
9
|
<div className="hsbc"><HSBC></HSBC></div>,
|