react_hsbc_teller 2.0.14 → 2.0.16

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.14",
3
+ "version": "2.0.16",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -27,9 +27,6 @@ export default class foot extends Component {
27
27
  ocrClick=()=>{
28
28
  this.props.ocrClick()
29
29
  }
30
- paperOcrClick=()=>{
31
- this.props.paperOcrClick()
32
- }
33
30
  pictureInPicture=()=>{
34
31
  this.props.pictureInPicture()
35
32
  }
@@ -156,15 +153,6 @@ export default class foot extends Component {
156
153
  </div>
157
154
  // </Popover>
158
155
  }
159
- {
160
- item == 'PAPER_OCR' &&
161
- <div className="one" onClick={this.paperOcrClick.bind(this)}>
162
- <img className="imgClass" src={require("../../assets/img/icon_paper.png").default} alt="" />
163
- <div className="text">
164
- 纸质识别
165
- </div>
166
- </div>
167
- }
168
156
  {
169
157
  item == 'INVITE' && <div className="one" onClick={this.invitationClick.bind(this)}>
170
158
  <img className="imgClass" src={require("../../assets/img/icon_invitation.png").default} alt="" />
@@ -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.14'
56
+ const SDK_VERISON = '2.0.16'
57
57
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
58
58
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
59
59
  const { Option } = Select;
@@ -69,7 +69,9 @@ const POINT_TYPE = {
69
69
  pipd: "画中画显示、关闭",
70
70
  pwd: "违禁词检测",
71
71
  wnd: "弱网",
72
- mute: "静音"
72
+ mute: "静音",
73
+ expDark: '曝光、背光',
74
+ fcd: '人脸变化检测'
73
75
  }
74
76
  const RECORD_DEVICE_NAME = 'screen-capture-recorder'
75
77
  // const RECORD_DEVICE_NAME = 'Full HD webcam'
@@ -367,21 +369,20 @@ class Video extends Component {
367
369
  this.state.imRoomId = result.imRoomId,
368
370
  this.state.sessionId = result.sessionId;
369
371
 
370
- this.state.cameraList.forEach((el, i) => {
371
- let publish_config = {}
372
- publish_config.media_type = i==0? 1:3
373
- publish_config.publish_device = 1
374
- publish_config.videoSource = el.actionid
375
- publish_config.audioSource = this.state.microphoneValue
376
- publish_config.need_volume_analyser = true
377
- // publish_config.video_profile_type = 3
378
- publish_config.video_profile_type = 100
379
- publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
380
- publish_config.publish_video_id = 'publish_video' + (i+1)
381
- publish_config.publish_streamId_id = 'publish_streamId' + (i+1)
382
- publish_config.publish_tag = 'tag' + (i+1)
383
- this.test_controller.Publish(publish_config)
384
- })
372
+ let publish_config = {}
373
+ publish_config.media_type = 1
374
+ publish_config.publish_device = 1
375
+ publish_config.videoSource = this.state.cameraValue
376
+ publish_config.audioSource = this.state.microphoneValue
377
+ publish_config.need_volume_analyser = true
378
+ // publish_config.video_profile_type = 3
379
+ publish_config.video_profile_type = 100
380
+ publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
381
+ publish_config.publish_video_id = 'publish_video1'
382
+ publish_config.publish_streamId_id = 'publish_streamId1'
383
+ publish_config.publish_tag = 'tag1'
384
+ this.test_controller.Publish(publish_config)
385
+
385
386
  // this.publishAllScreen();
386
387
  // 单独发布录制屏幕设备的流
387
388
  this.publishRecorderDevice()
@@ -522,16 +523,16 @@ class Video extends Component {
522
523
  publish_streamId_id: 'publish_streamId1',
523
524
  publish_tag: 'tag1'
524
525
  },
525
- {
526
- publish_video_id: 'publish_video2',
527
- publish_streamId_id: 'publish_streamId2',
528
- publish_tag: 'tag2'
529
- },
530
- {
531
- publish_video_id: 'publish_video3',
532
- publish_streamId_id: 'publish_streamId3',
533
- publish_tag: 'tag3'
534
- }
526
+ // {
527
+ // publish_video_id: 'publish_video2',
528
+ // publish_streamId_id: 'publish_streamId2',
529
+ // publish_tag: 'tag2'
530
+ // },
531
+ // {
532
+ // publish_video_id: 'publish_video3',
533
+ // publish_streamId_id: 'publish_streamId3',
534
+ // publish_tag: 'tag3'
535
+ // }
535
536
  ];
536
537
  config_param.initSubscribe = [
537
538
  {
@@ -567,6 +568,8 @@ class Video extends Component {
567
568
  ];
568
569
  this.test_controller.InitRoomConfig(config_param)
569
570
  this.saveLog('mrtc InitRoomConfig start')
571
+ // 预热摄像头
572
+ this.test_controller.PreOpenLocalMedia(config_param)
570
573
  };
571
574
  rateAll = async () => {
572
575
  let data = ''
@@ -617,42 +620,42 @@ class Video extends Component {
617
620
  height: 175
618
621
  },
619
622
  {
620
- tag: 'tag2',
623
+ tag: 'customer1',
621
624
  xPosition: 213,
622
625
  yPosition: 0,
623
626
  width: 213,
624
627
  height: 175
625
628
  },
626
629
  {
627
- tag: 'tag3',
630
+ tag: 'customer2',
628
631
  xPosition: 426,
629
632
  yPosition: 0,
630
633
  width: 213,
631
634
  height: 175
632
635
  },
633
636
  {
634
- tag: 'customer1',
637
+ tag: 'customer3',
635
638
  xPosition: 639,
636
639
  yPosition: 0,
637
640
  width: 213,
638
641
  height: 175
639
642
  },
640
643
  {
641
- tag: 'customer2',
644
+ tag: 'customer4',
642
645
  xPosition: 852,
643
646
  yPosition: 0,
644
647
  width: 213,
645
648
  height: 175
646
649
  },
647
650
  {
648
- tag: 'customer3',
651
+ tag: 'customer5',
649
652
  xPosition: 1065,
650
653
  yPosition: 0,
651
654
  width: 213,
652
655
  height: 175
653
656
  },
654
657
  {
655
- tag: 'customer4',
658
+ tag: 'customer6',
656
659
  xPosition: 1278,
657
660
  yPosition: 0,
658
661
  width: 213,
@@ -939,8 +942,8 @@ class Video extends Component {
939
942
  }
940
943
  messageClick = (value, tipType) => {
941
944
  console.log('messageClick', value, tipType)
942
- const intervalSec = 15 // 相同提示触发间隔
943
- const durationSec = 10 // 提示持续时间
945
+ const intervalSec = 5 // 相同提示触发间隔
946
+ const durationSec = 4.5 // 提示持续时间
944
947
  if (messageValueMap.get(value) == undefined) {
945
948
  // map中没有相同消息
946
949
  messageValue = value
@@ -1085,18 +1088,6 @@ class Video extends Component {
1085
1088
  this.selectCustomer('ocr')
1086
1089
  }
1087
1090
  };
1088
- paperOcrClick = () => {
1089
- setTimeout(() => {
1090
- // this.messageClick('系统检测到您已签署2/3个地方,还有1处未签署', 'error')
1091
- message.error({
1092
- content: '系统检测到您已签署2/3个地方,还有1处未签署',
1093
- icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
1094
- className: 'errorClassName',
1095
- top: 200,
1096
- duration: 10
1097
- })
1098
- }, 1500);
1099
- };
1100
1091
  endSessionValue = () => {
1101
1092
  this.saveLog('RM actively exits the meeting')
1102
1093
  if (streamShare) {
@@ -1795,7 +1786,7 @@ class Video extends Component {
1795
1786
  if (res==1 || res== -1){
1796
1787
  // 背景曝光过度
1797
1788
  this.messageClick('检测到当前背光、曝光过度', 'error')
1798
- this.saveVideoPoint('env', 'RM端背光、曝光过度');
1789
+ this.saveVideoPoint('expDark', 'RM端背光、曝光过度');
1799
1790
  }
1800
1791
  origin.delete()
1801
1792
  // let end = new Date().getTime()
@@ -1849,6 +1840,8 @@ class Video extends Component {
1849
1840
  roomId: this.state.channelId + '',
1850
1841
  appId: this.state.appId,
1851
1842
  recordId: this.state.recordId,
1843
+ client: 'rm',
1844
+ customerId: this.props.tellerAccount
1852
1845
  });
1853
1846
  } catch (err) {
1854
1847
  console.error(err);
@@ -2086,21 +2079,20 @@ class Video extends Component {
2086
2079
  this.test_controller.OnJoinRoomSucc = () => {
2087
2080
  console.log('加入房间成功')
2088
2081
 
2089
- this.state.cameraList.forEach((el, i) => {
2090
- let publish_config = {}
2091
- publish_config.media_type = i==0? 1:3
2092
- publish_config.publish_device = 1
2093
- publish_config.videoSource = el.actionid
2094
- publish_config.audioSource = this.state.microphoneValue
2095
- publish_config.need_volume_analyser = true
2096
- // publish_config.video_profile_type = 3
2097
- publish_config.video_profile_type = 100
2098
- publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
2099
- publish_config.publish_video_id = 'publish_video' + (i+1)
2100
- publish_config.publish_streamId_id = 'publish_streamId' + (i+1)
2101
- publish_config.publish_tag = 'tag' + (i+1)
2102
- this.test_controller.Publish(publish_config)
2103
- })
2082
+ let publish_config = {}
2083
+ publish_config.media_type = 1
2084
+ publish_config.publish_device = 1
2085
+ publish_config.videoSource = this.state.cameraValue
2086
+ publish_config.audioSource = this.state.microphoneValue
2087
+ publish_config.need_volume_analyser = true
2088
+ // publish_config.video_profile_type = 3
2089
+ publish_config.video_profile_type = 100
2090
+ publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
2091
+ publish_config.publish_video_id = 'publish_video1'
2092
+ publish_config.publish_streamId_id = 'publish_streamId1'
2093
+ publish_config.publish_tag = 'tag1'
2094
+ this.test_controller.Publish(publish_config)
2095
+
2104
2096
  // this.publishAllScreen();
2105
2097
  // 单独发布录制屏幕设备的流
2106
2098
  this.publishRecorderDevice()
@@ -2671,7 +2663,7 @@ class Video extends Component {
2671
2663
  console.log('退出房间者', res)
2672
2664
  let data = res ? res.username ? res.username : '客户' : '客户'
2673
2665
  console.log(data)
2674
- this.messageClick((data + '已退出会议'), 'error')
2666
+ // this.messageClick((data + '已退出会议'), 'error')
2675
2667
  this.saveLog(data + ' leave room')
2676
2668
  if (res.userType == 1) {
2677
2669
  // 2--坐席  1--客户
@@ -2684,12 +2676,14 @@ class Video extends Component {
2684
2676
  let audio = new Audio(src)
2685
2677
  audio.play()
2686
2678
  }
2679
+ this.messageClick(('客户已退出会议'), 'error')
2687
2680
  } else if (res.userType == 2) {
2688
2681
  if (this.props.isOpenSound) {
2689
2682
  let src = internalLeft
2690
2683
  let audio = new Audio(src)
2691
2684
  audio.play()
2692
2685
  }
2686
+ this.messageClick(('内部人员已退出会议'), 'error')
2693
2687
  }
2694
2688
  // console.log('退出房间者',res)
2695
2689
  // let data = res? res : '客户'
@@ -5338,6 +5332,16 @@ class Video extends Component {
5338
5332
  envInfo: envInfo
5339
5333
  })
5340
5334
  }
5335
+ handleRetryEnvDetection = () => {
5336
+ this.lightDetect();
5337
+ message.success({
5338
+ content: '已更新检测结果',
5339
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
5340
+ className: 'successClassName',
5341
+ top: 200,
5342
+ duration: 3
5343
+ })
5344
+ }
5341
5345
  handleOkEnvDetection = () => {
5342
5346
  this.setState({
5343
5347
  isModalVisibleEnvironment: false,
@@ -6112,7 +6116,7 @@ class Video extends Component {
6112
6116
  </div>
6113
6117
 
6114
6118
  </div>
6115
- {
6119
+ {/* {
6116
6120
  this.state.cameraList.map((item, index) => {
6117
6121
  if (index > 0)
6118
6122
  return <div
@@ -6145,7 +6149,7 @@ class Video extends Component {
6145
6149
  </div>
6146
6150
  </div>
6147
6151
  })
6148
- }
6152
+ } */}
6149
6153
  {/* <div className={`itemed ${this.state.isVideoList? 'videoMinutuListClass': 'videoMinutuClass'}`}
6150
6154
  style={{ position: "relative", display: (this.state.videoList[0].videoName) ? '' : 'none' }}
6151
6155
  >
@@ -6242,7 +6246,6 @@ class Video extends Component {
6242
6246
  invitationClick={this.invitationClick}
6243
6247
  customerFaceClick={this.customerFaceClick}
6244
6248
  ocrClick={this.ocrClick}
6245
- paperOcrClick={this.paperOcrClick}
6246
6249
  switchExternal={this.switchExternal}
6247
6250
  inspection={this.inspection}
6248
6251
  toggleAsr={this.toggleAsr}
@@ -6627,7 +6630,7 @@ class Video extends Component {
6627
6630
  </Modal>
6628
6631
  <Modal title="环境检测" maskClosable={false} width={650} closable={false} centered={true} visible={this.state.isModalVisibleEnvironment} footer={[
6629
6632
  <div key='env'>
6630
- {/* <Button className="modelButtonCancel" onClick={this.handleCancelEnvDetection}>取消</Button> */}
6633
+ <Button className="modelButtonCancel" onClick={this.handleRetryEnvDetection}>重新检测</Button>
6631
6634
  <Button className={isEnvironmentOK ?"modelButtonOk": "modelButtonNo"} type="primary" disabled={!isEnvironmentOK } danger onClick={this.handleOkEnvDetection}>确定</Button>
6632
6635
  </div>
6633
6636
  ]}>
@@ -6653,7 +6656,7 @@ class Video extends Component {
6653
6656
  </div>
6654
6657
  })
6655
6658
  }
6656
- {this.state.cameraList.length == 0 ? <p className="envClass">获取不到摄像头设备,请检查</p> : null}
6659
+ {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的摄像头权限是否开启,并重启浏览器再试</p> : null}
6657
6660
  </div>
6658
6661
  </Panel>
6659
6662
  <Panel header={<span>麦克风设备 - {this.state.envInfo.microResult} {this.state.envInfo.microResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>} key="4" className={this.state.envInfo.microResult=='不合格'? 'panel-error':''}>
@@ -6665,7 +6668,7 @@ class Video extends Component {
6665
6668
  </div>
6666
6669
  })
6667
6670
  }
6668
- {this.state.cameraList.length == 0 ? <p className="envClass">获取不到麦克风设备,请检查</p> : null}
6671
+ {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的麦克风权限是否开启,并重启浏览器再试</p> : null}
6669
6672
  </div>
6670
6673
  </Panel>
6671
6674
  <Panel header={<span>背光、曝光 - {this.state.envInfo.lightResult} {this.state.envInfo.lightResult=='合格'? <img src={IconSuccess} />: <img src={IconFail} />}</span>} key="6" className={this.state.envInfo.lightResult=='合格'? '':'panel-error'}>