react_hsbc_teller 2.0.23 → 2.0.24

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -53,7 +53,7 @@ import Step from '../components/step/step.jsx'
53
53
  import axios from 'axios';
54
54
  import CryptoJS from "crypto-js";
55
55
 
56
- const SDK_VERISON = '2.0.23'
56
+ const SDK_VERISON = '2.0.24'
57
57
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
58
58
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
59
59
  const { Option } = Select;
@@ -1703,22 +1703,23 @@ class Video extends Component {
1703
1703
  }
1704
1704
  }
1705
1705
  } else if (Mival.typeId == 10020) {
1706
- // 录制中断
1707
- this.messageClick('录制服务异常中断,请重试', 'error')
1708
- this.saveLog('recording error')
1709
- this.setState({
1710
- isRecordingeErrorModalVisible: true,
1711
- recordId: ''
1712
- })
1713
- // 循环播放录制中断语音
1714
- const loopPlay = () => {
1715
- if(!this.state.recordId && document.getElementById("publish_video1")){
1716
- let audio = new Audio(recordErrorAudio)
1717
- audio.play()
1718
- setTimeout(loopPlay, 3000);
1719
- }
1720
- }
1721
- setTimeout(loopPlay, 0);
1706
+ // 录制中断(模拟测试)
1707
+ // this.messageClick('双录异常中断,请重新开启', 'error')
1708
+ // this.setState({
1709
+ // isRecordingeErrorModalVisible: true,
1710
+ // businessRecordId: '',
1711
+ // })
1712
+ // // 循环播放录制中断语音
1713
+ // clearTimeout(this.recordLoopPlay)
1714
+ // this.recordLoopPlay = () => {
1715
+ // console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
1716
+ // if(!this.state.businessRecordId && document.getElementById("publish_video1")){
1717
+ // let audio = new Audio(recordErrorAudio)
1718
+ // audio.play()
1719
+ // setTimeout(this.recordLoopPlay, 3000);
1720
+ // }
1721
+ // }
1722
+ // setTimeout(this.recordLoopPlay, 0);
1722
1723
 
1723
1724
  } else if (Mival.typeId == 33001 && this.state.sessionId == Mival.data.sessionId) {
1724
1725
  if (Mival.type == 1) {
@@ -2885,6 +2886,28 @@ class Video extends Component {
2885
2886
  msg
2886
2887
  ) => {
2887
2888
  console.log('服务端录制失败通知', recordId, feedId, code, msg)
2889
+ this.saveLog(`recording error, recordId=${recordId}`)
2890
+
2891
+ // 如果在业务双录中,需要重新开启;如果是full录制出错,则不用处理
2892
+ if (this.state.businessRecordId == recordId) {
2893
+ // 录制中断
2894
+ this.messageClick('双录异常中断,请重新开启', 'error')
2895
+ this.setState({
2896
+ isRecordingeErrorModalVisible: true,
2897
+ businessRecordId: '',
2898
+ })
2899
+ // 循环播放录制中断语音
2900
+ clearTimeout(this.recordLoopPlay)
2901
+ this.recordLoopPlay = () => {
2902
+ console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
2903
+ if(!this.state.businessRecordId && document.getElementById("publish_video1")){
2904
+ let audio = new Audio(recordErrorAudio)
2905
+ audio.play()
2906
+ setTimeout(this.recordLoopPlay, 3000);
2907
+ }
2908
+ }
2909
+ setTimeout(this.recordLoopPlay, 0);
2910
+ }
2888
2911
  };
2889
2912
  // 停止浏览器录制成功回调
2890
2913
  this.test_controller.OnClientStopRecordSuccess = (
@@ -3428,6 +3451,7 @@ class Video extends Component {
3428
3451
  }
3429
3452
  message.destroy()
3430
3453
  clearTimeout(this.loopPlay)
3454
+ clearTimeout(this.recordLoopPlay)
3431
3455
  clearInterval(this.state.drawCanvasInterval)
3432
3456
  clearInterval(this.state.faceDetectionTimer);
3433
3457
  clearInterval(this.state.imageDetectionTimer);
@@ -3993,8 +4017,8 @@ class Video extends Component {
3993
4017
  if (!this.state.isPictureInPicture) {
3994
4018
  this.pictureInPicture()
3995
4019
  }
3996
- this.saveLog('Start recording')
3997
- this.enableServerRecording()
4020
+ this.saveLog('Start business recording')
4021
+ this.enableServerRecording(this.state.businessId)
3998
4022
  }
3999
4023
  handleOk = () => {
4000
4024
  // 代表此时按钮是暂停会话,把isSuspend改成true变成恢复会话
@@ -6126,7 +6150,7 @@ class Video extends Component {
6126
6150
 
6127
6151
  </ul>
6128
6152
  </div>
6129
- {!this.state.loading && this.state.sessionType && this.state.sessionId?
6153
+ {!this.state.loading && this.state.sessionType && this.state.sessionId && this.props.recordMode == 2?
6130
6154
  <div className='QRCode'>
6131
6155
  <QRCode
6132
6156
  value={JSON.stringify({