react_hsbc_teller 2.0.38 → 2.0.39

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.38",
3
+ "version": "2.0.39",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -60,7 +60,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
60
60
  import axios from 'axios';
61
61
  import CryptoJS from "crypto-js";
62
62
 
63
- const SDK_VERISON = '2.0.38'
63
+ const SDK_VERISON = '2.0.39'
64
64
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
65
65
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
66
66
  const { Option } = Select;
@@ -78,7 +78,8 @@ const POINT_TYPE = {
78
78
  wnd: "弱网",
79
79
  mute: "静音",
80
80
  expDark: '曝光、背光',
81
- fcd: '人脸变化检测'
81
+ fcd: '人脸变化检测',
82
+ padConnected: 'ipad已连接'
82
83
  }
83
84
  const RECORD_DEVICE_NAME = 'screen-capture-recorder'
84
85
  // const RECORD_DEVICE_NAME = 'Full HD webcam'
@@ -1522,7 +1523,7 @@ class Video extends Component {
1522
1523
  pictureInPictureVideo.style.display = 'block';
1523
1524
  pictureInPictureVideo.play();
1524
1525
  this.state.isPictureInPicture = true
1525
- clearTimeout(this.loopPlay)
1526
+ clearTimeout(this.loopPlayTimer)
1526
1527
  });
1527
1528
 
