react_hsbc_teller 2.0.75 → 2.0.77
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/README.md +6 -0
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/video/video.css +667 -0
- package/packages/pages/video/video.jsx +132 -24
- package/packages/pages/video/video.less +4 -0
|
@@ -22,7 +22,8 @@ import { Collapse } from 'antd';
|
|
|
22
22
|
import 'antd/lib/collapse/style'
|
|
23
23
|
const { Panel } = Collapse;
|
|
24
24
|
import { Button } from '../../../node_modules/antd/lib/index';
|
|
25
|
-
|
|
25
|
+
import Slider from 'antd/lib/slider';
|
|
26
|
+
import 'antd/lib/slider/style'
|
|
26
27
|
import './video.less'
|
|
27
28
|
import { compressImage, isLight, saveBase64Image, combineBase64Images } from '../../utils/utils'
|
|
28
29
|
import Recorder from "js-audio-recorder";
|
|
@@ -63,7 +64,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
|
|
|
63
64
|
import axios from 'axios';
|
|
64
65
|
import CryptoJS from "crypto-js";
|
|
65
66
|
|
|
66
|
-
const SDK_VERISON = '2.0.
|
|
67
|
+
const SDK_VERISON = '2.0.77'
|
|
67
68
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
68
69
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
69
70
|
const { Option } = Select;
|
|
@@ -351,7 +352,10 @@ class Video extends Component {
|
|
|
351
352
|
transcribeErrorCode: '',
|
|
352
353
|
presaleRecordId: '',
|
|
353
354
|
salePresaleRecordId: '',
|
|
354
|
-
supplesalePresaleRecordId: ''
|
|
355
|
+
supplesalePresaleRecordId: '',
|
|
356
|
+
gainNodeVolume: 1, // 音量增益节点-用于投屏
|
|
357
|
+
gainNodeVolumeNew: 1,
|
|
358
|
+
networkAnomalyModalVisible: false, // 网络异常弹窗
|
|
355
359
|
|
|
356
360
|
};
|
|
357
361
|
// eslint-disable-next-line no-undef
|
|
@@ -1789,6 +1793,9 @@ class Video extends Component {
|
|
|
1789
1793
|
// 关闭录制
|
|
1790
1794
|
this.saveLog('stop recording')
|
|
1791
1795
|
this.test_controller.StopRemoteRecord(this.state.recordId)
|
|
1796
|
+
if(this.state.presaleRecordId) {
|
|
1797
|
+
this.test_controller.StopRemoteRecord(this.state.presaleRecordId)
|
|
1798
|
+
}
|
|
1792
1799
|
}
|
|
1793
1800
|
}
|
|
1794
1801
|
}
|
|
@@ -2166,6 +2173,12 @@ class Video extends Component {
|
|
|
2166
2173
|
console.log('业务录制关闭', this.state.businessRecordId)
|
|
2167
2174
|
this.saveLog('Stop business recording')
|
|
2168
2175
|
this.test_controller.StopRemoteRecord(this.state.businessRecordId)
|
|
2176
|
+
if(this.state.salePresaleRecordId) {
|
|
2177
|
+
this.test_controller.StopRemoteRecord(this.state.salePresaleRecordId)
|
|
2178
|
+
}
|
|
2179
|
+
if(this.state.supplesalePresaleRecordId) {
|
|
2180
|
+
this.test_controller.StopRemoteRecord(this.state.supplesalePresaleRecordId)
|
|
2181
|
+
}
|
|
2169
2182
|
if (this.state.ipadRecordId) this.test_controller.StopRemoteRecord(this.state.ipadRecordId)
|
|
2170
2183
|
|
|
2171
2184
|
this.state.businessId = '';
|
|
@@ -2177,6 +2190,10 @@ class Video extends Component {
|
|
|
2177
2190
|
// 会议到时间
|
|
2178
2191
|
console.log('会议超过时间限制')
|
|
2179
2192
|
this.endSessionValue();
|
|
2193
|
+
} else if (Mival.typeId == 990002 && this.state.sessionId == Mival.sessionId) {
|
|
2194
|
+
this.props.closePdfCallback({
|
|
2195
|
+
step: Mival.data.step
|
|
2196
|
+
})
|
|
2180
2197
|
}
|
|
2181
2198
|
}
|
|
2182
2199
|
getUserTitle = (userId) => {
|
|
@@ -2465,10 +2482,18 @@ class Video extends Component {
|
|
|
2465
2482
|
transcribeErrorCode: 30001,
|
|
2466
2483
|
transcribeErrorModalVisible: true
|
|
2467
2484
|
})
|
|
2485
|
+
this.saveLog('Failed to establish connection,' + code)
|
|
2468
2486
|
} else {
|
|
2487
|
+
let message = '建立连接失败'
|
|
2488
|
+
if(code == '-101') {
|
|
2489
|
+
this.setState({
|
|
2490
|
+
networkAnomalyModalVisible: true
|
|
2491
|
+
})
|
|
2492
|
+
message = '建立连接失败,网络异常,请检查网络后重试'
|
|
2493
|
+
}
|
|
2469
2494
|
|
|
2470
2495
|
this.saveLog('Failed to establish connection,' + code)
|
|
2471
|
-
this.messageClick(
|
|
2496
|
+
this.messageClick(message, 'error')
|
|
2472
2497
|
this.state.sessionType = false
|
|
2473
2498
|
this.roomCallBack(2, '连接失败', '2-'+code)
|
|
2474
2499
|
}
|
|
@@ -2520,6 +2545,11 @@ class Video extends Component {
|
|
|
2520
2545
|
console.log('创建房间失败', err_code, err_msg)
|
|
2521
2546
|
this.saveLog('Failed to create room,' + err_code)
|
|
2522
2547
|
this.state.sessionType = false
|
|
2548
|
+
let message = '创建房间失败-' + err_code
|
|
2549
|
+
if(err_code == '-303' || err_code == '-304') {
|
|
2550
|
+
message = '创建房间超时,请检查网络后重试-' + err_code
|
|
2551
|
+
}
|
|
2552
|
+
this.messageClick(message, 'error')
|
|
2523
2553
|
this.roomCallBack(2, '创建房间失败', '7-' + err_code)
|
|
2524
2554
|
};
|
|
2525
2555
|
// 初始化⾳视频成功
|
|
@@ -2536,7 +2566,9 @@ class Video extends Component {
|
|
|
2536
2566
|
const playAudioTip = (code) => {
|
|
2537
2567
|
this.messageClick('媒体流服务异常断开,请刷新', 'error')
|
|
2538
2568
|
if(code == 5003) {
|
|
2539
|
-
this.state.mediaErrorModalMessage = '
|
|
2569
|
+
this.state.mediaErrorModalMessage = '媒体流获取失败,请刷新('+ code + ')'
|
|
2570
|
+
} else if(code == 5004 || code == 5010) {
|
|
2571
|
+
this.state.mediaErrorModalMessage = '媒体流网络异常,请刷新('+ code + ')'
|
|
2540
2572
|
} else {
|
|
2541
2573
|
this.state.mediaErrorModalMessage = '媒体流服务异常,请刷新('+ code + ')'
|
|
2542
2574
|
}
|
|
@@ -2566,8 +2598,12 @@ class Video extends Component {
|
|
|
2566
2598
|
if (sid == this.state.publishSid) {
|
|
2567
2599
|
this.saveLog('Audio and video close notification,' + code)
|
|
2568
2600
|
this.roomCallBack(2, '音视频异常关闭', '8-' + code)
|
|
2569
|
-
if (code ==
|
|
2570
|
-
|
|
2601
|
+
if (code == 5004 || code == 5007 || code == 5009 || code == 5010 || code == 5011) {
|
|
2602
|
+
let message = 'RM端媒体链路断开'
|
|
2603
|
+
if(code == 5004 || code == 5010) {
|
|
2604
|
+
message = 'RM端媒体链路断开,网络异常,请检查网络后重试'
|
|
2605
|
+
}
|
|
2606
|
+
this.saveVideoPoint('conFail', `${message}, err_code=${code}`)
|
|
2571
2607
|
playAudioTip(code);
|
|
2572
2608
|
}
|
|
2573
2609
|
//5003:启动流失败(信令阶段)
|
|
@@ -2579,8 +2615,12 @@ class Video extends Component {
|
|
|
2579
2615
|
this.state.isScreenSwitching = false
|
|
2580
2616
|
this.setSharedScreenState(false)
|
|
2581
2617
|
this.setSharedScreenTimer(false)
|
|
2582
|
-
if (code ==
|
|
2583
|
-
|
|
2618
|
+
if (code == 5004 || code == 5007 || code == 5009 || code == 5010 || code == 5011) {
|
|
2619
|
+
let message = 'RM投屏媒体链路断开'
|
|
2620
|
+
if(code == 5004 || code == 5010) {
|
|
2621
|
+
message = 'RM投屏媒体链路断开,网络异常,请检查网络后重试'
|
|
2622
|
+
}
|
|
2623
|
+
this.saveVideoPoint('conFail', `${message}, err_code=${code}`)
|
|
2584
2624
|
playAudioTip(code);
|
|
2585
2625
|
}
|
|
2586
2626
|
//5003:启动流失败(信令阶段)
|
|
@@ -2782,7 +2822,29 @@ class Video extends Component {
|
|
|
2782
2822
|
if (stream.getAudioTracks()[0] && newStream1.addTrack) {
|
|
2783
2823
|
newStream1.addTrack(stream.getAudioTracks()[0])
|
|
2784
2824
|
}
|
|
2785
|
-
|
|
2825
|
+
|
|
2826
|
+
if (publish_device == 2 && newStream1.getAudioTracks().length > 0) {
|
|
2827
|
+
console.log('AudioContextAudioContext', this.state.gainNodeVolume)
|
|
2828
|
+
const audioContext = new AudioContext();
|
|
2829
|
+
const source = audioContext.createMediaStreamSource(newStream1);
|
|
2830
|
+
const gainNode = audioContext.createGain();
|
|
2831
|
+
|
|
2832
|
+
// 设置增益倍数(2.0 = 提升100%)自定义选择1-5
|
|
2833
|
+
gainNode.gain.value = this.state.gainNodeVolume; // 根据需求调整
|
|
2834
|
+
// 创建处理后的流
|
|
2835
|
+
const dest = audioContext.createMediaStreamDestination();
|
|
2836
|
+
source.connect(gainNode).connect(dest);
|
|
2837
|
+
|
|
2838
|
+
// 构建新流(视频+增强后音频)
|
|
2839
|
+
const processedStream = new MediaStream([
|
|
2840
|
+
...newStream1.getVideoTracks(),
|
|
2841
|
+
...dest.stream.getAudioTracks()
|
|
2842
|
+
]);
|
|
2843
|
+
|
|
2844
|
+
return processedStream;
|
|
2845
|
+
} else {
|
|
2846
|
+
return newStream1
|
|
2847
|
+
}
|
|
2786
2848
|
}
|
|
2787
2849
|
return stream
|
|
2788
2850
|
}
|
|
@@ -2868,7 +2930,18 @@ class Video extends Component {
|
|
|
2868
2930
|
this.roomCallBack(2, '发布失败', '4-' + err_code)
|
|
2869
2931
|
} else {
|
|
2870
2932
|
this.test_controller.UnPublish(sid)
|
|
2871
|
-
|
|
2933
|
+
let message = '投屏失败请重新投屏'
|
|
2934
|
+
if(err_code == '-1073'){
|
|
2935
|
+
message = '超出发布限额 请检查是否已经发布'
|
|
2936
|
+
}
|
|
2937
|
+
if(err_code == '-1074'){
|
|
2938
|
+
message = '网络异常,请检查网络后重新投屏'
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
if(err_code == '5103') {
|
|
2942
|
+
message = '不⽀持当前媒体,请重新投屏'
|
|
2943
|
+
}
|
|
2944
|
+
this.messageClick(message, 'error')
|
|
2872
2945
|
this.setSharedScreenState(false)
|
|
2873
2946
|
this.setSharedScreenTimer(false)
|
|
2874
2947
|
this.saveLog('Share fail, code=' + err_code)
|
|
@@ -5027,6 +5100,12 @@ class Video extends Component {
|
|
|
5027
5100
|
handleOktranscribeErrorConfirm = () => {
|
|
5028
5101
|
location.reload(false);
|
|
5029
5102
|
}
|
|
5103
|
+
networkAnomalyConfirm = () => {
|
|
5104
|
+
location.reload(false);
|
|
5105
|
+
this.setState({
|
|
5106
|
+
networkAnomalyModalVisible: false
|
|
5107
|
+
})
|
|
5108
|
+
}
|
|
5030
5109
|
handleCancelMediaError = () => {
|
|
5031
5110
|
clearTimeout(this.mediaErrorPlayTimer)
|
|
5032
5111
|
this.setState({ mediaErrorModalVisible: false })
|
|
@@ -6403,6 +6482,7 @@ class Video extends Component {
|
|
|
6403
6482
|
this.envDetection()
|
|
6404
6483
|
this.setState({
|
|
6405
6484
|
isModalVisibleEnvironment: true,
|
|
6485
|
+
gainNodeVolumeNew: this.state.gainNodeVolume
|
|
6406
6486
|
})
|
|
6407
6487
|
}
|
|
6408
6488
|
|
|
@@ -6490,18 +6570,22 @@ class Video extends Component {
|
|
|
6490
6570
|
handleOkEnvDetection = async () => {
|
|
6491
6571
|
this.setState({
|
|
6492
6572
|
isModalVisibleEnvironment: false,
|
|
6573
|
+
gainNodeVolume: this.state.gainNodeVolumeNew
|
|
6574
|
+
}, () => {
|
|
6575
|
+
const cMicrophone = this.state.microphoneList.find((item) => item.actionid === this.state.microphoneValue);
|
|
6576
|
+
const cSpeaker = this.state.speakerList[0];
|
|
6577
|
+
console.log(`当前麦克风设备: ${cMicrophone?.actionname || ''}, 当前扬声器设备: ${cSpeaker?.actionname || ''}`, `当前设置的投屏音量为:${this.state.gainNodeVolume}`);
|
|
6578
|
+
this.saveLog(`当前麦克风设备: ${cMicrophone?.actionname || ''}, 当前扬声器设备: ${cSpeaker?.actionname || ''}`); // 开启画中画
|
|
6579
|
+
this.saveLog(`当前设置的投屏音量为:${this.state.gainNodeVolume}`)
|
|
6580
|
+
if (!this.state.isPictureInPicture) {
|
|
6581
|
+
this.pictureInPicture()
|
|
6582
|
+
}
|
|
6583
|
+
// 分行模式,需要自动开启业务录制
|
|
6584
|
+
if (this.props.recordMode == 2) {
|
|
6585
|
+
this.startBusinessRecord()
|
|
6586
|
+
}
|
|
6493
6587
|
})
|
|
6494
|
-
|
|
6495
|
-
const cSpeaker = this.state.speakerList[0];
|
|
6496
|
-
console.log(`当前麦克风设备: ${cMicrophone?.actionname ||''}, 当前扬声器设备: ${cSpeaker?.actionname || ''}`);
|
|
6497
|
-
this.saveLog(`当前麦克风设备: ${cMicrophone?.actionname ||''}, 当前扬声器设备: ${cSpeaker?.actionname || ''}`); // 开启画中画
|
|
6498
|
-
if (!this.state.isPictureInPicture) {
|
|
6499
|
-
this.pictureInPicture()
|
|
6500
|
-
}
|
|
6501
|
-
// 分行模式,需要自动开启业务录制
|
|
6502
|
-
if (this.props.recordMode == 2) {
|
|
6503
|
-
this.startBusinessRecord()
|
|
6504
|
-
}
|
|
6588
|
+
|
|
6505
6589
|
}
|
|
6506
6590
|
|
|
6507
6591
|
async startBusinessRecord() {
|
|
@@ -7061,6 +7145,12 @@ class Video extends Component {
|
|
|
7061
7145
|
// })
|
|
7062
7146
|
// }
|
|
7063
7147
|
}
|
|
7148
|
+
onChangeVolume = (value) => {
|
|
7149
|
+
console.log('onChangeVolume', value)
|
|
7150
|
+
this.setState({
|
|
7151
|
+
gainNodeVolumeNew: value
|
|
7152
|
+
})
|
|
7153
|
+
}
|
|
7064
7154
|
render() {
|
|
7065
7155
|
const { meetingInfo, isTranscribing } = this.props
|
|
7066
7156
|
var pdfChildren
|
|
@@ -7182,6 +7272,13 @@ class Video extends Component {
|
|
|
7182
7272
|
bottom: 0,
|
|
7183
7273
|
margin: 'auto'
|
|
7184
7274
|
};
|
|
7275
|
+
const marks = {
|
|
7276
|
+
1: '1',
|
|
7277
|
+
2: '2',
|
|
7278
|
+
3: '3',
|
|
7279
|
+
4: '4',
|
|
7280
|
+
5: '5'
|
|
7281
|
+
};
|
|
7185
7282
|
return (
|
|
7186
7283
|
<div className="all" id="allHSBC">
|
|
7187
7284
|
<Spin spinning={this.state.loading} tip="视频初始化中...">
|
|
@@ -7566,7 +7663,7 @@ class Video extends Component {
|
|
|
7566
7663
|
]}>
|
|
7567
7664
|
<div className='endModal'>{this.state.mediaErrorModalMessage}</div>
|
|
7568
7665
|
</Modal>
|
|
7569
|
-
{/* 30001(在信令链接失败回调中)/发布失败/音视频异常回调
|
|
7666
|
+
{/* 30001(在信令链接失败回调中)/发布失败/音视频异常回调 相关事件双录失败提示 */}
|
|
7570
7667
|
<Modal closable={false} centered={true} visible={this.state.transcribeErrorModalVisible} maskClosable={false} footer={[
|
|
7571
7668
|
<div key='end'>
|
|
7572
7669
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOktranscribeErrorConfirm}>确定</Button>
|
|
@@ -7574,6 +7671,14 @@ class Video extends Component {
|
|
|
7574
7671
|
]}>
|
|
7575
7672
|
<div className='endModal'>{'系统异常请刷新('+ this.state.transcribeErrorCode + ')'}</div>
|
|
7576
7673
|
</Modal>
|
|
7674
|
+
{/* 在网络异常的情况下弹窗提示后刷新后重试 */}
|
|
7675
|
+
<Modal closable={false} centered={true} visible={this.state.networkAnomalyModalVisible} maskClosable={false} footer={[
|
|
7676
|
+
<div key='end'>
|
|
7677
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.networkAnomalyConfirm}>确定</Button>
|
|
7678
|
+
</div>
|
|
7679
|
+
]}>
|
|
7680
|
+
<div className='endModal'>{'当前网络异常,请检查网络后重试'}</div>
|
|
7681
|
+
</Modal>
|
|
7577
7682
|
{/* 是否退出会议*/}
|
|
7578
7683
|
<Modal closable={false} centered={true} visible={this.state.isModalVisibleEnd} maskClosable={false} footer={[
|
|
7579
7684
|
<div key='end'>
|
|
@@ -7933,7 +8038,7 @@ class Video extends Component {
|
|
|
7933
8038
|
<Button className={isEnvironmentOK ?"modelButtonOk": "modelButtonNo"} type="primary" disabled={!isEnvironmentOK } danger onClick={this.handleOkEnvDetection}>确定</Button>
|
|
7934
8039
|
</div>
|
|
7935
8040
|
]}>
|
|
7936
|
-
<Collapse defaultActiveKey={['1', '2', '3', '4', '5', '6']} ghost>
|
|
8041
|
+
<Collapse defaultActiveKey={['1', '2', '3', '4', '5', '6', '7']} ghost>
|
|
7937
8042
|
|
|
7938
8043
|
<Panel header={<span>网络检测 - {this.state.envInfo.networkResult } {this.state.envInfo.networkResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
|
|
7939
8044
|
key="5" className={this.state.envInfo.networkResult=='不合格'? 'panel-error':''} >
|
|
@@ -8011,6 +8116,9 @@ class Video extends Component {
|
|
|
8011
8116
|
<p className="envClass">{this.state.envInfo.lightResult=='合格'? '无过度背光、曝光':'过度背光、曝光'}</p>
|
|
8012
8117
|
</Panel>
|
|
8013
8118
|
}
|
|
8119
|
+
<Panel header={<span>投屏音量</span>} key="7">
|
|
8120
|
+
<Slider marks={marks} className="sliderClass" min={1} max={5} value={this.state.gainNodeVolumeNew} onChange={this.onChangeVolume} />
|
|
8121
|
+
</Panel>
|
|
8014
8122
|
</Collapse>
|
|
8015
8123
|
</Modal>
|
|
8016
8124
|
<video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
|