react_hsbc_teller 2.0.24 → 2.0.25

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.
Files changed (26) hide show
  1. package/lib/hsbc.js +1 -1
  2. package/package.json +1 -1
  3. package/packages/api/api.js +91 -0
  4. package/packages/assets/mp3/ipad_leave_error.mp3 +0 -0
  5. package/packages/assets/mp3/ipad_low_power.mp3 +0 -0
  6. package/packages/demo/demo.js +2 -0
  7. package/packages/pages/foot/foot.jsx +2 -2
  8. package/packages/pages/multiModule/components/copy/agree.jsx +115 -0
  9. package/packages/pages/multiModule/components/copy/agree.less +105 -0
  10. package/packages/pages/multiModule/components/copy/copyTwo.jsx +663 -0
  11. package/packages/pages/multiModule/components/copy/copyTwo.less +180 -0
  12. package/packages/pages/multiModule/components/copy/copy_en.jsx +365 -0
  13. package/packages/pages/multiModule/components/copy/copy_en.less +145 -0
  14. package/packages/pages/multiModule/components/copy/copylist.jsx +291 -0
  15. package/packages/pages/multiModule/components/copy/copylist.less +83 -0
  16. package/packages/pages/multiModule/components/copy/risk.jsx +294 -0
  17. package/packages/pages/multiModule/components/copy/risk.less +123 -0
  18. package/packages/pages/multiModule/components/sign/signMy.jsx +306 -0
  19. package/packages/pages/multiModule/components/sign/signMy.less +128 -0
  20. package/packages/pages/multiModule/components/subscribe/subscribe.jsx +113 -0
  21. package/packages/pages/multiModule/components/subscribe/subscribe.less +82 -0
  22. package/packages/pages/multiModule/multiModule.jsx +26 -0
  23. package/packages/pages/multiModule/multiModule.less +20 -0
  24. package/packages/pages/video/video.jsx +388 -148
  25. package/packages/utils/asrController.js +242 -0
  26. package/packages/utils/recorder.js +289 -0
@@ -7,6 +7,8 @@ import API from '../../api/api';
7
7
  import { BoardOperate } from '../../common/index.esm.js';
8
8
  import './video.less'
9
9
  import { compressImage, isLight } from '../../utils/utils'
10
+ import Recorder from "../../utils/recorder";
11
+ import MyAsrController from '../../utils/asrController'
10
12
  import Header from '../header/header.jsx'
11
13
  import Foot from '../foot/foot.jsx'
12
14
  import IconSuccess from '../../assets/img/icon_success.jpg'
@@ -20,6 +22,8 @@ import ocrImage from '../../assets/img/jietu.png'
20
22
  import faceImage from '../../assets/img/jietu_face.png'
21
23
  import autod from '../../assets/mp3/joinmeeting.mp3'
22
24
  import recordErrorAudio from '../../assets/mp3/record_error.mp3'
25
+ import IpadLeaveAudio from '../../assets/mp3/ipad_leave_error.mp3';
26
+ import IpadLowPowerAudio from '../../assets/mp3/ipad_low_power.mp3';
23
27
  import internalJoin from '../../assets/mp3/internalJoin.mp3'
24
28
  import internalLeft from '../../assets/mp3/internalLeft.mp3'
25
29
  import leftMetting from '../../assets/mp3/leftmeeting.mp3'
@@ -50,10 +54,11 @@ import styled from 'styled-components';
50
54
  import { Button } from '../../../node_modules/antd/lib/index';
51
55
  import SignMy from '../sign/signMy.jsx'
52
56
  import Step from '../components/step/step.jsx'
57
+ import MultiModule from '../multiModule/multiModule'//签字、抄录
53
58
  import axios from 'axios';
54
59
  import CryptoJS from "crypto-js";
55
60
 
56
- const SDK_VERISON = '2.0.24'
61
+ const SDK_VERISON = '2.0.25'
57
62
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
58
63
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
59
64
  const { Option } = Select;
@@ -75,6 +80,7 @@ const POINT_TYPE = {
75
80
  }
76
81
  const RECORD_DEVICE_NAME = 'screen-capture-recorder'
77
82
  // const RECORD_DEVICE_NAME = 'Full HD webcam'
83
+ const IPAD_SUFFIX = '_ipad'
78
84
  let media_status = 0
79
85
  let pictureInPictureVideo
80
86
  let mix_stream
