react_hsbc_teller 2.0.74 → 2.0.76

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.
@@ -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.74'
67
+ const SDK_VERISON = '2.0.76'
67
68
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
68
69
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
69
70
  const { Option } = Select;
@@ -351,7 +352,9 @@ class Video extends Component {
351
352
  transcribeErrorCode: '',
352
353
  presaleRecordId: '',
353
354
  salePresaleRecordId: '',
354
- supplesalePresaleRecordId: ''
355
+ supplesalePresaleRecordId: '',
356
+ gainNodeVolume: 1, // 音量增益节点-用于投屏
357
+ gainNodeVolumeNew: 1
355
358
 
356
359
  };
357
360
  // eslint-disable-next-line no-undef
@@ -917,7 +920,7 @@ class Video extends Component {
917
920
  recordParam.height = 720;
918
921
  recordParam.recordTotalStream = 0;
919
922
  recordParam.startTimeout = 10;
920
- recordParam.splitType = 1;
923
+ recordParam.splitType = 0;
921
924
  recordParam.endType = 1;
922
925
  recordParam.crf = 26
923
926
  recordParam.overlaps = [
@@ -1789,6 +1792,9 @@ class Video extends Component {
1789
1792
  // 关闭录制
1790
1793
  this.saveLog('stop recording')
1791
1794
  this.test_controller.StopRemoteRecord(this.state.recordId)
1795
+ if(this.state.presaleRecordId) {
1796
+ this.test_controller.StopRemoteRecord(this.state.presaleRecordId)
1797
+ }
1792
1798
  }
1793
1799
  }
1794
1800
  }
@@ -2166,6 +2172,12 @@ class Video extends Component {
2166
2172
  console.log('业务录制关闭', this.state.businessRecordId)
2167
2173
  this.saveLog('Stop business recording')
2168
2174
  this.test_controller.StopRemoteRecord(this.state.businessRecordId)
2175
+ if(this.state.salePresaleRecordId) {
2176
+ this.test_controller.StopRemoteRecord(this.state.salePresaleRecordId)
2177
+ }
2178
+ if(this.state.supplesalePresaleRecordId) {
2179
+ this.test_controller.StopRemoteRecord(this.state.supplesalePresaleRecordId)
2180
+ }
2169
2181
  if (this.state.ipadRecordId) this.test_controller.StopRemoteRecord(this.state.ipadRecordId)
2170
2182
 
2171
2183
  this.state.businessId = '';
@@ -2177,6 +2189,10 @@ class Video extends Component {
2177
2189
  // 会议到时间
2178
2190
  console.log('会议超过时间限制')
2179
2191
  this.endSessionValue();
2192
+ } else if (Mival.typeId == 990002 && this.state.sessionId == Mival.sessionId) {
2193
+ this.props.closePdfCallback({
2194
+ step: Mival.data.step
2195
+ })
2180
2196
  }
2181
2197
  }
2182
2198
  getUserTitle = (userId) => {
@@ -2782,7 +2798,29 @@ class Video extends Component {
2782
2798
  if (stream.getAudioTracks()[0] && newStream1.addTrack) {
2783
2799
  newStream1.addTrack(stream.getAudioTracks()[0])
2784
2800
  }
2785
- return newStream1
2801
+
2802
+ if (publish_device == 2 && newStream1.getAudioTracks().length > 0) {
2803
+ console.log('AudioContextAudioContext', this.state.gainNodeVolume)
2804
+ const audioContext = new AudioContext();
2805
+ const source = audioContext.createMediaStreamSource(newStream1);
2806
+ const gainNode = audioContext.createGain();
2807
+
2808
+ // 设置增益倍数(2.0 = 提升100%)自定义选择1-5
2809
+ gainNode.gain.value = this.state.gainNodeVolume; // 根据需求调整
2810
+ // 创建处理后的流
2811
+ const dest = audioContext.createMediaStreamDestination();
2812
+ source.connect(gainNode).connect(dest);
2813
+
2814
+ // 构建新流(视频+增强后音频)
2815
+ const processedStream = new MediaStream([
2816
+ ...newStream1.getVideoTracks(),
2817
+ ...dest.stream.getAudioTracks()
2818
+ ]);
2819
+
2820
+ return processedStream;
2821
+ } else {
2822
+ return newStream1
2823
+ }
2786
2824
  }
2787
2825
  return stream
2788
2826
  }
