react_hsbc_teller 2.0.44 → 2.0.46

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.46",
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.46'
64
64
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
65
65
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
66
66
  const { Option } = Select;
@@ -2336,9 +2336,14 @@ class Video extends Component {
2336
2336
  if (sid == this.state.publishSid) {
2337
2337
  this.saveLog('Audio and video close notification,' + code)
2338
2338
  this.roomCallBack(2, '音视频异常关闭', 8)
2339
- } else {
2339
+ } else if (sid == this.state.publishScreenSid) {
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, code=' + code);
2346
+ }
2342
2347
  }
2343
2348
  }
2344
2349
  };
@@ -2533,6 +2538,7 @@ class Video extends Component {
2533
2538
  console.log('发布媒体流成功', sid)
2534
2539
  this.state.sessionType = true
2535
2540
  if (sid == document.getElementById('video20').name) {
2541
+ this.state.publishScreenSid = document.getElementById('video20').name
2536
2542
  this.setSharedScreenState(true)
2537
2543
  this.saveLog('Share success')
2538
2544
  this.sendMessage({
@@ -2605,7 +2611,7 @@ class Video extends Component {
2605
2611
  } else {
2606
2612
  this.messageClick('投屏失败请重新投屏', 'error')
2607
2613
  this.setSharedScreenState(false)
2608
- this.saveLog('Share fail')
2614
+ this.saveLog('Share fail, code=' + err_code)
2609
2615
  }
2610
2616
 
2611
2617
  };
@@ -3362,7 +3368,7 @@ class Video extends Component {
3362
3368
  this.state.isSharedScreen = false
3363
3369
  this.state.isScreenSwitching = false
3364
3370
  this.setSharedScreenState(false)
3365
- this.saveLog('Share fail')
3371
+ this.saveLog('Share fail, code=' + code)
3366
3372
  this.setState({
3367
3373
  screenName: '共享模式'
3368
3374
  });
@@ -5510,6 +5516,7 @@ class Video extends Component {
5510
5516
  }, error => {
5511
5517
  console.log("Unable to acquire screen capture", error);
5512
5518
  console.log('取消签署')
5519
+ that.saveLog('Manual cancel share')
5513
5520
  });
5514
5521
  }
5515
5522
  publishRecorderDevice = () => {
@@ -5796,9 +5803,16 @@ class Video extends Component {
5796
5803
  networkStatus: '未知', // 网络状态 (已连接/未连接)
5797
5804
  cameraResult: this.state.cameraList.length>0 ? '合格': '不合格', // 摄像头检测
5798
5805
  microResult: this.state.microphoneList.length>0 ? '合格': '不合格', // 麦克风检测
5806
+ speakerResult: this.state.speakerList.length>0 ? '合格': '不合格',
5799
5807
  lightResult: this.state.envInfo? this.state.envInfo.lightResult : '未知'
5800
5808
  }
5801
5809
 
5810
+ // 扬声器检测
5811
+ const detectSpeaker = this.props.speakerNames instanceof Array && this.props.speakerNames.length > 0;
5812
+ if (detectSpeaker) {
5813
+ envInfo.speakerResult = (this.state.speakerList.length >0 &&
5814
+ this.props.speakerNames.find(el => (this.state.speakerList[0].actionname).includes(el)))? '合格' : '不合格';
5815
+ }
5802
5816
  if (navigator) {
5803
5817
  // 电量检测
5804
5818
  navigator.getBattery().then(function(battery) {
@@ -6506,6 +6520,7 @@ class Video extends Component {
6506
6520
  this.state.envInfo.batteryResult=='合格' &&
6507
6521
  (this.state.envInfo.cameraResult=='合格' || this.props.recordMode == 2) &&
6508
6522
  this.state.envInfo.microResult=='合格' &&
6523
+ this.state.envInfo.speakerResult=='合格' &&
6509
6524
  (this.state.envInfo.lightResult=='合格' || this.props.recordMode == 2 ) &&
6510
6525
  (this.state.ipadTag || this.props.recordMode != 2)
6511
6526
 
@@ -6808,7 +6823,7 @@ class Video extends Component {
6808
6823
  ocrHandleVisibleChange={this.ocrHandleVisibleChange}
6809
6824
  voice={this.voice}
6810
6825
  cameraClick={this.cameraClick}
6811
- sharedScreen={this.sharedScreen}
6826
+ sharedScreen={()=> {this.saveLog('Click share button');this.sharedScreen();}}
6812
6827
  endSession={this.endSession}
6813
6828
  facialRecognition={this.facialRecognition}
6814
6829
  pictureInPicture={this.pictureInPicture}
@@ -6816,7 +6831,7 @@ class Video extends Component {
6816
6831
  invitationClick={this.invitationClick}
6817
6832
  customerFaceClick={this.customerFaceClick}
6818
6833
  ocrClick={this.ocrClick}
6819
- switchExternal={this.switchExternal}
6834
+ switchExternal={()=> {this.saveLog('Click sign button');this.switchExternal();}}
6820
6835
  inspection={this.inspection}
6821
6836
  toggleAsr={this.toggleAsr}
6822
6837
  envDetection={this.showEnvDetection}
@@ -7281,6 +7296,19 @@ class Video extends Component {
7281
7296
  {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的麦克风权限是否开启,并重启浏览器再试</p> : null}
7282
7297
  </div>
7283
7298
  </Panel>
7299
+ <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':''}>
7300
+ <div>
7301
+ {
7302
+ this.state.speakerList.map((item, index) => {
7303
+ return <div key={index} className="envClass">
7304
+ {item.actionname}{'(当前设备)'}
7305
+ </div>
7306
+ })
7307
+ }
7308
+ {this.state.speakerList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的扬声器权限是否开启,并重启浏览器再试</p> : null}
7309
+ {(this.state.speakerList.length > 0 && this.state.envInfo.speakerResult=='不合格') ? <p className="envClass" style={{marginTop: '3px'}}>未使用外放扬声器,请检查电脑“设置”中的媒体设备,并刷新或重启浏览器再试</p> : null}
7310
+ </div>
7311
+ </Panel>
7284
7312
  {
7285
7313
  this.props.recordMode == 2 &&
7286
7314
  <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 +7374,7 @@ Video.defaultProps = {
7346
7374
  menus: ['BOARD', 'SHARE', 'FRIES', 'OCR', 'PAPER_OCR', 'INVITE', 'PIP', 'BEAUTY', 'GRAFFITI', 'BACKGROUND'],
7347
7375
  customLeaveRoom: '客户离开房间',
7348
7376
  sensitiveWords: ['保本保息', '无风险'],
7377
+ // speakerNames: ['扬声器'], // null或不传,则不强制使用扬声器设备;若传入有效数组,则每项代表允许的设备名称如"xxx Speaker Device",逻辑为包含,不需要全等。
7349
7378
  meetingInfo: {
7350
7379
  title: '--',
7351
7380
  host: '--',