@@ -370,6 +376,7 @@ class Video extends Component {
370
376
  console.log(result);
371
377
  this.state.imRoomId = result.imRoomId,
372
378
  this.state.sessionId = result.sessionId;
379
+ window.imRoom.sessionId = result.sessionId;
373
380
 
374
381
  let publish_config = {}
375
382
  publish_config.media_type = 1
@@ -383,6 +390,11 @@ class Video extends Component {
383
390
  publish_config.publish_video_id = 'publish_video1'
384
391
  publish_config.publish_streamId_id = 'publish_streamId1'
385
392
  publish_config.publish_tag = 'tag1'
393
+ if (this.props.recordMode == 2) {
394
+ // 分行模式,只收音 不发布摄像头
395
+ publish_config.media_type = 2
396
+ // publish_config.publish_streamId_id = 'publish_video1'
397
+ }
386
398
  this.test_controller.Publish(publish_config)
387
399
 
388
400
  // this.publishAllScreen();
@@ -477,9 +489,16 @@ class Video extends Component {
477
489
  // let result = await API.mpaasSig({account: data.account, type: data.type});
478
490
  console.log('mpaasSig', result, result.mpsSig);
479
491
  window.sessionStorage.setItem('alimpassSig', result.mpsSig);
480
- this.state.workSpaceId = result.workspaceId,
481
- this.state.appId = result.appId,
492
+ this.state.workSpaceId = result.workspaceId
493
+ this.state.appId = result.appId
482
494
  this.state.bizName = result.bizName
495
+
496
+ //asr初始化
497
+ this.state.asrAppKey = this.props.asrAppKey || result.asrAppKey
498
+ this.state.asrServerUrl = this.props.asrServerUrl || result.asrServerUrl
499
+ this.state.asrToken = this.props.asrToken || result.asrToken
500
+ this.initAsrRecorder()
501
+
483
502
  window.sessionStorage.setItem('sigData', JSON.stringify(result));
484
503
  if (data.sigType == 1) {
485
504
  this.handleEdit()
@@ -735,6 +754,47 @@ class Video extends Component {
735
754
  })
736
755
 
737
756
  };
757
+ // 开启ipad录制
758
+ enableIpadRecording = (record_business_id) => {
759
+ const that = this
760
+ const filePath = 'recordId_' + new Date().valueOf() + '_ipad';
761
+ const recordParam = {};
762
+ recordParam.width = 1280;
763
+ recordParam.height = 720;
764
+ recordParam.recordTotalStream = 0;
765
+ recordParam.startTimeout = 10;
766
+ recordParam.splitType = 0;
767
+ recordParam.endType = 1;
768
+ recordParam.crf = 26
769
+ recordParam.overlaps = [
770
+ {
771
+ tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
772
+ type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
773
+ id: 2, // ⽔印 ID
774
+ enable: true,
775
+ xPosition: 640, // x 轴位置
776
+ yPosition: 10, // y 轴位置
777
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
778
+ fontSize: 16, // 字体⼤⼩
779
+ url: '' // ⽔印图⽚ HTTP 地址
780
+ },
781
+ {
782
+ tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
783
+ type: 1, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
784
+ id: 1, // ⽔印 ID
785
+ enable: true,
786
+ xPosition: 1080, // x 轴位置
787
+ yPosition: 10, // y 轴位置
788
+ text: '', // ⽔印⽂字
789
+ fontSize: 16, // 字体⼤⼩
790
+ url: '' // ⽔印图⽚ HTTP 地址
791
+ },
792
+ ];
793
+ recordParam.tagPositions = []
794
+ recordParam.tagFilter = that.state.ipadTag
795
+ console.log('recordParam', recordParam);
796
+ that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id+'_ipad')
797
+ };
738
798
  // 结束会话
739
799
  endSession = value => {
740
800
  if (value == 'customerHangUp') {
@@ -1401,7 +1461,7 @@ class Video extends Component {
1401
1461
  })
1402
1462
  this.loopPlay = () => {
1403
1463
  console.log('loopPlay status', this.state.isPictureInPicture);
1404
- if(!this.state.isPictureInPicture && document.getElementById("publish_video1")){
1464
+ if(!this.state.isPictureInPicture && document.getElementById("publish_streamId1")){
1405
1465
  let audio = new Audio(PIPictureClosedAudio)
1406
1466
  audio.play()
1407
1467
  setTimeout(this.loopPlay, 3000);
@@ -1551,6 +1611,23 @@ class Video extends Component {
1551
1611
  this.messageClick(TITLE+'当前网络较弱', 'error')
1552
1612
  // this.saveVideoPoint('wnd', '客户端弱网');
1553
1613
  }
1614
+ else if (Mival.typeId == 5004) { // ipad低电量
1615
+ this.messageClick('IPAD电量过低', 'error')
1616
+
1617
+ this.setState({
1618
+ ipadLowPowerErrorModalVisible: true,
1619
+ })
1620
+ // 循环播放ipad低电量
1621
+ clearTimeout(this.ipadLowPowerPlay)
1622
+ this.ipadLowPowerPlay = () => {
1623
+ if(this.state.ipadLowPowerErrorModalVisible){
1624
+ let audio = new Audio(IpadLowPowerAudio)
1625
+ audio.play()
1626
+ setTimeout(this.ipadLowPowerPlay, 3000);
1627
+ }
1628
+ }
1629
+ setTimeout(this.ipadLowPowerPlay, 0);
1630
+ }
1554
1631
  else if (Mival.typeId == 1220) {
1555
1632
  // 一炒多的图片 1214
1556
1633
  if (Mival.sessionId == this.state.sessionId) {
@@ -1632,6 +1709,24 @@ class Video extends Component {
1632
1709
  this.pictureInPicture('Refresh')
1633
1710
  }
1634
1711
  }
1712
+ } else if (Mival.typeId == 1214) {
1713
+ if (Mival.sessionId == this.state.sessionId) {
1714
+ this.setState({
1715
+ moduleData: Mival,
1716
+ isBackdrop: false
1717
+ }, ()=>{
1718
+ this.showModal('copy')
1719
+ })
1720
+ }
1721
+ } else if (Mival.typeId == 1213) {
1722
+ if (Mival.sessionId == this.state.sessionId) {
1723
+ this.setState({
1724
+ moduleData: Mival,
1725
+ isBackdrop: false
1726
+ }, ()=>{
1727
+ this.showModal('subscribe')
1728
+ })
1729
+ }
1635
1730
  } else if (Mival.typeId == 121305) {
1636
1731
  if (Mival.sessionId == this.state.sessionId) {
1637
1732
  this.saveLog('signatureCallback fail, typeId=121305, ')
@@ -1734,21 +1829,28 @@ class Video extends Component {
1734
1829
  this.state.businessId = Mival.id;
1735
1830
  this.saveLog('Start business recording')
1736
1831
  this.enableServerRecording( Mival.id)
1832
+ if (this.state.ipadTag) this.enableIpadRecording(Mival.id)
1737
1833
 
1738
- if (this.props.whetherDetectFace){
1834
+ if (this.props.whetherDetectFace && this.props.recordMode != 2){
1739
1835
  this.startFaceDetection();
1740
1836
  }
1741
- if (this.props.whetherDetectLight){
1837
+ if (this.props.whetherDetectLight && this.props.recordMode != 2){
1742
1838
  this.startImageDetection();
1743
1839
  }
1840
+ if (this.props.whetherNeedAsr) {
1841
+ this.startASR();
1842
+ }
1744
1843
  } else if (Mival.status == 2) {
1745
1844
  // 关闭了业务录制
1746
1845
  console.log('业务录制关闭', this.state.businessRecordId)
1747
1846
  this.saveLog('Stop business recording')
1748
1847
  this.test_controller.StopRemoteRecord(this.state.businessRecordId)
1848
+ if (this.state.ipadRecordId) this.test_controller.StopRemoteRecord(this.state.ipadRecordId)
1849
+
1749
1850
  this.state.businessId = '';
1750
1851
  clearInterval(this.state.faceDetectionTimer);
1751
1852
  clearInterval(this.state.imageDetectionTimer);
1853
+ if(this.state.isAsrStart) this.stopASR();
1752
1854
  }
1753
1855
  } else if (Mival.typeId == 2002 && this.state.sessionId == Mival.sessionId) {
1754
1856
  // 会议到时间
@@ -2095,7 +2197,7 @@ class Video extends Component {
2095
2197
  this.test_controller.OnMediaClose = (code, sid) => {
2096
2198
  console.log(code, sid)
2097
2199
  if (code == 5003 || code == 5004 || code == 5005 || code == 5007 || code == 5009 || code == 5010 || code == 5011 || code == 5012) {
2098
- if (sid == document.getElementById('publish_video1').name) {
2200
+ if (sid == document.getElementById('publish_streamId1').name) {
2099
2201
  this.saveLog('Audio and video close notification,' + code)
2100
2202
  this.roomCallBack(2, '音视频异常关闭', 8)
2101
2203
  } else {
@@ -2119,6 +2221,11 @@ class Video extends Component {
2119
2221
  publish_config.publish_video_id = 'publish_video1'
2120
2222
  publish_config.publish_streamId_id = 'publish_streamId1'
2121
2223
  publish_config.publish_tag = 'tag1'
2224
+ if (this.props.recordMode == 2) {
2225
+ // 分行模式,只收音 不发布摄像头
2226
+ publish_config.media_type = 2
2227
+ // publish_config.publish_streamId_id = 'publish_video1'
2228
+ }
2122
2229
  this.test_controller.Publish(publish_config)
2123
2230
 
2124
2231
  // this.publishAllScreen();
@@ -2294,7 +2401,7 @@ class Video extends Component {
2294
2401
  this.state.isScreenSwitching = false
2295
2402
  }
2296
2403
  }
2297
- if (sid == document.getElementById('publish_video1').name) {
2404
+ if (sid == document.getElementById('publish_streamId1').name) {
2298
2405
 
2299
2406
  this.setState({
2300
2407
 
@@ -2323,7 +2430,7 @@ class Video extends Component {
2323
2430
  },
2324
2431
  1000
2325
2432
  );
2326
- this.mediaInfo = this.generateMediaInfo(document.getElementById("publish_video1").name);
2433
+ this.mediaInfo = this.generateMediaInfo(document.getElementById("publish_streamId1").name);
2327
2434
 
2328
2435
  } else {
2329
2436
  var box = document.getElementById("whiteboardDIV");
@@ -2346,7 +2453,7 @@ class Video extends Component {
2346
2453
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
2347
2454
  this.saveLog('mrtc OnPublishFailed 发布失败, code=' + err_code)
2348
2455
  console.log('Publishing media stream failed,', sid, err_code, err_msg)
2349
- if (sid == document.getElementById('publish_video1').name) {
2456
+ if (sid == document.getElementById('publish_streamId1').name) {
2350
2457
  this.state.sessionType = false
2351
2458
  this.roomCallBack(2, '发布失败', 4)
2352
2459
  } else {
@@ -2569,6 +2676,11 @@ class Video extends Component {
2569
2676
  }
2570
2677
 
2571
2678
  }
2679
+
2680
+ // 记录ipad摄像头流,需要单独开启录制
2681
+ if (feed.mediaSource == 'VIDEO_SOURCE_CAMERA' && feed.uid.includes(IPAD_SUFFIX)) {
2682
+ this.state.ipadTag = feed.tag;
2683
+ }
2572
2684
  };
2573
2685
  // 推送“有新订阅”给与会者
2574
2686
  this.test_controller.OnNewSubscribe = (subscriber, feed) => {
@@ -2576,8 +2688,8 @@ class Video extends Component {
2576
2688
  };
2577
2689
  // 取消发布成功
2578
2690
  this.test_controller.OnUnPublishSucc = (sid) => {
2579
- console.log('取消发布成功', sid, document.getElementById('publish_video1').name)
2580
- if (document.getElementById('publish_video1').name && sid != document.getElementById('publish_video1').name) {
2691
+ console.log('取消发布成功', sid, document.getElementById('publish_streamId1').name)
2692
+ if (document.getElementById('publish_streamId1').name && sid != document.getElementById('publish_streamId1').name) {
2581
2693
  this.sendMessage({
2582
2694
  'typeId': 2030,
2583
2695
  'sessionId': this.state.sessionId,
@@ -2595,7 +2707,7 @@ class Video extends Component {
2595
2707
  // }
2596
2708
 
2597
2709
  }
2598
- if (sid == document.getElementById('publish_video1').name || !document.getElementById('publish_video1').name) {
2710
+ if (sid == document.getElementById('publish_streamId1').name || !document.getElementById('publish_streamId1').name) {
2599
2711
  clearStreamRemain()
2600
2712
  }
2601
2713
  };
@@ -2685,6 +2797,27 @@ class Video extends Component {
2685
2797
  console.log('过滤掉的uid', participant)
2686
2798
  return
2687
2799
  }
2800
+
2801
+ if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
2802
+ // ipad单独处理,不需要加入和退出的提示。但双录过程中ipad如果离开,要提示+循环播报直到ipad重新入会
2803
+ console.log('ipad退出房间', participant)
2804
+
2805
+ this.setState({
2806
+ IpadLeaveErrorModalVisible: true,
2807
+ ipadTag: '',
2808
+ })
2809
+ // 循环播放录制中断语音
2810
+ clearTimeout(this.ipadLeavePlay)
2811
+ this.ipadLeavePlay = () => {
2812
+ if(!this.state.ipadTag && document.getElementById("publish_streamId1")){
2813
+ let audio = new Audio(IpadLeaveAudio)
2814
+ audio.play()
2815
+ setTimeout(this.ipadLeavePlay, 3000);
2816
+ }
2817
+ }
2818
+ setTimeout(this.ipadLeavePlay, 0);
2819
+ return
2820
+ }
2688
2821
 
2689
2822
 
2690
2823
  this.appGetUsernameClick(participant).then((res) => {
@@ -2723,7 +2856,7 @@ class Video extends Component {
2723
2856
  // 弱网回调
2724
2857
  this.test_controller.OnNetworkWeak = (bpsSend, bpsRecv, sid) => {
2725
2858
  console.log('弱网回调', bpsSend, bpsRecv, sid)
2726
- if (sid == document.getElementById('publish_video1').name) {
2859
+ if (sid == document.getElementById('publish_streamId1').name) {
2727
2860
 
2728
2861
  this.detectNetworkWeak().then((isWeak) => {
2729
2862
  console.log('弱网结果:' + isWeak)
@@ -2756,6 +2889,11 @@ class Video extends Component {
2756
2889
  this.state.recordId = record_id
2757
2890
  this.videoRecordCallback('1', true)
2758
2891
  this.saveLog('mrtc OnStartRemoteRecordSucc')
2892
+ } else if (String(record_third_id).includes('_ipad')){
2893
+ this.state.ipadRecordId = record_id
2894
+ const busId = Number(record_third_id.split('_')[0])
2895
+ this.ipadRecordCallback('1', true, busId)
2896
+ this.saveLog('mrtc OnStartIpadRecordSucc')
2759
2897
  } else {
2760
2898
  // 业务录制
2761
2899
  this.state.businessRecordId = record_id
@@ -2780,6 +2918,10 @@ class Video extends Component {
2780
2918
  if (!record_third_id) {
2781
2919
  this.videoRecordCallback('1', false)
2782
2920
  this.saveLog('mrtc OnStartRemoteRecordFailed, code='+err_code)
2921
+ } else if (String(record_third_id).includes('_ipad')){
2922
+ const busId = Number(record_third_id.split('_')[0])
2923
+ this.ipadRecordCallback('1', false, busId)
2924
+ this.saveLog('mrtc OnStartIpadRecordFailed, code='+err_code)
2783
2925
  } else {
2784
2926
  this.businessRecordCallback('1', false, record_third_id)
2785
2927
  this.saveLog('mrtc OnStartRemoteBusinessRecordFailed, code='+err_code + ',businessId=' + record_third_id)
@@ -2796,6 +2938,11 @@ class Video extends Component {
2796
2938
  this.videoRecordCallback('2', true)
2797
2939
  this.saveLog('mrtc OnStopRemoteRecordSucc, recordId='+recordId)
2798
2940
  this.state.recordId = '';
2941
+ } else if (String(record_third_id).includes('_ipad')){
2942
+ const busId = Number(record_third_id.split('_')[0])
2943
+ this.ipadRecordCallback('2', true, busId)
2944
+ this.saveLog('mrtc OnStopIpadRecordSucc, recordId='+recordId)
2945
+ this.state.ipadRecordId = '';
2799
2946
  } else {
2800
2947
  this.businessRecordCallback('2', true, record_third_id)
2801
2948
  this.saveLog('mrtc OnStopRemoteBusinessRecordSucc, recordId='+recordId + ',businessId=' + record_third_id)
@@ -2818,6 +2965,10 @@ class Video extends Component {
2818
2965
  if (!record_third_id) {
2819
2966
  this.videoRecordCallback('2', false)
2820
2967
  this.saveLog('mrtc OnStopRemoteRecordFailed, err_code='+err_code)
2968
+ } else if (String(record_third_id).includes('_ipad')){
2969
+ const busId = Number(record_third_id.split('_')[0])
2970
+ this.ipadRecordCallback('2', false, busId)
2971
+ this.saveLog('mrtc OnStopIpadRecordFailed, err_code='+err_code)
2821
2972
  } else {
2822
2973
  this.businessRecordCallback('2', false, record_third_id)
2823
2974
  this.saveLog('mrtc OnStopRemoteBusinessRecordFailed, err_code='+err_code+',businessId=' + record_third_id)
@@ -2900,7 +3051,7 @@ class Video extends Component {
2900
3051
  clearTimeout(this.recordLoopPlay)
2901
3052
  this.recordLoopPlay = () => {
2902
3053
  console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
2903
- if(!this.state.businessRecordId && document.getElementById("publish_video1")){
3054
+ if(!this.state.businessRecordId && document.getElementById("publish_streamId1")){
2904
3055
  let audio = new Audio(recordErrorAudio)
2905
3056
  audio.play()
2906
3057
  setTimeout(this.recordLoopPlay, 3000);
@@ -3127,7 +3278,7 @@ class Video extends Component {
3127
3278
  let startX = x2 // 绘制起始点x
3128
3279
  let startY = y1 - height // 绘制起始点y
3129
3280
  ctx.fillRect(startX, startY, width, height)
3130
- if (document.getElementById('publish_video1').name == sid && i == 39) {
3281
+ if (document.getElementById('publish_streamId1').name == sid && i == 39) {
3131
3282
  this.state.analyserHeight.set(sid, number / 40 / 70)
3132
3283
  this.state.analyserHeight = this.state.analyserHeight
3133
3284
  }
@@ -3173,128 +3324,24 @@ class Video extends Component {
3173
3324
 
3174
3325
 
3175
3326
  };
3176
-
3177
- const that = this;
3178
- this.asr_controller.OnGetSign = function(bizName, subBiz, uid) {
3179
- return 'signature'
3180
- }
3181
- // 连接成功回调
3182
- this.asr_controller.OnAsrConnectOK = function() {
3183
- // 需要状态控制
3184
- if (media_status == 1) {
3185
- return
3186
- }
3187
-
3188
- const config_param = {}
3189
- const biz_name = 'demo'
3190
- const sub_biz = 'default'
3191
- const uid = that.props.tellerAccount
3192
- const sampleRate = 16000
3193
- const procType = 8
3194
- config_param.bizName = biz_name
3195
- config_param.subBiz = sub_biz
3196
- config_param.uid = uid
3197
- config_param.sampleRate = sampleRate
3198
- config_param.procType = procType
3199
- config_param.mediaStreamType = 2 // 1:麦克风;2:传stream
3200
- // console.log(test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_)
3201
- config_param.audio_ = that.test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_
3202
- config_param.idleTime = 6 // 12s没有识别结果返回通知上层
3203
- config_param.tag = 'asr_tag0'
3204
- that.asr_sid = that.asr_controller.TurnOnMicrophone(config_param, config_param.audio_)
3205
- }
3206
- // 初始化成功
3207
- this.asr_controller.OnInitOk = function(sid, tag) {
3208
- console.log('OnInitOk:')
3209
- media_status = 1
3210
- }
3211
-
3212
- // 初始化失败
3213
- this.asr_controller.OnInitError = function(sid, code, msg, tag) {
3214
- console.log('OnInitError:' + msg)
3215
- that.asr_sid = ''
3216
- }
3217
-
3218
- // 识别结果
3219
- this.asr_controller.OnAsrMessage = function(msg, sid, tag, status) {
3220
- that.asr_controller.trace(`OnAsrMessage sid=${sid},status=${status},tag=${tag}`)
3221
- const parse = JSON.parse(msg)
3222
- const resultValue = parse.value
3223
- const sentence_id = parse.sentence_id
3224
- // sentence_id相同,取最后一个值
3225
- let text = resultValue || ''
3226
- const sensitiveArr = that.props.sensitiveWords
3227
- // const regex = new RegExp(sensitiveArr.join('|'), 'g') // /\#{(.+?)\}/g;
3228
- // text = text.replace(regex, function(r) { return '<span style="background: red;">' + r + '</span>' })
3229
- let matchArr = sensitiveArr.filter(el => text.includes(el));
3230
- if (matchArr.length>0) {
3231
- matchArr.forEach(el => {
3232
- that.messageClick('检测到敏感词:' + matchArr, 'error')
3233
- that.state.sensitiveTitle = '检测到敏感词:' + matchArr
3234
- clearTimeout(that.state.sensitiveTitleTimer)
3235
- that.state.sensitiveTitleTimer = setTimeout(() => {
3236
- that.state.sensitiveTitle = ''
3237
- }, 3000);
3238
- if (!that.state.sensitiveRecordMap[sentence_id] || !that.state.sensitiveRecordMap[sentence_id].includes(el)){
3239
- API.addSensitiveRecord({
3240
- tellerId: that.props.tellerAccount,
3241
- sessionId: that.state.sessionId,
3242
- sensitiveWord: el
3243
- });
3244
- if (!that.state.sensitiveRecordMap[sentence_id]) {
3245
- that.state.sensitiveRecordMap[sentence_id] = []
3246
- }
3247
- that.state.sensitiveRecordMap[sentence_id].push(el)
3248
- }
3249
- })
3250
- }
3251
- // that.AsrResultText = text
3252
- }
3253
-
3254
- // 停止录音回调
3255
- this.asr_controller.OnTurnOffMicrophoneOK = function(sid, tag) {
3256
- media_status = 0
3257
- that.asr_controller.Disconnect()
3258
- }
3259
- this.asr_controller.OnAsrMsgIdle = function(sid, tag) {
3260
- // that.AsrResultText = ''
3261
- that.asr_controller.trace('OnAsrMsgIdle')
3262
- }
3263
- this.asr_controller.OnAsrDisconnectOK = function() {
3264
- that.asr_controller.trace('Disconnect is success')
3265
- }
3266
-
3327
+
3328
+
3267
3329
  }
3268
3330
  startASR() {
3269
3331
  // const publish_sid = document.getElementById('publish_video1').name
3270
3332
 
3271
- if (media_status == 1) {
3272
- return
3273
- }
3274
- this.asr_controller.Connect(this.props.asrServerUrl)
3275
- message.success({
3276
- content: '敏感词检测已开启',
3277
- icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
3278
- className: 'successClassName',
3279
- top: 200,
3280
- // duration: 10
3281
- })
3282
- this.state.isAsrStart = true
3283
- this.state.sensitiveRecordMap = {}
3284
- // this.AsrResultText = ''
3333
+ // if (media_status == 1) {
3334
+ // return
3335
+ // }
3336
+ this.asr_controller.initWebSocket(this.props.asrServerUrl)
3285
3337
  }
3286
3338
  stopASR() {
3287
3339
  this.state.isAsrStart = false
3288
- // this.AsrResultText = ''
3289
- // const { publish_sid } = this.getSidsInfo()
3290
- if (media_status == 0) {
3291
- return
3292
- }
3293
- this.asr_controller.TurnOffMicrophone(this.asr_sid)
3294
- // clearInterval(this.asrTimer)
3295
- // if (this.localRecordStatus && this.client_record_id) {
3296
- // test_controller.StopRecord(this.client_record_id)
3340
+ // if (media_status == 0) {
3341
+ // return
3297
3342
  // }
3343
+ this.asr_controller.Disconnect()
3344
+
3298
3345
  message.success({
3299
3346
  content: '敏感词检测已关闭',
3300
3347
  icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
@@ -3363,6 +3410,27 @@ class Video extends Component {
3363
3410
  }
3364
3411
  }
3365
3412
  }
3413
+ // ipad录制回调
3414
+ ipadRecordCallback= async (type, status, businessId) => {
3415
+ try {
3416
+ let result = await API.videoRecordCallback({
3417
+ activityId: this.props.businessNumber,
3418
+ sessionId: this.state.sessionId,
3419
+ roomId: this.state.channelId + '',
3420
+ id: businessId,
3421
+ appId: this.state.appId,
3422
+ recordId: this.state.ipadRecordId,
3423
+ customerId: this.props.customerId,
3424
+ isIpad: 1,
3425
+ type: type,
3426
+ status: status
3427
+ });
3428
+ } catch (err) {
3429
+ console.error(err);
3430
+ if (err.status == 502 || err.status == 404) {
3431
+ }
3432
+ }
3433
+ }
3366
3434
  uploadLogCallback = async (url) => {
3367
3435
  try {
3368
3436
  let result = await API.uploadLogCallback({
@@ -3410,7 +3478,7 @@ class Video extends Component {
3410
3478
  });
3411
3479
  console.log(result);
3412
3480
  this.queryRecordStatus()
3413
- this.appGetUsername(document.getElementById('publish_video1').name)
3481
+ this.appGetUsername(document.getElementById('publish_streamId1').name)
3414
3482
  this.sendMessage({
3415
3483
  'typeId': 1014,
3416
3484
  'sessionId': this.state.sessionId,
@@ -3439,7 +3507,7 @@ class Video extends Component {
3439
3507
  beautyStop();
3440
3508
  console.log('beautyStop!!')
3441
3509
  } catch (err){
3442
- console.error(err)
3510
+ console.log(err)
3443
3511
  }
3444
3512
  }
3445
3513
  if (this.state.isAsrStart){
@@ -3449,9 +3517,13 @@ class Video extends Component {
3449
3517
  if (this.state.isPictureInPicture) {
3450
3518
  document.exitPictureInPicture()
3451
3519
  }
3520
+ worker.postMessage(false);
3521
+ worker.terminate();
3452
3522
  message.destroy()
3453
3523
  clearTimeout(this.loopPlay)
3454
3524
  clearTimeout(this.recordLoopPlay)
3525
+ clearTimeout(this.ipadLeavePlay)
3526
+ clearTimeout(this.ipadLowPowerPlay)
3455
3527
  clearInterval(this.state.drawCanvasInterval)
3456
3528
  clearInterval(this.state.faceDetectionTimer);
3457
3529
  clearInterval(this.state.imageDetectionTimer);
@@ -3590,9 +3662,9 @@ class Video extends Component {
3590
3662
  let params = `?v=${SDK_VERISON}`
3591
3663
  const _dependScripts = [
3592
3664
  // this.props.resourcePath + "/opencv.js" + params,
3593
- this.props.resourcePath + "/asr_api.js" + params,
3594
- this.props.resourcePath + "/reconnecting-websocket.min.js" + params,
3595
- this.props.resourcePath + "/resampler.js" + params,
3665
+ // this.props.resourcePath + "/asr_api.js" + params,
3666
+ // this.props.resourcePath + "/reconnecting-websocket.min.js" + params,
3667
+ // this.props.resourcePath + "/resampler.js" + params,
3596
3668
  this.props.resourcePath + "/beauty/beauty_frame_pkg.js" + params,
3597
3669
  this.props.resourcePath + "/adapter.js" + params,
3598
3670
  this.props.resourcePath + "/getMediaInfo.js" + params,
@@ -3646,14 +3718,12 @@ class Video extends Component {
3646
3718
  script.onreadystatechange = () => {
3647
3719
  if (script.readyState == 'loaded' || script.readyState == 'complete') {
3648
3720
  that.test_controller = new MeetingController();
3649
- that.asr_controller = new AsrController()
3650
3721
  that.mountClick()
3651
3722
  }
3652
3723
  }
3653
3724
  } else {
3654
3725
  script.onload = () => {
3655
3726
  that.test_controller = new MeetingController();
3656
- that.asr_controller = new AsrController()
3657
3727
  that.mountClick()
3658
3728
  }
3659
3729
  }
@@ -3714,8 +3784,95 @@ class Video extends Component {
3714
3784
  if (this.props.salesBranchCode) {
3715
3785
  this.queryBranchName()
3716
3786
  }
3787
+ window.imRoom = {
3788
+ sessionId: this.props.sessionId,
3789
+ userId: this.props.tellerAccount
3790
+ }
3717
3791
  }
3792
+ initAsrRecorder = () => {
3793
+ this.state.recorder = new Recorder({
3794
+ sampleBits: 16, // 采样位数,,默认是16
3795
+ sampleRate: 16000, //音频采样率,默认是16000Hz,
3796
+ numChannels: 1, // 声道,支持 1 或 2, 默认是1
3797
+ compiling: true // 是否边录边转换,默认是false
3798
+ })
3799
+ this.asr_controller = new MyAsrController({
3800
+ token: this.state.asrToken,
3801
+ appkey: this.state.asrAppKey,
3802
+ url: this.state.asrServerUrl,
3803
+ recorder: this.state.recorder
3804
+ })
3805
+
3806
+ let that = this;
3807
+ this.asr_controller.onConnectError = () => {
3808
+ this.messageClick('违禁词检测服务连接失败', 'error')
3809
+ }
3718
3810
 
3811
+ this.asr_controller.onConnectOK = () => {
3812
+ message.success({
3813
+ content: '敏感词检测已开启',
3814
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
3815
+ className: 'successClassName',
3816
+ top: 200,
3817
+ // duration: 10
3818
+ })
3819
+ this.state.recorder.start().then(() => {
3820
+ console.log('asr recorder 开启')
3821
+ }, (error) => {
3822
+ console.log(`出错了`);
3823
+ });
3824
+ this.state.isAsrStart = true
3825
+ this.state.sensitiveRecordMap = {}
3826
+ // this.AsrResultText = ''
3827
+ }
3828
+
3829
+ this.asr_controller.onSentenceEnd = (msg) => {
3830
+ console.log('句子解析结果', msg.result)
3831
+ const resultValue = msg.result
3832
+ const sentence_id = msg.index
3833
+ API.keywordMatch({
3834
+ text: resultValue,
3835
+ appCode: `HSBCCode`
3836
+ }).then((re) => {
3837
+ if (re.data.match) {
3838
+ this.saveVideoPoint('pwd', `${resultValue}`)
3839
+ console.log('匹配到敏感词', re.data.matchRawTextItems)
3840
+ let matchArr = re.data.matchRawTextItems.map(el => el.matchedText);
3841
+ if (matchArr.length>0) {
3842
+ matchArr.forEach(el => {
3843
+ this.messageClick('检测到敏感词:' + matchArr, 'error')
3844
+ })
3845
+ }
3846
+ }
3847
+ });
3848
+ }
3849
+ // this.asr_controller.onAsrMessage = (msg) => {
3850
+ // console.log('收到解析结果', msg.result)
3851
+ // const resultValue = msg.result
3852
+ // const sentence_id = msg.index
3853
+ // // sentence_id相同,取最后一个值
3854
+ // let text = resultValue || ''
3855
+ // const sensitiveArr = that.props.sensitiveWords
3856
+ // let matchArr = sensitiveArr.filter(el => text.includes(el));
3857
+ // if (matchArr.length>0) {
3858
+ // matchArr.forEach(el => {
3859
+ // that.messageClick('检测到敏感词:' + matchArr, 'error')
3860
+ // that.state.sensitiveTitle = '检测到敏感词:' + matchArr
3861
+ // clearTimeout(that.state.sensitiveTitleTimer)
3862
+ // that.state.sensitiveTitleTimer = setTimeout(() => {
3863
+ // that.state.sensitiveTitle = ''
3864
+ // }, 3000);
3865
+ // if (!that.state.sensitiveRecordMap[sentence_id] || !that.state.sensitiveRecordMap[sentence_id].includes(el)){
3866
+
3867
+ // if (!that.state.sensitiveRecordMap[sentence_id]) {
3868
+ // that.state.sensitiveRecordMap[sentence_id] = []
3869
+ // }
3870
+ // that.state.sensitiveRecordMap[sentence_id].push(el)
3871
+ // }
3872
+ // })
3873
+ // }
3874
+ // }
3875
+ }
3719
3876
  voice = () => {
3720
3877
  if (this.isFileSuccuse()) {
3721
3878
  if (!this.state.voiceStatue) {
@@ -3785,8 +3942,9 @@ class Video extends Component {
3785
3942
  this.state.businessId = result.businessId;
3786
3943
  third_id_Map.set(result.businessRecordId, result.businessId);
3787
3944
  console.log(third_id_Map)
3788
- if (this.props.whetherDetectFace) this.startFaceDetection();
3789
- if (this.props.whetherDetectLight) this.startImageDetection();
3945
+ if (this.props.whetherDetectFace && this.props.recordMode != 2) this.startFaceDetection();
3946
+ if (this.props.whetherDetectLight && this.props.recordMode != 2) this.startImageDetection();
3947
+ if (this.props.whetherNeedAsr) this.startASR();
3790
3948
  }
3791
3949
  } else {
3792
3950
  this.state.recordId = ''
@@ -4009,6 +4167,36 @@ class Video extends Component {
4009
4167
  }
4010
4168
 
4011
4169
  };
4170
+ // 打开抄录/签署面板
4171
+ showModal=(moduleName)=>{
4172
+ if (!this.state.multiModuleShow) {
4173
+ this.setState({
4174
+ multiModuleShow:true,
4175
+ multiModule: moduleName,
4176
+ },()=>{
4177
+ })
4178
+ this.tabTitlesClick(
4179
+ {
4180
+ value: 'multiModule',
4181
+ name: '签署抄录'
4182
+ },'add'
4183
+ )
4184
+ }else{
4185
+ this.closeModule()
4186
+ }
4187
+ }
4188
+ // 关闭面板
4189
+ closeModule=()=>{
4190
+ setTimeout(() => {
4191
+ this.setState({
4192
+ multiModuleShow:false,
4193
+ multiModule: '',
4194
+ })
4195
+ this.tabTitlesClick('multiModule','delect')
4196
+ }, 0);
4197
+ // const sid = document.getElementById('video20').name;
4198
+ // sid ? this.test_controller.UnPublish(sid) : ''
4199
+ }
4012
4200
  handleOkPictureConfirm = () => {
4013
4201
  this.pictureInPictureClick('add')
4014
4202
  this.setState({isPictureConfirmModalVisible: false})
@@ -4020,6 +4208,19 @@ class Video extends Component {
4020
4208
  this.saveLog('Start business recording')
4021
4209
  this.enableServerRecording(this.state.businessId)
4022
4210
  }
4211
+ handleOkLowPowerConfirm = () => {
4212
+ this.setState({ ipadLowPowerErrorModalVisible: false})
4213
+ clearTimeout(this.ipadLowPowerPlay)
4214
+ }
4215
+ handleOkIpadLeaveConfirm = () => {
4216
+ // 检测ipad是否入会
4217
+ if (!this.state.ipadTag) {
4218
+ this.messageClick('未检测到IPAD,请重新加入后再试', 'error')
4219
+ } else {
4220
+ clearTimeout(this.ipadLeavePlay)
4221
+ this.setState({IpadLeaveErrorModalVisible: false})
4222
+ }
4223
+ }
4023
4224
  handleOk = () => {
4024
4225
  // 代表此时按钮是暂停会话,把isSuspend改成true变成恢复会话
4025
4226
  this.sendMessage({
@@ -4812,7 +5013,7 @@ class Video extends Component {
4812
5013
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId"+i).innerText).uid
4813
5014
  }
4814
5015
  }
4815
- if (document.getElementById('publish_video1').name == sid) {
5016
+ if (document.getElementById('publish_streamId1').name == sid) {
4816
5017
  userId = this.props.tellerAccount
4817
5018
  }
4818
5019
  try {
@@ -4832,7 +5033,7 @@ class Video extends Component {
4832
5033
  } else {
4833
5034
  this.messageClick('查询失败', 'error')
4834
5035
  }
4835
- if (this.props.isOpenSound && sid != document.getElementById('publish_video1').name) {
5036
+ if (this.props.isOpenSound && sid != document.getElementById('publish_streamId1').name) {
4836
5037
  if (result.data.userType == 1) {
4837
5038
  let src = autod
4838
5039
  let audio = new Audio(src)
@@ -4843,7 +5044,7 @@ class Video extends Component {
4843
5044
  audio.play()
4844
5045
  }
4845
5046
  }
4846
- if (document.getElementById('publish_video1').name == sid) {
5047
+ if (document.getElementById('publish_streamId1').name == sid) {
4847
5048
  this.setState({
4848
5049
  titleNameRm: data
4849
5050
  })
@@ -5426,7 +5627,7 @@ class Video extends Component {
5426
5627
  this.setState({
5427
5628
  isModalVisibleEnvironment: false,
5428
5629
  })
5429
- if (!this.state.isPictureInPicture) {
5630
+ if (!this.state.isPictureInPicture && this.props.recordMode != 2) {
5430
5631
  this.pictureInPicture()
5431
5632
  }
5432
5633
  }
@@ -5441,7 +5642,7 @@ class Video extends Component {
5441
5642
  loading: true
5442
5643
  })
5443
5644
  const config = {}
5444
- config.sid = document.getElementById('publish_video1').name
5645
+ config.sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name
5445
5646
  config.videoSource = this.state.cameraValue
5446
5647
  config.audioSource = this.state.microphoneValue
5447
5648
  this.test_controller.ChangeProfile(config)
@@ -5499,7 +5700,7 @@ class Video extends Component {
5499
5700
  }
5500
5701
  changeMediaStream = () => {
5501
5702
  let publish_config = {}
5502
- publish_config.sid = document.getElementById('publish_video1').name
5703
+ publish_config.sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name
5503
5704
  publish_config.media_type = 1
5504
5705
  publish_config.publish_device = 1
5505
5706
  // publish_config.videoSource = this.state.cameraValue
@@ -6036,9 +6237,9 @@ class Video extends Component {
6036
6237
  const isEnvironmentOK = !this.state.loading &&
6037
6238
  this.state.envInfo.networkResult=='合格' &&
6038
6239
  this.state.envInfo.batteryResult=='合格' &&
6039
- this.state.envInfo.cameraResult=='合格' &&
6240
+ (this.state.envInfo.cameraResult=='合格' || this.props.recordMode == 2) &&
6040
6241
  this.state.envInfo.microResult=='合格' &&
6041
- this.state.envInfo.lightResult=='合格'
6242
+ (this.state.envInfo.lightResult=='合格' || this.props.recordMode == 2 )
6042
6243
 
6043
6244
  const sectionStyle = this.state.tabTitles.length > 0 ? {
6044
6245
  zIndex: '-1',
@@ -6086,6 +6287,18 @@ class Video extends Component {
6086
6287
  }
6087
6288
  <canvas id="canvas" className="canvas"></canvas>
6088
6289
  </CanvasHome>
6290
+ <div className="videoDiv" style={{ display: (this.state.isSelect == 'multiModule') ? '' : 'none', }}>
6291
+ <div className="videoDiv">
6292
+ {/* <div style={{ display: (this.state.multiModuleShow) ? '' : 'none', height: '100%'}}> */}
6293
+ {
6294
+ this.state.multiModuleShow &&
6295
+ <div style={{ height: '100%'}}>
6296
+ <MultiModule moduleName={this.state.multiModule} data={this.state.moduleData} finish={this.closeModule} handleReceiveMsg={this.handleReceiveMsg}></MultiModule>
6297
+ </div>
6298
+ }
6299
+ </div>
6300
+
6301
+ </div>
6089
6302
  <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen' || this.state.isSelect == 'staffScreen') ? '' : 'none', }}>
6090
6303
  <div className="videoDiv" style={{ 'textAlign': 'center' }}>
6091
6304
  <video
@@ -6172,6 +6385,7 @@ class Video extends Component {
6172
6385
  <div id="videoList" className={`wrapper ${this.state.isVideoList? 'videoListClass': ''}`} style={{ width: '20%' }}>
6173
6386
  <div
6174
6387
  className={`itemed ${this.state.isVideoList? 'videoMinutuListClass': 'videoMinutuClass'}`}
6388
+ style={{ display: (this.props.recordMode == 2) ? 'none' : ''}}
6175
6389
  >
6176
6390
  <div className="publishVideoDiv">
6177
6391
 
@@ -6365,6 +6579,22 @@ class Video extends Component {
6365
6579
  ]}>
6366
6580
  <div className='endModal'>双录异常中断,请重新开启</div>
6367
6581
  </Modal>
6582
+ {/* ipad低电量确认 */}
6583
+ <Modal closable={false} centered={true} visible={this.state.ipadLowPowerErrorModalVisible} maskClosable={false} footer={[
6584
+ <div key='end'>
6585
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkLowPowerConfirm}>确定</Button>
6586
+ </div>
6587
+ ]}>
6588
+ <div className='endModal'>IPAD电量过低,请检查</div>
6589
+ </Modal>
6590
+ {/* 双录中ipad退出确认 */}
6591
+ <Modal closable={false} centered={true} visible={this.state.IpadLeaveErrorModalVisible} maskClosable={false} footer={[
6592
+ <div key='end'>
6593
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkIpadLeaveConfirm}>确定</Button>
6594
+ </div>
6595
+ ]}>
6596
+ <div className='endModal'>IPAD异常退出,请重新加入</div>
6597
+ </Modal>
6368
6598
  {/* 是否退出会议*/}
6369
6599
  <Modal closable={false} centered={true} visible={this.state.isModalVisibleEnd} maskClosable={false} footer={[
6370
6600
  <div key='end'>
@@ -6729,6 +6959,8 @@ class Video extends Component {
6729
6959
  key="2" className={this.state.envInfo.batteryResult=='不合格'? 'panel-error':''}>
6730
6960
  <p className='envClass'>电量:{this.state.envInfo.batteryLevel}({this.state.envInfo.batteryCharging})</p>
6731
6961
  </Panel>
6962
+ {
6963
+ this.props.recordMode != 2 &&
6732
6964
  <Panel header={<span>摄像头设备 - {this.state.envInfo.cameraResult}{this.state.envInfo.cameraResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
6733
6965
  key="3" className={this.state.envInfo.cameraResult=='不合格'? 'panel-error':''}>
6734
6966
  <div >
@@ -6743,6 +6975,7 @@ class Video extends Component {
6743
6975
  {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的摄像头权限是否开启,并重启浏览器再试</p> : null}
6744
6976
  </div>
6745
6977
  </Panel>
6978
+ }
6746
6979
  <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':''}>
6747
6980
  <div>
6748
6981
  {
@@ -6755,9 +6988,12 @@ class Video extends Component {
6755
6988
  {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的麦克风权限是否开启,并重启浏览器再试</p> : null}
6756
6989
  </div>
6757
6990
  </Panel>
6991
+ {
6992
+ this.props.recordMode != 2 &&
6758
6993
  <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'}>
6759
6994
  <p className="envClass">{this.state.envInfo.lightResult=='合格'? '无过度背光、曝光':'过度背光、曝光'}</p>
6760
6995
  </Panel>
6996
+ }
6761
6997
  </Collapse>
6762
6998
  </Modal>
6763
6999
  <video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
@@ -6782,7 +7018,10 @@ Video.defaultProps = {
6782
7018
  callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
6783
7019
  // roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
6784
7020
  roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
6785
- asrServerUrl: 'wss://ismis.alipay.com/ws',
7021
+ // asr公有云默认参数
7022
+ // asrServerUrl: 'wss://nls-gateway.cn-shanghai.aliyuncs.com/ws/v1',
7023
+ // asrAppKey: 'E6DAPlpMun5L2dJ7',
7024
+ // asrToken: 'a07198021d434d1288cd4ab3178712cb',
6786
7025
  resourcePath: 'https://counter-web.leimondata.cn:7199',
6787
7026
  // resourcePath: 'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
6788
7027
  prohbiitPrompt: '当前无客户',
@@ -6808,6 +7047,7 @@ Video.defaultProps = {
6808
7047
  isWeakSound: false,
6809
7048
  whetherDetectFace: false, // 是否在双录时开启人脸检测
6810
7049
  whetherDetectLight: false, // 是否在双录时开启背光检测
7050
+ whetherNeedAsr: false, // 是否在双录时开启违禁词检测
6811
7051
  faceDetectInterval: 6, // 人脸检测间隔(秒)
6812
7052
  lightDetectInterval: 6, // 背光检测间隔(秒)
6813
7053
  userSide: 2,