react_hsbc_teller 2.0.43 → 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.43",
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.43'
63
+ const SDK_VERISON = '2.0.45'
64
64
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
65
65
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
66
66
  const { Option } = Select;
@@ -85,6 +85,7 @@ const POINT_TYPE = {
85
85
  const RECORD_DEVICE_NAME = 'screen-capture-recorder'
86
86
  // const RECORD_DEVICE_NAME = 'Full HD webcam'
87
87
  const IPAD_SUFFIX = '_ipad'
88
+ const H5_SUFFIX = '_h5'
88
89
  let media_status = 0
89
90
  let pictureInPictureVideo
90
91
  let mix_stream
@@ -1405,6 +1406,7 @@ class Video extends Component {
1405
1406
  let microphoneSize = 50
1406
1407
  var img = document.getElementById("icon_huatong");
1407
1408
  var img1 = document.getElementById("icon_huatong_close");
1409
+ if (!this.state.listVideoPicture[i].title.includes(IPAD_SUFFIX)) {
1408
1410
  if (this.state.listVideoPicture[i].mute) {
1409
1411
  cobj.drawImage(img1, 10, 360 * (i + 1) - 60 + baseStartHeight, microphoneSize, microphoneSize);
1410
1412
  } else {
@@ -1451,9 +1453,7 @@ class Video extends Component {
1451
1453
  // requestAnimationFrame(aou.bind(this, analyser))
1452
1454
  )
1453
1455
  }
1454
-
1455
-
1456
-
1456
+ }
1457
1457
  }
1458
1458
 
1459
1459
  // 绘制消息
@@ -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
  };
@@ -2465,7 +2470,7 @@ class Video extends Component {
2465
2470
  return newStream
2466
2471
  }
2467
2472
 
