react_hsbc_teller 2.0.46 → 2.0.47
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
|
Binary file
|
package/packages/demo/demo.js
CHANGED
|
@@ -5,18 +5,10 @@ import Pdf from './pdf.js'
|
|
|
5
5
|
class Demo extends Component {
|
|
6
6
|
state = {
|
|
7
7
|
shareMask: false,
|
|
8
|
-
imRoomId
|
|
9
|
-
:
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
"IZLZMoTxj",
|
|
14
|
-
mtoken
|
|
15
|
-
:
|
|
16
|
-
"bc084d8a922f",
|
|
17
|
-
roomId
|
|
18
|
-
:
|
|
19
|
-
"663912632731275",
|
|
8
|
+
imRoomId: "",
|
|
9
|
+
sessionId: "",
|
|
10
|
+
mtoken: "",
|
|
11
|
+
roomId: "",
|
|
20
12
|
// roomId: '',
|
|
21
13
|
// mtoken: '',
|
|
22
14
|
// imRoomId: '',
|
|
@@ -26,6 +26,7 @@ import ipadLeaveMeeting from '../../assets/mp3/ipad_leave_meeting.mp3'
|
|
|
26
26
|
import recordErrorAudio from '../../assets/mp3/record_error.mp3'
|
|
27
27
|
import IpadLeaveAudio from '../../assets/mp3/ipad_leave_error.mp3';
|
|
28
28
|
import IpadLowPowerAudio from '../../assets/mp3/ipad_low_power.mp3';
|
|
29
|
+
import MediaErrorAudio from '../../assets/mp3/media_error.mp3';
|
|
29
30
|
import internalJoin from '../../assets/mp3/internalJoin.mp3'
|
|
30
31
|
import internalLeft from '../../assets/mp3/internalLeft.mp3'
|
|
31
32
|
import leftMetting from '../../assets/mp3/leftmeeting.mp3'
|
|
@@ -60,7 +61,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
|
|
|
60
61
|
import axios from 'axios';
|
|
61
62
|
import CryptoJS from "crypto-js";
|
|
62
63
|
|
|
63
|
-
const SDK_VERISON = '2.0.
|
|
64
|
+
const SDK_VERISON = '2.0.47'
|
|
64
65
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
65
66
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
66
67
|
const { Option } = Select;
|
|
@@ -80,7 +81,8 @@ const POINT_TYPE = {
|
|
|
80
81
|
mute: "静音",
|
|
81
82
|
expDark: '曝光、背光',
|
|
82
83
|
fcd: '人脸变化检测',
|
|
83
|
-
padConnected: 'ipad已连接'
|
|
84
|
+
padConnected: 'ipad已连接',
|
|
85
|
+
conFail: '媒体流服务断开'
|
|
84
86
|
}
|
|
85
87
|
const RECORD_DEVICE_NAME = 'screen-capture-recorder'
|
|
86
88
|
// const RECORD_DEVICE_NAME = 'Full HD webcam'
|
|
@@ -2329,6 +2331,24 @@ class Video extends Component {
|
|
|
2329
2331
|
console.log('初始化音视频失败', err_code, err_msg)
|
|
2330
2332
|
this.saveLog('OnMediaCallFail, code=' + err_code)
|
|
2331
2333
|
};
|
|
2334
|
+
|
|
2335
|
+
const playAudioTip = () => {
|
|
2336
|
+
this.messageClick('媒体流服务异常断开,请退出重试', 'error')
|
|
2337
|
+
this.setState({
|
|
2338
|
+
mediaErrorModalVisible: true,
|
|
2339
|
+
})
|
|
2340
|
+
// 循环播放提醒
|
|
2341
|
+
clearTimeout(this.mediaErrorPlayTimer)
|
|
2342
|
+
this.mediaErrorPlay = () => {
|
|
2343
|
+
if(this.state.mediaErrorModalVisible){
|
|
2344
|
+
if (this.mediaErrorAudio) this.mediaErrorAudio.pause()
|
|
2345
|
+
this.mediaErrorAudio = new Audio(MediaErrorAudio)
|
|
2346
|
+
this.mediaErrorAudio.play()
|
|
2347
|
+
this.mediaErrorPlayTimer = setTimeout(this.mediaErrorPlay, 3000);
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
setTimeout(this.mediaErrorPlay, 0);
|
|
2351
|
+
}
|
|
2332
2352
|
// 音视频关闭通知
|
|
2333
2353
|
this.test_controller.OnMediaClose = (code, sid) => {
|
|
2334
2354
|
console.log('OnMediaClose',code, sid)
|
|
@@ -2336,9 +2356,17 @@ class Video extends Component {
|
|
|
2336
2356
|
if (sid == this.state.publishSid) {
|
|
2337
2357
|
this.saveLog('Audio and video close notification,' + code)
|
|
2338
2358
|
this.roomCallBack(2, '音视频异常关闭', 8)
|
|
2359
|
+
if (code == 5007 || code == 5007 || code == 5009 || code == 5010 || code == 5011) {
|
|
2360
|
+
this.saveVideoPoint('conFail', `RM端媒体链路断开, err_code=${code}`)
|
|
2361
|
+
playAudioTip();
|
|
2362
|
+
}
|
|
2339
2363
|
} else if (sid == this.state.publishScreenSid) {
|
|
2340
2364
|
this.state.isScreenSwitching = false
|
|
2341
2365
|
this.setSharedScreenState(false)
|
|
2366
|
+
if (code == 5007 || code == 5007 || code == 5009 || code == 5010 || code == 5011) {
|
|
2367
|
+
this.saveVideoPoint('conFail', `RM投屏媒体链路断开, err_code=${code}`)
|
|
2368
|
+
playAudioTip();
|
|
2369
|
+
}
|
|
2342
2370
|
if (code == 5012) {
|
|
2343
2371
|
this.saveLog('Manual cancel share'); // 点了取消,拒绝系统授权
|
|
2344
2372
|
} else {
|
|
@@ -3731,6 +3759,7 @@ class Video extends Component {
|
|
|
3731
3759
|
clearTimeout(this.recordLoopPlayTimer)
|
|
3732
3760
|
clearTimeout(this.ipadLeavePlayTimer)
|
|
3733
3761
|
clearTimeout(this.ipadLowPowerPlayTimer)
|
|
3762
|
+
clearTimeout(this.mediaErrorPlayTimer)
|
|
3734
3763
|
clearInterval(this.state.drawCanvasInterval)
|
|
3735
3764
|
clearInterval(this.state.faceDetectionTimer);
|
|
3736
3765
|
clearInterval(this.state.imageDetectionTimer);
|
|
@@ -4447,6 +4476,15 @@ class Video extends Component {
|
|
|
4447
4476
|
'userId': this.props.tellerAccount
|
|
4448
4477
|
})
|
|
4449
4478
|
}
|
|
4479
|
+
handleOkMediaErrorConfirm = () => {
|
|
4480
|
+
// 刷新重试
|
|
4481
|
+
clearTimeout(this.mediaErrorPlayTimer)
|
|
4482
|
+
this.handleOkEnd()
|
|
4483
|
+
}
|
|
4484
|
+
handleCancelMediaError = () => {
|
|
4485
|
+
clearTimeout(this.mediaErrorPlayTimer)
|
|
4486
|
+
this.setState({ mediaErrorModalVisible: false })
|
|
4487
|
+
}
|
|
4450
4488
|
handleOkIpadLeaveConfirm = () => {
|
|
4451
4489
|
// 检测ipad是否入会
|
|
4452
4490
|
if (!this.state.ipadTag) {
|
|
@@ -5226,7 +5264,8 @@ class Video extends Component {
|
|
|
5226
5264
|
try {
|
|
5227
5265
|
let result = await API.appGetUsername({
|
|
5228
5266
|
userId: userId,
|
|
5229
|
-
sessionId: this.state.sessionId
|
|
5267
|
+
sessionId: this.state.sessionId,
|
|
5268
|
+
activityId: this.props.businessNumber
|
|
5230
5269
|
});
|
|
5231
5270
|
console.log(result)
|
|
5232
5271
|
|
|
@@ -6903,6 +6942,15 @@ class Video extends Component {
|
|
|
6903
6942
|
<div className='sessionDiv'><span>会议号码</span><div className='num'>{this.state.sessionId}</div></div>
|
|
6904
6943
|
</div>
|
|
6905
6944
|
</Modal>
|
|
6945
|
+
{/* 媒体流断开提示 */}
|
|
6946
|
+
<Modal closable={false} centered={true} visible={this.state.mediaErrorModalVisible} maskClosable={false} footer={[
|
|
6947
|
+
<div key='end'>
|
|
6948
|
+
<Button className="modelButtonCancel" onClick={this.handleCancelMediaError}>取消</Button>
|
|
6949
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkMediaErrorConfirm}>确定</Button>
|
|
6950
|
+
</div>
|
|
6951
|
+
]}>
|
|
6952
|
+
<div className='endModal'>媒体流服务异常断开,请退出重试</div>
|
|
6953
|
+
</Modal>
|
|
6906
6954
|
{/* 是否退出会议*/}
|
|
6907
6955
|
<Modal closable={false} centered={true} visible={this.state.isModalVisibleEnd} maskClosable={false} footer={[
|
|
6908
6956
|
<div key='end'>
|