1528
1529
  pictureInPictureVideo.addEventListener('leavepictureinpicture', (event) => {
@@ -1533,7 +1534,7 @@ class Video extends Component {
1533
1534
  worker.postMessage(false);
1534
1535
  this.state.isPictureInPicture = false
1535
1536
 
1536
- clearTimeout(this.loopPlay)
1537
+ clearTimeout(this.loopPlayTimer)
1537
1538
  // 画中画循环播放逻辑
1538
1539
  if (document.hidden && this.state.businessRecordId) {
1539
1540
  this.setState({
@@ -1544,7 +1545,7 @@ class Video extends Component {
1544
1545
  if(!this.state.isPictureInPicture && document.getElementById("publish_streamId1")){
1545
1546
  let audio = new Audio(PIPictureClosedAudio)
1546
1547
  audio.play()
1547
- setTimeout(this.loopPlay, 3000);
1548
+ this.loopPlayTimer = setTimeout(this.loopPlay, 3000);
1548
1549
  }
1549
1550
  }
1550
1551
  setTimeout(this.loopPlay, 0);
@@ -1710,12 +1711,13 @@ class Video extends Component {
1710
1711
  ipadLowPowerErrorModalVisible: true,
1711
1712
  })
1712
1713
  // 循环播放ipad低电量
1713
- clearTimeout(this.ipadLowPowerPlay)
1714
+ clearTimeout(this.ipadLowPowerPlayTimer)
1714
1715
  this.ipadLowPowerPlay = () => {
1715
1716
  if(this.state.ipadLowPowerErrorModalVisible){
1716
- let audio = new Audio(IpadLowPowerAudio)
1717
- audio.play()
1718
- setTimeout(this.ipadLowPowerPlay, 3000);
1717
+ if (this.lowPowerAudio) this.lowPowerAudio.pause()
1718
+ this.lowPowerAudio = new Audio(IpadLowPowerAudio)
1719
+ this.lowPowerAudio.play()
1720
+ this.ipadLowPowerPlayTimer = setTimeout(this.ipadLowPowerPlay, 3000);
1719
1721
  }
1720
1722
  }
1721
1723
  setTimeout(this.ipadLowPowerPlay, 0);
@@ -1737,7 +1739,7 @@ class Video extends Component {
1737
1739
  else if (Mival.typeId == 5007) { // ipad充电状态
1738
1740
  if (Mival.type == '1') { // 1充电 2不在充电
1739
1741
  this.setState({ ipadLowPowerErrorModalVisible: false})
1740
- clearTimeout(this.ipadLowPowerPlay)
1742
+ clearTimeout(this.ipadLowPowerPlayTimer)
1741
1743
  }
1742
1744
  }
1743
1745
  else if (Mival.typeId == 1220) {
@@ -1924,13 +1926,13 @@ class Video extends Component {
1924
1926
  // businessRecordId: '',
1925
1927
  // })
1926
1928
  // // 循环播放录制中断语音
1927
- // clearTimeout(this.recordLoopPlay)
1929
+ // clearTimeout(this.recordLoopPlayTimer)
1928
1930
  // this.recordLoopPlay = () => {
1929
1931
  // console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
1930
1932
  // if(!this.state.businessRecordId && document.getElementById("publish_video1")){
1931
1933
  // let audio = new Audio(recordErrorAudio)
1932
1934
  // audio.play()
1933
- // setTimeout(this.recordLoopPlay, 3000);
1935
+ // this.recordLoopPlayTimer = setTimeout(this.recordLoopPlay, 3000);
1934
1936
  // }
1935
1937
  // }
1936
1938
  // setTimeout(this.recordLoopPlay, 0);
@@ -2706,6 +2708,10 @@ class Video extends Component {
2706
2708
  console.log('新加⼊房间者', participant);
2707
2709
  this.saveLog('mrtc someone joined room, userId=' + participant)
2708
2710
  this.state.isCustomer = true
2711
+
2712
+ if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
2713
+ this.saveVideoPoint('padConnected', 'ipad已连接');
2714
+ }
2709
2715
  };
2710
2716
  // 推送“有新发布”给与会者
2711
2717
  this.test_controller.OnNewPublish = (feed) => {
@@ -2938,13 +2944,13 @@ class Video extends Component {
2938
2944
  IpadLeaveErrorModalVisible: true,
2939
2945
  ipadTag: '',
2940
2946
  })
2941
- // 循环播放录制中断语音
2942
- clearTimeout(this.ipadLeavePlay)
2947
+ // 循环播放ipad退出语音
2948
+ clearTimeout(this.ipadLeavePlayTimer)
2943
2949
  this.ipadLeavePlay = () => {
2944
2950
  if(!this.state.ipadTag && document.getElementById("publish_streamId1")){
2945
2951
  let audio = new Audio(IpadLeaveAudio)
2946
2952
  audio.play()
2947
- setTimeout(this.ipadLeavePlay, 3000);
2953
+ this.ipadLeavePlayTimer = setTimeout(this.ipadLeavePlay, 3000);
2948
2954
  }
2949
2955
  }
2950
2956
  setTimeout(this.ipadLeavePlay, 0);
@@ -3194,13 +3200,13 @@ class Video extends Component {
3194
3200
  })
3195
3201
  this.saveLog(`dual recording crash, recordId=${recordId}`);
3196
3202
  // 循环播放录制中断语音
3197
- clearTimeout(this.recordLoopPlay)
3203
+ clearTimeout(this.recordLoopPlayTimer)
3198
3204
  this.recordLoopPlay = () => {
3199
3205
  console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
3200
3206
  if(!this.state.businessRecordId && document.getElementById("publish_streamId1")){
3201
3207
  let audio = new Audio(recordErrorAudio)
3202
3208
  audio.play()
3203
- setTimeout(this.recordLoopPlay, 3000);
3209
+ this.recordLoopPlayTimer = setTimeout(this.recordLoopPlay, 3000);
3204
3210
  }
3205
3211
  }
3206
3212
  setTimeout(this.recordLoopPlay, 0);
@@ -3674,10 +3680,10 @@ class Video extends Component {
3674
3680
  worker.postMessage(false);
3675
3681
  worker.terminate();
3676
3682
  message.destroy()
3677
- clearTimeout(this.loopPlay)
3678
- clearTimeout(this.recordLoopPlay)
3679
- clearTimeout(this.ipadLeavePlay)
3680
- clearTimeout(this.ipadLowPowerPlay)
3683
+ clearTimeout(this.loopPlayTimer)
3684
+ clearTimeout(this.recordLoopPlayTimer)
3685
+ clearTimeout(this.ipadLeavePlayTimer)
3686
+ clearTimeout(this.ipadLowPowerPlayTimer)
3681
3687
  clearInterval(this.state.drawCanvasInterval)
3682
3688
  clearInterval(this.state.faceDetectionTimer);
3683
3689
  clearInterval(this.state.imageDetectionTimer);
@@ -4379,6 +4385,7 @@ class Video extends Component {
4379
4385
  }
4380
4386
  this.saveLog('Start business recording')
4381
4387
  this.enableServerRecording(this.state.businessId)
4388
+ clearTimeout(this.recordLoopPlayTimer)
4382
4389
  }
4383
4390
  handleOkLowPowerConfirm = () => {
4384
4391
  // 通知ipad,获取是否在充电的状态
@@ -4393,7 +4400,7 @@ class Video extends Component {
4393
4400
  if (!this.state.ipadTag) {
4394
4401
  this.messageClick('未检测到iPad,请重新加入后再试', 'error')
4395
4402
  } else {
4396
- clearTimeout(this.ipadLeavePlay)
4403
+ clearTimeout(this.ipadLeavePlayTimer)
4397
4404
  this.setState({IpadLeaveErrorModalVisible: false})
4398
4405
  }
4399
4406
  }