@@ -6403,6 +6441,7 @@ class Video extends Component {
6403
6441
  this.envDetection()
6404
6442
  this.setState({
6405
6443
  isModalVisibleEnvironment: true,
6444
+ gainNodeVolumeNew: this.state.gainNodeVolume
6406
6445
  })
6407
6446
  }
6408
6447
 
@@ -6490,18 +6529,22 @@ class Video extends Component {
6490
6529
  handleOkEnvDetection = async () => {
6491
6530
  this.setState({
6492
6531
  isModalVisibleEnvironment: false,
6532
+ gainNodeVolume: this.state.gainNodeVolumeNew
6533
+ }, () => {
6534
+ const cMicrophone = this.state.microphoneList.find((item) => item.actionid === this.state.microphoneValue);
6535
+ const cSpeaker = this.state.speakerList[0];
6536
+ console.log(`当前麦克风设备: ${cMicrophone?.actionname || ''}, 当前扬声器设备: ${cSpeaker?.actionname || ''}`, `当前设置的投屏音量为:${this.state.gainNodeVolume}`);
6537
+ this.saveLog(`当前麦克风设备: ${cMicrophone?.actionname || ''}, 当前扬声器设备: ${cSpeaker?.actionname || ''}`); // 开启画中画
6538
+ this.saveLog(`当前设置的投屏音量为:${this.state.gainNodeVolume}`)
6539
+ if (!this.state.isPictureInPicture) {
6540
+ this.pictureInPicture()
6541
+ }
6542
+ // 分行模式,需要自动开启业务录制
6543
+ if (this.props.recordMode == 2) {
6544
+ this.startBusinessRecord()
6545
+ }
6493
6546
  })
6494
- const cMicrophone = this.state.microphoneList.find((item)=> item.actionid === this.state.microphoneValue);
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
- }
6547
+
6505
6548
  }
6506
6549
 
6507
6550
  async startBusinessRecord() {
@@ -7061,6 +7104,12 @@ class Video extends Component {
7061
7104
  // })
7062
7105
  // }
7063
7106
  }
7107
+ onChangeVolume = (value) => {
7108
+ console.log('onChangeVolume', value)
7109
+ this.setState({
7110
+ gainNodeVolumeNew: value
7111
+ })
7112
+ }
7064
7113
  render() {
7065
7114
  const { meetingInfo, isTranscribing } = this.props
7066
7115
  var pdfChildren
@@ -7182,6 +7231,13 @@ class Video extends Component {
7182
7231
  bottom: 0,
7183
7232
  margin: 'auto'
7184
7233
  };
7234
+ const marks = {
7235
+ 1: '1',
7236
+ 2: '2',
7237
+ 3: '3',
7238
+ 4: '4',
7239
+ 5: '5'
7240
+ };
7185
7241
  return (
7186
7242
  <div className="all" id="allHSBC">
7187
7243
  <Spin spinning={this.state.loading} tip="视频初始化中...">
@@ -7933,7 +7989,7 @@ class Video extends Component {
7933
7989
  <Button className={isEnvironmentOK ?"modelButtonOk": "modelButtonNo"} type="primary" disabled={!isEnvironmentOK } danger onClick={this.handleOkEnvDetection}>确定</Button>
7934
7990
  </div>
7935
7991
  ]}>
7936
- <Collapse defaultActiveKey={['1', '2', '3', '4', '5', '6']} ghost>
7992
+ <Collapse defaultActiveKey={['1', '2', '3', '4', '5', '6', '7']} ghost>
7937
7993
 
7938
7994
  <Panel header={<span>网络检测 - {this.state.envInfo.networkResult } {this.state.envInfo.networkResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
7939
7995
  key="5" className={this.state.envInfo.networkResult=='不合格'? 'panel-error':''} >
@@ -8011,6 +8067,9 @@ class Video extends Component {
8011
8067
  <p className="envClass">{this.state.envInfo.lightResult=='合格'? '无过度背光、曝光':'过度背光、曝光'}</p>
8012
8068
  </Panel>
8013
8069
  }
8070
+ <Panel header={<span>投屏音量</span>} key="7">
8071
+ <Slider marks={marks} className="sliderClass" min={1} max={5} value={this.state.gainNodeVolumeNew} onChange={this.onChangeVolume} />
8072
+ </Panel>
8014
8073
  </Collapse>
8015
8074
  </Modal>
8016
8075
  <video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
@@ -719,3 +719,7 @@ body {
719
719
  .currentDevice{
720
720
  color: #DB0011;
721
721
  }
722
+ .sliderClass{
723
+ width: 70%;
724
+ margin-left: 1.25rem;
725
+ }