2468
- if (publish_tag == 'projectionWhiteboard' && publish_device == 2) {
2473
+ if (publish_tag == 'projectionWhiteboard' && (publish_device == 2 || publish_device == 5)) {
2469
2474
  let newStream1 = stream;
2470
2475
  if (stream.getVideoTracks()[0]) {
2471
2476
  try {
@@ -2480,7 +2485,10 @@ class Video extends Component {
2480
2485
  } else if (stream.getVideoTracks()[0].label.includes('window')){
2481
2486
  console.log('窗口共享')
2482
2487
  this.saveLog('Share type = window')
2483
- }
2488
+ } else if (stream.getVideoTracks()[0] instanceof CanvasCaptureMediaStreamTrack){
2489
+ console.log('白板共享')
2490
+ this.saveLog('Share type = whiteboard')
2491
+ }
2484
2492
  } catch (err) {
2485
2493
  console.log('不支持此浏览器记录投屏类型日志')
2486
2494
  console.log(navigator.userAgent)
@@ -2531,6 +2539,7 @@ class Video extends Component {
2531
2539
  this.state.sessionType = true
2532
2540
  if (sid == document.getElementById('video20').name) {
2533
2541
  this.setSharedScreenState(true)
2542
+ this.saveLog('Share success')
2534
2543
  this.sendMessage({
2535
2544
  'typeId': 2030,
2536
2545
  'sessionId': this.state.sessionId,
@@ -2598,9 +2607,10 @@ class Video extends Component {
2598
2607
  if (sid == document.getElementById('publish_streamId1').name) {
2599
2608
  this.state.sessionType = false
2600
2609
  this.roomCallBack(2, '发布失败', 4)
2601
- } else if (sid == document.getElementById('video20').name) {
2610
+ } else {
2602
2611
  this.messageClick('投屏失败请重新投屏', 'error')
2603
2612
  this.setSharedScreenState(false)
2613
+ this.saveLog('Share fail')
2604
2614
  }
2605
2615
 
2606
2616
  };
@@ -2729,6 +2739,12 @@ class Video extends Component {
2729
2739
  if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
2730
2740
  this.saveVideoPoint('padConnected', 'ipad已连接');
2731
2741
  }
2742
+ if (participant.includes(H5_SUFFIX)){
2743
+ this.messageClick('客户端已就绪,可进行签署', 'error')
2744
+ if (typeof this.props.h5JoinCallback === 'function'){
2745
+ this.props.h5JoinCallback()
2746
+ }
2747
+ }
2732
2748
  };
2733
2749
  // 推送“有新发布”给与会者
2734
2750
  this.test_controller.OnNewPublish = (feed) => {
@@ -2853,6 +2869,7 @@ class Video extends Component {
2853
2869
  })
2854
2870
  this.state.isSharedScreen = false
2855
2871
  this.setSharedScreenState(false)
2872
+ this.saveLog('Stop share')
2856
2873
  this.setState({
2857
2874
 
2858
2875
  screenName: '共享模式'
@@ -3328,6 +3345,7 @@ class Video extends Component {
3328
3345
  this.state.isSharedScreen = true
3329
3346
  this.state.isScreenSwitching = false
3330
3347
  this.setSharedScreenState(true)
3348
+ this.saveLog('Share changed')
3331
3349
  }
3332
3350
  }
3333
3351
  };
@@ -3349,6 +3367,7 @@ class Video extends Component {
3349
3367
  this.state.isSharedScreen = false
3350
3368
  this.state.isScreenSwitching = false
3351
3369
  this.setSharedScreenState(false)
3370
+ this.saveLog('Share fail')
3352
3371
  this.setState({
3353
3372
  screenName: '共享模式'
3354
3373
  });
@@ -5496,6 +5515,7 @@ class Video extends Component {
5496
5515
  }, error => {
5497
5516
  console.log("Unable to acquire screen capture", error);
5498
5517
  console.log('取消签署')
5518
+ that.saveLog('Manual cancel share')
5499
5519
  });
5500
5520
  }
5501
5521
  publishRecorderDevice = () => {
@@ -5782,9 +5802,16 @@ class Video extends Component {
5782
5802
  networkStatus: '未知', // 网络状态 (已连接/未连接)
5783
5803
  cameraResult: this.state.cameraList.length>0 ? '合格': '不合格', // 摄像头检测
5784
5804
  microResult: this.state.microphoneList.length>0 ? '合格': '不合格', // 麦克风检测
5805
+ speakerResult: this.state.speakerList.length>0 ? '合格': '不合格',
5785
5806
  lightResult: this.state.envInfo? this.state.envInfo.lightResult : '未知'
5786
5807
  }
5787
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
+ }
5788
5815
  if (navigator) {
5789
5816
  // 电量检测
5790
5817
  navigator.getBattery().then(function(battery) {
@@ -6492,6 +6519,7 @@ class Video extends Component {
6492
6519
  this.state.envInfo.batteryResult=='合格' &&
6493
6520
  (this.state.envInfo.cameraResult=='合格' || this.props.recordMode == 2) &&
6494
6521
  this.state.envInfo.microResult=='合格' &&
6522
+ this.state.envInfo.speakerResult=='合格' &&
6495
6523
  (this.state.envInfo.lightResult=='合格' || this.props.recordMode == 2 ) &&
6496
6524
  (this.state.ipadTag || this.props.recordMode != 2)
6497
6525
 
@@ -6754,6 +6782,7 @@ class Video extends Component {
6754
6782
  <label style={{ display: 'none' }} id={'feedId'+(item.idIndex)} type="text" />
6755
6783
 
6756
6784
  <div onClick={this.muteOpposite.bind(this, 'video'+(item.idIndex))} style={{ display: (item.videoName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
6785
+ { item.videoName.includes(IPAD_SUFFIX) ? <span style={{paddingLeft: '8px'}}> </span>:<>
6757
6786
  {
6758
6787
  item.mute && <img
6759
6788
  alt=""
@@ -6762,7 +6791,7 @@ class Video extends Component {
6762
6791
  />
6763
6792
  }
6764
6793
  <canvas style={{ display: (item.videoName && !item.mute) ? '' : 'none',width: '25px',height:'25px',marginTop: '4px' }} className="canvasClassOne" id={"subscribe_volumeView"+(item.idIndex)} width="40" height="70"></canvas>
6765
-
6794
+ </>}
6766
6795
  <div className='titleName' style={{ color: this.props.titleColor,fontSize: this.props.fontSize + 'px',fontFamily : this.props.fontFamily}}>
6767
6796
  {item.videoName}
6768
6797
  </div>
@@ -6793,7 +6822,7 @@ class Video extends Component {
6793
6822
  ocrHandleVisibleChange={this.ocrHandleVisibleChange}
6794
6823
  voice={this.voice}
6795
6824
  cameraClick={this.cameraClick}
6796
- sharedScreen={this.sharedScreen}
6825
+ sharedScreen={()=> {this.saveLog('Click share button');this.sharedScreen();}}
6797
6826
  endSession={this.endSession}
6798
6827
  facialRecognition={this.facialRecognition}
6799
6828
  pictureInPicture={this.pictureInPicture}
@@ -6801,7 +6830,7 @@ class Video extends Component {
6801
6830
  invitationClick={this.invitationClick}
6802
6831
  customerFaceClick={this.customerFaceClick}
6803
6832
  ocrClick={this.ocrClick}
6804
- switchExternal={this.switchExternal}
6833
+ switchExternal={()=> {this.saveLog('Click sign button');this.switchExternal();}}
6805
6834
  inspection={this.inspection}
6806
6835
  toggleAsr={this.toggleAsr}
6807
6836
  envDetection={this.showEnvDetection}
@@ -7266,6 +7295,19 @@ class Video extends Component {
7266
7295
  {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的麦克风权限是否开启,并重启浏览器再试</p> : null}
7267
7296
  </div>
7268
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>
7269
7311
  {
7270
7312
  this.props.recordMode == 2 &&
7271
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'}>
@@ -7331,6 +7373,7 @@ Video.defaultProps = {
7331
7373
  menus: ['BOARD', 'SHARE', 'FRIES', 'OCR', 'PAPER_OCR', 'INVITE', 'PIP', 'BEAUTY', 'GRAFFITI', 'BACKGROUND'],
7332
7374
  customLeaveRoom: '客户离开房间',
7333
7375
  sensitiveWords: ['保本保息', '无风险'],
7376
+ // speakerNames: ['扬声器'], // null或不传,则不强制使用扬声器设备;若传入有效数组,则每项代表允许的设备名称如"xxx Speaker Device",逻辑为包含,不需要全等。
7334
7377
  meetingInfo: {
7335
7378
  title: '--',
7336
7379
  host: '--',