react_hsbc_teller 2.0.44 → 2.0.45

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.44",
3
+ "version": "2.0.45",
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.44'
63
+ const SDK_VERISON = '2.0.45'
64
64
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
65
65
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
66
66
  const { Option } = Select;
@@ -2339,6 +2339,11 @@ class Video extends Component {
2339
2339
  } else {
2340
2340
  this.state.isScreenSwitching = false
2341
2341
  this.setSharedScreenState(false)
2342
+ if (code == 5012) {
2343
+ this.saveLog('Manual cancel share'); // 点了取消,拒绝系统授权
2344
+ } else {
2345
+ this.saveLog('System error stop share');
2346
+ }
2342
2347
  }
2343
2348
  }
2344
2349
  };
@@ -5510,6 +5515,7 @@ class Video extends Component {
5510
5515
  }, error => {
5511
5516
  console.log("Unable to acquire screen capture", error);
5512
5517
  console.log('取消签署')
5518
+ that.saveLog('Manual cancel share')
5513
5519
  });
5514
5520
  }
5515
5521
  publishRecorderDevice = () => {
@@ -5796,9 +5802,16 @@ class Video extends Component {
5796
5802
  networkStatus: '未知', // 网络状态 (已连接/未连接)
5797
5803
  cameraResult: this.state.cameraList.length>0 ? '合格': '不合格', // 摄像头检测
5798
5804
  microResult: this.state.microphoneList.length>0 ? '合格': '不合格', // 麦克风检测
5805
+ speakerResult: this.state.speakerList.length>0 ? '合格': '不合格',
5799
5806
  lightResult: this.state.envInfo? this.state.envInfo.lightResult : '未知'
5800
5807
  }
5801
5808
 
5809
+ // 扬声器检测
5810
+ const detectSpeaker = this.props.speakerNames instanceof Array && this.props.speakerNames.length > 0;
5811
+ if (detectSpeaker) {
5812
+ envInfo.speakerResult = (this.state.speakerList.length >0 &&
5813
+ this.props.speakerNames.find(el => (this.state.speakerList[0].actionname).includes(el)))? '合格' : '不合格';
5814
+ }
5802
5815
  if (navigator) {
5803
5816
  // 电量检测
5804
5817
  navigator.getBattery().then(function(battery) {
@@ -6506,6 +6519,7 @@ class Video extends Component {
6506
6519
  this.state.envInfo.batteryResult=='合格' &&
6507
6520
  (this.state.envInfo.cameraResult=='合格' || this.props.recordMode == 2) &&
6508
6521
  this.state.envInfo.microResult=='合格' &&
6522
+ this.state.envInfo.speakerResult=='合格' &&
6509
6523
  (this.state.envInfo.lightResult=='合格' || this.props.recordMode == 2 ) &&
6510
6524
  (this.state.ipadTag || this.props.recordMode != 2)
6511
6525
 
@@ -6808,7 +6822,7 @@ class Video extends Component {
6808
6822
  ocrHandleVisibleChange={this.ocrHandleVisibleChange}
6809
6823
  voice={this.voice}
6810
6824
  cameraClick={this.cameraClick}
6811
- sharedScreen={this.sharedScreen}
6825
+ sharedScreen={()=> {this.saveLog('Click share button');this.sharedScreen();}}
6812
6826
  endSession={this.endSession}
6813
6827
  facialRecognition={this.facialRecognition}
6814
6828
  pictureInPicture={this.pictureInPicture}
@@ -6816,7 +6830,7 @@ class Video extends Component {
6816
6830
  invitationClick={this.invitationClick}
6817
6831
  customerFaceClick={this.customerFaceClick}
6818
6832
  ocrClick={this.ocrClick}
6819
- switchExternal={this.switchExternal}
6833
+ switchExternal={()=> {this.saveLog('Click sign button');this.switchExternal();}}
6820
6834
  inspection={this.inspection}
6821
6835
  toggleAsr={this.toggleAsr}
6822
6836
  envDetection={this.showEnvDetection}
@@ -7281,6 +7295,19 @@ class Video extends Component {
7281
7295
  {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的麦克风权限是否开启,并重启浏览器再试</p> : null}
7282
7296
  </div>
7283
7297
  </Panel>
7298
+ <Panel header={<span>扬声器设备 - {this.state.envInfo.speakerResult} {this.state.envInfo.speakerResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>} key="4" className={this.state.envInfo.speakerResult=='不合格'? 'panel-error':''}>
7299
+ <div>
7300
+ {
7301
+ this.state.speakerList.map((item, index) => {
7302
+ return <div key={index} className="envClass">
7303
+ {item.actionname}{'(当前设备)'}
7304
+ </div>
7305
+ })
7306
+ }
7307
+ {this.state.speakerList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的扬声器权限是否开启,并重启浏览器再试</p> : null}
7308
+ {(this.state.speakerList.length > 0 && this.state.envInfo.speakerResult=='不合格') ? <p className="envClass" style={{marginTop: '3px'}}>未使用外放扬声器,请检查电脑“设置”中的媒体设备,并刷新或重启浏览器再试</p> : null}
7309
+ </div>
7310
+ </Panel>
7284
7311
  {
7285
7312
  this.props.recordMode == 2 &&
7286
7313
  <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'}>
@@ -7346,6 +7373,7 @@ Video.defaultProps = {
7346
7373
  menus: ['BOARD', 'SHARE', 'FRIES', 'OCR', 'PAPER_OCR', 'INVITE', 'PIP', 'BEAUTY', 'GRAFFITI', 'BACKGROUND'],
7347
7374
  customLeaveRoom: '客户离开房间',
7348
7375
  sensitiveWords: ['保本保息', '无风险'],
7376
+ // speakerNames: ['扬声器'], // null或不传,则不强制使用扬声器设备;若传入有效数组,则每项代表允许的设备名称如"xxx Speaker Device",逻辑为包含,不需要全等。
7349
7377
  meetingInfo: {
7350
7378
  title: '--',
7351
7379
  host: '--',