react_hsbc_teller 2.0.37 → 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.37",
3
+ "version": "2.0.39",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -119,7 +119,7 @@ export default class foot extends Component {
119
119
  <div className="one">
120
120
  <img className="imgClass" src={require("../../assets/img/switchExternal.png").default} alt="" />
121
121
  <div className="text">
122
- 远程签署
122
+ {this.props.recordMode == 1?'远程':''}签署
123
123
  </div>
124
124
  </div>
125
125
  </div>
@@ -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.37'
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
  }
@@ -6570,9 +6577,12 @@ class Video extends Component {
6570
6577
  {otherAttendeesList}
6571
6578
  </li>
6572
6579
  }
6580
+ {
6581
+ this.props.recordMode != 2 &&
6573
6582
  <li>
6574
6583
  请注意,若会议中需要客户出示证件,请客户使用手机的后置摄像头展示证件,由客户经理拍摄证件照片以完成客户身份核实。客户可点击会议主页面上的”切换摄像头“按钮切换手机摄像头
6575
6584
  </li>
6585
+ }
6576
6586
 
6577
6587
  </ul>
6578
6588
  </div>
@@ -6587,7 +6597,7 @@ class Video extends Component {
6587
6597
  size={110} //二维码的宽高尺寸
6588
6598
  fgColor="#000000" //二维码的颜色
6589
6599
  />
6590
- <div className='sessionDiv'>{this.state.sessionId.slice(0, 4)}-{this.state.sessionId.slice(4-this.state.sessionId.length)}</div>
6600
+ <div className='sessionDiv' style={{marginTop: '20px'}}><span>会议号码</span><div className='num'>{this.state.sessionId}</div></div>
6591
6601
  </div> : null}
6592
6602
  </div>
6593
6603
  }
@@ -6818,7 +6828,7 @@ class Video extends Component {
6818
6828
  size={120} //二维码的宽高尺寸
6819
6829
  fgColor="#000000" //二维码的颜色
6820
6830
  />
6821
- <div className='sessionDiv'>{this.state.sessionId.slice(0, 4)}-{this.state.sessionId.slice(4-this.state.sessionId.length)}</div>
6831
+ <div className='sessionDiv'><span>会议号码</span><div className='num'>{this.state.sessionId}</div></div>
6822
6832
  </div>
6823
6833
  </Modal>
6824
6834
  {/* 是否退出会议*/}
@@ -7216,8 +7226,8 @@ class Video extends Component {
7216
7226
  </Panel>
7217
7227
  {
7218
7228
  this.props.recordMode == 2 &&
7219
- <Panel header={<span>iPad设备 - {this.state.ipadTag? '合格':'不合格'} {this.state.ipadTag? <img src={IconSuccess} />: <img src={IconFail} />}</span>} key="6" className={this.state.ipadTag? '':'panel-error'}>
7220
- <p className="envClass">{this.state.ipadTag? 'iPad设备已加入':'未检测到iPad设备,请扫码或输入会议号入会'}</p>
7229
+ <Panel header={<span>双录iPad设备 - {this.state.ipadTag? '合格':'未开启'} {this.state.ipadTag? <img src={IconSuccess} />: <img src={IconFail} />}</span>} key="6" className={this.state.ipadTag? '':'panel-error'}>
7230
+ <p className="envClass">{this.state.ipadTag? 'iPad设备已加入':'请使用双录iPAD扫描以下会议二维码或输入会议号,开启双录'}</p>
7221
7231
  <div className='QRCode flex' style={{display: this.state.ipadTag? 'none':''}}>
7222
7232
  <QRCode
7223
7233
  value={JSON.stringify({
@@ -7229,7 +7239,7 @@ class Video extends Component {
7229
7239
  size={100}
7230
7240
  fgColor="#000000"
7231
7241
  />
7232
- <div className='sessionDiv'>{this.state.sessionId.slice(0, 4)}-{this.state.sessionId.slice(4-this.state.sessionId.length)}</div>
7242
+ <div className='sessionDiv'><span>会议号码</span><div className='num'>{this.state.sessionId}</div></div>
7233
7243
  </div>
7234
7244
  </Panel>
7235
7245
  }
@@ -466,7 +466,7 @@
466
466
  }
467
467
  .ipadCode{
468
468
  margin-top: 16px;
469
- margin-bottom: 20px;
469
+ margin-bottom: 16px;
470
470
  margin-left: 30px;
471
471
  position: relative;
472
472
  }
@@ -668,7 +668,7 @@ display: inline-flex;
668
668
  display: flex;
669
669
  flex-direction: column;
670
670
  align-items: center;
671
- .sessionDiv{
671
+ .num{
672
672
  background: #DB0011;
673
673
  border-radius: 20px;
674
674
  padding: 0 15px;
@@ -676,14 +676,26 @@ display: inline-flex;
676
676
  line-height: 40px;
677
677
  height: 40px;
678
678
  color: white;
679
- margin-top: 20px;
679
+ margin-top: 5px;
680
+ }
681
+ .sessionDiv{
682
+ display: flex;
683
+ flex-direction: column;
684
+ span{
685
+ margin-bottom: 3px;
686
+ font-size: 16px;
687
+ font-weight: bold;
688
+ text-align: center;
689
+ }
680
690
  }
681
691
  &.flex{
682
692
  position: initial;
683
693
  flex-direction: row;
684
694
  .sessionDiv{
685
695
  margin-left: 20px;
686
- margin-top: 0;
696
+ }
697
+ .num{
698
+ margin-top: 0px;
687
699
  font-weight: 500;
688
700
  font-size: 1rem;
689
701
  }
@@ -693,8 +705,8 @@ display: inline-flex;
693
705
  .ipadCode{
694
706
  margin-left: 0px;
695
707
  }
696
- .sessionDiv{
697
- margin-top: 0;
708
+ .num{
709
+ margin-top: 0px;
698
710
  font-weight: 500;
699
711
  font-size: 1rem;
700
712
  margin-bottom: 0.5rem;