react_hsbc_teller 2.0.23 → 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 (27) 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/assets/mp3/record_error.mp3 +0 -0
  7. package/packages/demo/demo.js +2 -0
  8. package/packages/pages/foot/foot.jsx +2 -2
  9. package/packages/pages/multiModule/components/copy/agree.jsx +115 -0
  10. package/packages/pages/multiModule/components/copy/agree.less +105 -0
  11. package/packages/pages/multiModule/components/copy/copyTwo.jsx +663 -0
  12. package/packages/pages/multiModule/components/copy/copyTwo.less +180 -0
  13. package/packages/pages/multiModule/components/copy/copy_en.jsx +365 -0
  14. package/packages/pages/multiModule/components/copy/copy_en.less +145 -0
  15. package/packages/pages/multiModule/components/copy/copylist.jsx +291 -0
  16. package/packages/pages/multiModule/components/copy/copylist.less +83 -0
  17. package/packages/pages/multiModule/components/copy/risk.jsx +294 -0
  18. package/packages/pages/multiModule/components/copy/risk.less +123 -0
  19. package/packages/pages/multiModule/components/sign/signMy.jsx +306 -0
  20. package/packages/pages/multiModule/components/sign/signMy.less +128 -0
  21. package/packages/pages/multiModule/components/subscribe/subscribe.jsx +113 -0
  22. package/packages/pages/multiModule/components/subscribe/subscribe.less +82 -0
  23. package/packages/pages/multiModule/multiModule.jsx +26 -0
  24. package/packages/pages/multiModule/multiModule.less +20 -0
  25. package/packages/pages/video/video.jsx +430 -166
  26. package/packages/utils/asrController.js +242 -0
  27. 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.23'
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, ')
@@ -1703,22 +1798,23 @@ class Video extends Component {
1703
1798
  }
1704
1799
  }
1705
1800
  } else if (Mival.typeId == 10020) {
1706
- // 录制中断
1707
- this.messageClick('录制服务异常中断,请重试', 'error')
1708
- this.saveLog('recording error')
1709
- this.setState({
1710
- isRecordingeErrorModalVisible: true,
1711
- recordId: ''
1712
- })
1713
- // 循环播放录制中断语音
1714
- const loopPlay = () => {
1715
- if(!this.state.recordId && document.getElementById("publish_video1")){
1716
- let audio = new Audio(recordErrorAudio)
1717
- audio.play()
1718
- setTimeout(loopPlay, 3000);
1719
- }
1720
- }
1721
- setTimeout(loopPlay, 0);
1801
+ // 录制中断(模拟测试)
1802
+ // this.messageClick('双录异常中断,请重新开启', 'error')
1803
+ // this.setState({
1804
+ // isRecordingeErrorModalVisible: true,
1805
+ // businessRecordId: '',
1806
+ // })
1807
+ // // 循环播放录制中断语音
1808
+ // clearTimeout(this.recordLoopPlay)
1809
+ // this.recordLoopPlay = () => {
1810
+ // console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
1811
+ // if(!this.state.businessRecordId && document.getElementById("publish_video1")){
1812
+ // let audio = new Audio(recordErrorAudio)
1813
+ // audio.play()
1814
+ // setTimeout(this.recordLoopPlay, 3000);
1815
+ // }
1816
+ // }
1817
+ // setTimeout(this.recordLoopPlay, 0);
1722
1818
 
1723
1819
  } else if (Mival.typeId == 33001 && this.state.sessionId == Mival.data.sessionId) {
1724
1820
  if (Mival.type == 1) {
@@ -1733,21 +1829,28 @@ class Video extends Component {
1733
1829
  this.state.businessId = Mival.id;
1734
1830
  this.saveLog('Start business recording')
1735
1831
  this.enableServerRecording( Mival.id)
1832
+ if (this.state.ipadTag) this.enableIpadRecording(Mival.id)
1736
1833
 
1737
- if (this.props.whetherDetectFace){
1834
+ if (this.props.whetherDetectFace && this.props.recordMode != 2){
1738
1835
  this.startFaceDetection();
1739
1836
  }
1740
- if (this.props.whetherDetectLight){
1837
+ if (this.props.whetherDetectLight && this.props.recordMode != 2){
1741
1838
  this.startImageDetection();
1742
1839
  }
1840
+ if (this.props.whetherNeedAsr) {
1841
+ this.startASR();
1842
+ }
1743
1843
  } else if (Mival.status == 2) {
1744
1844
  // 关闭了业务录制
1745
1845
  console.log('业务录制关闭', this.state.businessRecordId)
1746
1846
  this.saveLog('Stop business recording')
1747
1847
  this.test_controller.StopRemoteRecord(this.state.businessRecordId)
1848
+ if (this.state.ipadRecordId) this.test_controller.StopRemoteRecord(this.state.ipadRecordId)
1849
+
1748
1850
  this.state.businessId = '';
1749
1851
  clearInterval(this.state.faceDetectionTimer);
1750
1852
  clearInterval(this.state.imageDetectionTimer);
1853
+ if(this.state.isAsrStart) this.stopASR();
1751
1854
  }
1752
1855
  } else if (Mival.typeId == 2002 && this.state.sessionId == Mival.sessionId) {
1753
1856
  // 会议到时间
@@ -2094,7 +2197,7 @@ class Video extends Component {
2094
2197
  this.test_controller.OnMediaClose = (code, sid) => {
2095
2198
  console.log(code, sid)
2096
2199
  if (code == 5003 || code == 5004 || code == 5005 || code == 5007 || code == 5009 || code == 5010 || code == 5011 || code == 5012) {
2097
- if (sid == document.getElementById('publish_video1').name) {
2200
+ if (sid == document.getElementById('publish_streamId1').name) {
2098
2201
  this.saveLog('Audio and video close notification,' + code)
2099
2202
  this.roomCallBack(2, '音视频异常关闭', 8)
2100
2203
  } else {
@@ -2118,6 +2221,11 @@ class Video extends Component {
2118
2221
  publish_config.publish_video_id = 'publish_video1'
2119
2222
  publish_config.publish_streamId_id = 'publish_streamId1'
2120
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
+ }
2121
2229
  this.test_controller.Publish(publish_config)
2122
2230
 
2123
2231
  // this.publishAllScreen();
@@ -2293,7 +2401,7 @@ class Video extends Component {
2293
2401
  this.state.isScreenSwitching = false
2294
2402
  }
2295
2403
  }
2296
- if (sid == document.getElementById('publish_video1').name) {
2404
+ if (sid == document.getElementById('publish_streamId1').name) {
2297
2405
 
2298
2406
  this.setState({
2299
2407
 
@@ -2322,7 +2430,7 @@ class Video extends Component {
2322
2430
  },
2323
2431
  1000
2324
2432
  );
2325
- this.mediaInfo = this.generateMediaInfo(document.getElementById("publish_video1").name);
2433
+ this.mediaInfo = this.generateMediaInfo(document.getElementById("publish_streamId1").name);
2326
2434
 
2327
2435
  } else {
2328
2436
  var box = document.getElementById("whiteboardDIV");
@@ -2345,7 +2453,7 @@ class Video extends Component {
2345
2453
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
2346
2454
  this.saveLog('mrtc OnPublishFailed 发布失败, code=' + err_code)
2347
2455
  console.log('Publishing media stream failed,', sid, err_code, err_msg)
2348
- if (sid == document.getElementById('publish_video1').name) {
2456
+ if (sid == document.getElementById('publish_streamId1').name) {
2349
2457
  this.state.sessionType = false
2350
2458
  this.roomCallBack(2, '发布失败', 4)
2351
2459
  } else {
@@ -2568,6 +2676,11 @@ class Video extends Component {
2568
2676
  }
2569
2677
 
2570
2678
  }
2679
+
2680
+ // 记录ipad摄像头流,需要单独开启录制
2681
+ if (feed.mediaSource == 'VIDEO_SOURCE_CAMERA' && feed.uid.includes(IPAD_SUFFIX)) {
2682
+ this.state.ipadTag = feed.tag;
2683
+ }
2571
2684
  };
2572
2685
  // 推送“有新订阅”给与会者
2573
2686
  this.test_controller.OnNewSubscribe = (subscriber, feed) => {
@@ -2575,8 +2688,8 @@ class Video extends Component {
2575
2688
  };
2576
2689
  // 取消发布成功
2577
2690
  this.test_controller.OnUnPublishSucc = (sid) => {
2578
- console.log('取消发布成功', sid, document.getElementById('publish_video1').name)
2579
- 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) {
2580
2693
  this.sendMessage({
2581
2694
  'typeId': 2030,
2582
2695
  'sessionId': this.state.sessionId,
@@ -2594,7 +2707,7 @@ class Video extends Component {
2594
2707
  // }
2595
2708
 
2596
2709
  }
2597
- 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) {
2598
2711
  clearStreamRemain()
2599
2712
  }
2600
2713
  };
@@ -2684,6 +2797,27 @@ class Video extends Component {
2684
2797
  console.log('过滤掉的uid', participant)
2685
2798
  return
2686
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
+ }
2687
2821
 
2688
2822
 
2689
2823
  this.appGetUsernameClick(participant).then((res) => {
@@ -2722,7 +2856,7 @@ class Video extends Component {
2722
2856
  // 弱网回调
2723
2857
  this.test_controller.OnNetworkWeak = (bpsSend, bpsRecv, sid) => {
2724
2858
  console.log('弱网回调', bpsSend, bpsRecv, sid)
2725
- if (sid == document.getElementById('publish_video1').name) {
2859
+ if (sid == document.getElementById('publish_streamId1').name) {
2726
2860
 
2727
2861
  this.detectNetworkWeak().then((isWeak) => {
2728
2862
  console.log('弱网结果:' + isWeak)
@@ -2755,6 +2889,11 @@ class Video extends Component {
2755
2889
  this.state.recordId = record_id
2756
2890
  this.videoRecordCallback('1', true)
2757
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')
2758
2897
  } else {
2759
2898
  // 业务录制
2760
2899
  this.state.businessRecordId = record_id
@@ -2779,6 +2918,10 @@ class Video extends Component {
2779
2918
  if (!record_third_id) {
2780
2919
  this.videoRecordCallback('1', false)
2781
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)
2782
2925
  } else {
2783
2926
  this.businessRecordCallback('1', false, record_third_id)
2784
2927
  this.saveLog('mrtc OnStartRemoteBusinessRecordFailed, code='+err_code + ',businessId=' + record_third_id)
@@ -2795,6 +2938,11 @@ class Video extends Component {
2795
2938
  this.videoRecordCallback('2', true)
2796
2939
  this.saveLog('mrtc OnStopRemoteRecordSucc, recordId='+recordId)
2797
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 = '';
2798
2946
  } else {
2799
2947
  this.businessRecordCallback('2', true, record_third_id)
2800
2948
  this.saveLog('mrtc OnStopRemoteBusinessRecordSucc, recordId='+recordId + ',businessId=' + record_third_id)
@@ -2817,6 +2965,10 @@ class Video extends Component {
2817
2965
  if (!record_third_id) {
2818
2966
  this.videoRecordCallback('2', false)
2819
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)
2820
2972
  } else {
2821
2973
  this.businessRecordCallback('2', false, record_third_id)
2822
2974
  this.saveLog('mrtc OnStopRemoteBusinessRecordFailed, err_code='+err_code+',businessId=' + record_third_id)
@@ -2885,6 +3037,28 @@ class Video extends Component {
2885
3037
  msg
2886
3038
  ) => {
2887
3039
  console.log('服务端录制失败通知', recordId, feedId, code, msg)
3040
+ this.saveLog(`recording error, recordId=${recordId}`)
3041
+
3042
+ // 如果在业务双录中,需要重新开启;如果是full录制出错,则不用处理
3043
+ if (this.state.businessRecordId == recordId) {
3044
+ // 录制中断
3045
+ this.messageClick('双录异常中断,请重新开启', 'error')
3046
+ this.setState({
3047
+ isRecordingeErrorModalVisible: true,
3048
+ businessRecordId: '',
3049
+ })
3050
+ // 循环播放录制中断语音
3051
+ clearTimeout(this.recordLoopPlay)
3052
+ this.recordLoopPlay = () => {
3053
+ console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
3054
+ if(!this.state.businessRecordId && document.getElementById("publish_streamId1")){
3055
+ let audio = new Audio(recordErrorAudio)
3056
+ audio.play()
3057
+ setTimeout(this.recordLoopPlay, 3000);
3058
+ }
3059
+ }
3060
+ setTimeout(this.recordLoopPlay, 0);
3061
+ }
2888
3062
  };
2889
3063
  // 停止浏览器录制成功回调
2890
3064
  this.test_controller.OnClientStopRecordSuccess = (
@@ -3104,7 +3278,7 @@ class Video extends Component {
3104
3278
  let startX = x2 // 绘制起始点x
3105
3279
  let startY = y1 - height // 绘制起始点y
3106
3280
  ctx.fillRect(startX, startY, width, height)
3107
- if (document.getElementById('publish_video1').name == sid && i == 39) {
3281
+ if (document.getElementById('publish_streamId1').name == sid && i == 39) {
3108
3282
  this.state.analyserHeight.set(sid, number / 40 / 70)
3109
3283
  this.state.analyserHeight = this.state.analyserHeight
3110
3284
  }
@@ -3150,128 +3324,24 @@ class Video extends Component {
3150
3324
 
3151
3325
 
3152
3326
  };
3153
-
3154
- const that = this;
3155
- this.asr_controller.OnGetSign = function(bizName, subBiz, uid) {
3156
- return 'signature'
3157
- }
3158
- // 连接成功回调
3159
- this.asr_controller.OnAsrConnectOK = function() {
3160
- // 需要状态控制
3161
- if (media_status == 1) {
3162
- return
3163
- }
3164
-
3165
- const config_param = {}
3166
- const biz_name = 'demo'
3167
- const sub_biz = 'default'
3168
- const uid = that.props.tellerAccount
3169
- const sampleRate = 16000
3170
- const procType = 8
3171
- config_param.bizName = biz_name
3172
- config_param.subBiz = sub_biz
3173
- config_param.uid = uid
3174
- config_param.sampleRate = sampleRate
3175
- config_param.procType = procType
3176
- config_param.mediaStreamType = 2 // 1:麦克风;2:传stream
3177
- // console.log(test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_)
3178
- config_param.audio_ = that.test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_
3179
- config_param.idleTime = 6 // 12s没有识别结果返回通知上层
3180
- config_param.tag = 'asr_tag0'
3181
- that.asr_sid = that.asr_controller.TurnOnMicrophone(config_param, config_param.audio_)
3182
- }
3183
- // 初始化成功
3184
- this.asr_controller.OnInitOk = function(sid, tag) {
3185
- console.log('OnInitOk:')
3186
- media_status = 1
3187
- }
3188
-
3189
- // 初始化失败
3190
- this.asr_controller.OnInitError = function(sid, code, msg, tag) {
3191
- console.log('OnInitError:' + msg)
3192
- that.asr_sid = ''
3193
- }
3194
-
3195
- // 识别结果
3196
- this.asr_controller.OnAsrMessage = function(msg, sid, tag, status) {
3197
- that.asr_controller.trace(`OnAsrMessage sid=${sid},status=${status},tag=${tag}`)
3198
- const parse = JSON.parse(msg)
3199
- const resultValue = parse.value
3200
- const sentence_id = parse.sentence_id
3201
- // sentence_id相同,取最后一个值
3202
- let text = resultValue || ''
3203
- const sensitiveArr = that.props.sensitiveWords
3204
- // const regex = new RegExp(sensitiveArr.join('|'), 'g') // /\#{(.+?)\}/g;
3205
- // text = text.replace(regex, function(r) { return '<span style="background: red;">' + r + '</span>' })
3206
- let matchArr = sensitiveArr.filter(el => text.includes(el));
3207
- if (matchArr.length>0) {
3208
- matchArr.forEach(el => {
3209
- that.messageClick('检测到敏感词:' + matchArr, 'error')
3210
- that.state.sensitiveTitle = '检测到敏感词:' + matchArr
3211
- clearTimeout(that.state.sensitiveTitleTimer)
3212
- that.state.sensitiveTitleTimer = setTimeout(() => {
3213
- that.state.sensitiveTitle = ''
3214
- }, 3000);
3215
- if (!that.state.sensitiveRecordMap[sentence_id] || !that.state.sensitiveRecordMap[sentence_id].includes(el)){
3216
- API.addSensitiveRecord({
3217
- tellerId: that.props.tellerAccount,
3218
- sessionId: that.state.sessionId,
3219
- sensitiveWord: el
3220
- });
3221
- if (!that.state.sensitiveRecordMap[sentence_id]) {
3222
- that.state.sensitiveRecordMap[sentence_id] = []
3223
- }
3224
- that.state.sensitiveRecordMap[sentence_id].push(el)
3225
- }
3226
- })
3227
- }
3228
- // that.AsrResultText = text
3229
- }
3230
-
3231
- // 停止录音回调
3232
- this.asr_controller.OnTurnOffMicrophoneOK = function(sid, tag) {
3233
- media_status = 0
3234
- that.asr_controller.Disconnect()
3235
- }
3236
- this.asr_controller.OnAsrMsgIdle = function(sid, tag) {
3237
- // that.AsrResultText = ''
3238
- that.asr_controller.trace('OnAsrMsgIdle')
3239
- }
3240
- this.asr_controller.OnAsrDisconnectOK = function() {
3241
- that.asr_controller.trace('Disconnect is success')
3242
- }
3243
-
3327
+
3328
+
3244
3329
  }
3245
3330
  startASR() {
3246
3331
  // const publish_sid = document.getElementById('publish_video1').name
3247
3332
 
3248
- if (media_status == 1) {
3249
- return
3250
- }
3251
- this.asr_controller.Connect(this.props.asrServerUrl)
3252
- message.success({
3253
- content: '敏感词检测已开启',
3254
- icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
3255
- className: 'successClassName',
3256
- top: 200,
3257
- // duration: 10
3258
- })
3259
- this.state.isAsrStart = true
3260
- this.state.sensitiveRecordMap = {}
3261
- // this.AsrResultText = ''
3333
+ // if (media_status == 1) {
3334
+ // return
3335
+ // }
3336
+ this.asr_controller.initWebSocket(this.props.asrServerUrl)
3262
3337
  }
3263
3338
  stopASR() {
3264
3339
  this.state.isAsrStart = false
3265
- // this.AsrResultText = ''
3266
- // const { publish_sid } = this.getSidsInfo()
3267
- if (media_status == 0) {
3268
- return
3269
- }
3270
- this.asr_controller.TurnOffMicrophone(this.asr_sid)
3271
- // clearInterval(this.asrTimer)
3272
- // if (this.localRecordStatus && this.client_record_id) {
3273
- // test_controller.StopRecord(this.client_record_id)
3340
+ // if (media_status == 0) {
3341
+ // return
3274
3342
  // }
3343
+ this.asr_controller.Disconnect()
3344
+
3275
3345
  message.success({
3276
3346
  content: '敏感词检测已关闭',
3277
3347
  icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
@@ -3340,6 +3410,27 @@ class Video extends Component {
3340
3410
  }
3341
3411
  }
3342
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
+ }
3343
3434
  uploadLogCallback = async (url) => {
3344
3435
  try {
3345
3436
  let result = await API.uploadLogCallback({
@@ -3387,7 +3478,7 @@ class Video extends Component {
3387
3478
  });
3388
3479
  console.log(result);
3389
3480
  this.queryRecordStatus()
3390
- this.appGetUsername(document.getElementById('publish_video1').name)
3481
+ this.appGetUsername(document.getElementById('publish_streamId1').name)
3391
3482
  this.sendMessage({
3392
3483
  'typeId': 1014,
3393
3484
  'sessionId': this.state.sessionId,
@@ -3416,7 +3507,7 @@ class Video extends Component {
3416
3507
  beautyStop();
3417
3508
  console.log('beautyStop!!')
3418
3509
  } catch (err){
3419
- console.error(err)
3510
+ console.log(err)
3420
3511
  }
3421
3512
  }
3422
3513
  if (this.state.isAsrStart){
@@ -3426,8 +3517,13 @@ class Video extends Component {
3426
3517
  if (this.state.isPictureInPicture) {
3427
3518
  document.exitPictureInPicture()
3428
3519
  }
3520
+ worker.postMessage(false);
3521
+ worker.terminate();
3429
3522
  message.destroy()
3430
3523
  clearTimeout(this.loopPlay)
3524
+ clearTimeout(this.recordLoopPlay)
3525
+ clearTimeout(this.ipadLeavePlay)
3526
+ clearTimeout(this.ipadLowPowerPlay)
3431
3527
  clearInterval(this.state.drawCanvasInterval)
3432
3528
  clearInterval(this.state.faceDetectionTimer);
3433
3529
  clearInterval(this.state.imageDetectionTimer);
@@ -3566,9 +3662,9 @@ class Video extends Component {
3566
3662
  let params = `?v=${SDK_VERISON}`
3567
3663
  const _dependScripts = [
3568
3664
  // this.props.resourcePath + "/opencv.js" + params,
3569
- this.props.resourcePath + "/asr_api.js" + params,
3570
- this.props.resourcePath + "/reconnecting-websocket.min.js" + params,
3571
- 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,
3572
3668
  this.props.resourcePath + "/beauty/beauty_frame_pkg.js" + params,
3573
3669
  this.props.resourcePath + "/adapter.js" + params,
3574
3670
  this.props.resourcePath + "/getMediaInfo.js" + params,
@@ -3622,14 +3718,12 @@ class Video extends Component {
3622
3718
  script.onreadystatechange = () => {
3623
3719
  if (script.readyState == 'loaded' || script.readyState == 'complete') {
3624
3720
  that.test_controller = new MeetingController();
3625
- that.asr_controller = new AsrController()
3626
3721
  that.mountClick()
3627
3722
  }
3628
3723
  }
3629
3724
  } else {
3630
3725
  script.onload = () => {
3631
3726
  that.test_controller = new MeetingController();
3632
- that.asr_controller = new AsrController()
3633
3727
  that.mountClick()
3634
3728
  }
3635
3729
  }
@@ -3690,8 +3784,95 @@ class Video extends Component {
3690
3784
  if (this.props.salesBranchCode) {
3691
3785
  this.queryBranchName()
3692
3786
  }
3787
+ window.imRoom = {
3788
+ sessionId: this.props.sessionId,
3789
+ userId: this.props.tellerAccount
3790
+ }
3693
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
+ }
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
+ }
3694
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
+ }
3695
3876
  voice = () => {
3696
3877
  if (this.isFileSuccuse()) {
3697
3878
  if (!this.state.voiceStatue) {
@@ -3761,8 +3942,9 @@ class Video extends Component {
3761
3942
  this.state.businessId = result.businessId;
3762
3943
  third_id_Map.set(result.businessRecordId, result.businessId);
3763
3944
  console.log(third_id_Map)
3764
- if (this.props.whetherDetectFace) this.startFaceDetection();
3765
- 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();
3766
3948
  }
3767
3949
  } else {
3768
3950
  this.state.recordId = ''
@@ -3985,6 +4167,36 @@ class Video extends Component {
3985
4167
  }
3986
4168
 
3987
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
+ }
3988
4200
  handleOkPictureConfirm = () => {
3989
4201
  this.pictureInPictureClick('add')
3990
4202
  this.setState({isPictureConfirmModalVisible: false})
@@ -3993,8 +4205,21 @@ class Video extends Component {
3993
4205
  if (!this.state.isPictureInPicture) {
3994
4206
  this.pictureInPicture()
3995
4207
  }
3996
- this.saveLog('Start recording')
3997
- this.enableServerRecording()
4208
+ this.saveLog('Start business recording')
4209
+ this.enableServerRecording(this.state.businessId)
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
+ }
3998
4223
  }
3999
4224
  handleOk = () => {
4000
4225
  // 代表此时按钮是暂停会话,把isSuspend改成true变成恢复会话
@@ -4788,7 +5013,7 @@ class Video extends Component {
4788
5013
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId"+i).innerText).uid
4789
5014
  }
4790
5015
  }
4791
- if (document.getElementById('publish_video1').name == sid) {
5016
+ if (document.getElementById('publish_streamId1').name == sid) {
4792
5017
  userId = this.props.tellerAccount
4793
5018
  }
4794
5019
  try {
@@ -4808,7 +5033,7 @@ class Video extends Component {
4808
5033
  } else {
4809
5034
  this.messageClick('查询失败', 'error')
4810
5035
  }
4811
- if (this.props.isOpenSound && sid != document.getElementById('publish_video1').name) {
5036
+ if (this.props.isOpenSound && sid != document.getElementById('publish_streamId1').name) {
4812
5037
  if (result.data.userType == 1) {
4813
5038
  let src = autod
4814
5039
  let audio = new Audio(src)
@@ -4819,7 +5044,7 @@ class Video extends Component {
4819
5044
  audio.play()
4820
5045
  }
4821
5046
  }
4822
- if (document.getElementById('publish_video1').name == sid) {
5047
+ if (document.getElementById('publish_streamId1').name == sid) {
4823
5048
  this.setState({
4824
5049
  titleNameRm: data
4825
5050
  })
@@ -5402,7 +5627,7 @@ class Video extends Component {
5402
5627
  this.setState({
5403
5628
  isModalVisibleEnvironment: false,
5404
5629
  })
5405
- if (!this.state.isPictureInPicture) {
5630
+ if (!this.state.isPictureInPicture && this.props.recordMode != 2) {
5406
5631
  this.pictureInPicture()
5407
5632
  }
5408
5633
  }
@@ -5417,7 +5642,7 @@ class Video extends Component {
5417
5642
  loading: true
5418
5643
  })
5419
5644
  const config = {}
5420
- config.sid = document.getElementById('publish_video1').name
5645
+ config.sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name
5421
5646
  config.videoSource = this.state.cameraValue
5422
5647
  config.audioSource = this.state.microphoneValue
5423
5648
  this.test_controller.ChangeProfile(config)
@@ -5475,7 +5700,7 @@ class Video extends Component {
5475
5700
  }
5476
5701
  changeMediaStream = () => {
5477
5702
  let publish_config = {}
5478
- publish_config.sid = document.getElementById('publish_video1').name
5703
+ publish_config.sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name
5479
5704
  publish_config.media_type = 1
5480
5705
  publish_config.publish_device = 1
5481
5706
  // publish_config.videoSource = this.state.cameraValue
@@ -6012,9 +6237,9 @@ class Video extends Component {
6012
6237
  const isEnvironmentOK = !this.state.loading &&
6013
6238
  this.state.envInfo.networkResult=='合格' &&
6014
6239
  this.state.envInfo.batteryResult=='合格' &&
6015
- this.state.envInfo.cameraResult=='合格' &&
6240
+ (this.state.envInfo.cameraResult=='合格' || this.props.recordMode == 2) &&
6016
6241
  this.state.envInfo.microResult=='合格' &&
6017
- this.state.envInfo.lightResult=='合格'
6242
+ (this.state.envInfo.lightResult=='合格' || this.props.recordMode == 2 )
6018
6243
 
6019
6244
  const sectionStyle = this.state.tabTitles.length > 0 ? {
6020
6245
  zIndex: '-1',
@@ -6062,6 +6287,18 @@ class Video extends Component {
6062
6287
  }
6063
6288
  <canvas id="canvas" className="canvas"></canvas>
6064
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>
6065
6302
  <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen' || this.state.isSelect == 'staffScreen') ? '' : 'none', }}>
6066
6303
  <div className="videoDiv" style={{ 'textAlign': 'center' }}>
6067
6304
  <video
@@ -6126,7 +6363,7 @@ class Video extends Component {
6126
6363
 
6127
6364
  </ul>
6128
6365
  </div>
6129
- {!this.state.loading && this.state.sessionType && this.state.sessionId?
6366
+ {!this.state.loading && this.state.sessionType && this.state.sessionId && this.props.recordMode == 2?
6130
6367
  <div className='QRCode'>
6131
6368
  <QRCode
6132
6369
  value={JSON.stringify({
@@ -6148,6 +6385,7 @@ class Video extends Component {
6148
6385
  <div id="videoList" className={`wrapper ${this.state.isVideoList? 'videoListClass': ''}`} style={{ width: '20%' }}>
6149
6386
  <div
6150
6387
  className={`itemed ${this.state.isVideoList? 'videoMinutuListClass': 'videoMinutuClass'}`}
6388
+ style={{ display: (this.props.recordMode == 2) ? 'none' : ''}}
6151
6389
  >
6152
6390
  <div className="publishVideoDiv">
6153
6391
 
@@ -6341,6 +6579,22 @@ class Video extends Component {
6341
6579
  ]}>
6342
6580
  <div className='endModal'>双录异常中断,请重新开启</div>
6343
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>
6344
6598
  {/* 是否退出会议*/}
6345
6599
  <Modal closable={false} centered={true} visible={this.state.isModalVisibleEnd} maskClosable={false} footer={[
6346
6600
  <div key='end'>
@@ -6705,6 +6959,8 @@ class Video extends Component {
6705
6959
  key="2" className={this.state.envInfo.batteryResult=='不合格'? 'panel-error':''}>
6706
6960
  <p className='envClass'>电量:{this.state.envInfo.batteryLevel}({this.state.envInfo.batteryCharging})</p>
6707
6961
  </Panel>
6962
+ {
6963
+ this.props.recordMode != 2 &&
6708
6964
  <Panel header={<span>摄像头设备 - {this.state.envInfo.cameraResult}{this.state.envInfo.cameraResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
6709
6965
  key="3" className={this.state.envInfo.cameraResult=='不合格'? 'panel-error':''}>
6710
6966
  <div >
@@ -6719,6 +6975,7 @@ class Video extends Component {
6719
6975
  {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的摄像头权限是否开启,并重启浏览器再试</p> : null}
6720
6976
  </div>
6721
6977
  </Panel>
6978
+ }
6722
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':''}>
6723
6980
  <div>
6724
6981
  {
@@ -6731,9 +6988,12 @@ class Video extends Component {
6731
6988
  {this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的麦克风权限是否开启,并重启浏览器再试</p> : null}
6732
6989
  </div>
6733
6990
  </Panel>
6991
+ {
6992
+ this.props.recordMode != 2 &&
6734
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'}>
6735
6994
  <p className="envClass">{this.state.envInfo.lightResult=='合格'? '无过度背光、曝光':'过度背光、曝光'}</p>
6736
6995
  </Panel>
6996
+ }
6737
6997
  </Collapse>
6738
6998
  </Modal>
6739
6999
  <video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
@@ -6758,7 +7018,10 @@ Video.defaultProps = {
6758
7018
  callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
6759
7019
  // roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
6760
7020
  roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
6761
- 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',
6762
7025
  resourcePath: 'https://counter-web.leimondata.cn:7199',
6763
7026
  // resourcePath: 'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
6764
7027
  prohbiitPrompt: '当前无客户',
@@ -6784,6 +7047,7 @@ Video.defaultProps = {
6784
7047
  isWeakSound: false,
6785
7048
  whetherDetectFace: false, // 是否在双录时开启人脸检测
6786
7049
  whetherDetectLight: false, // 是否在双录时开启背光检测
7050
+ whetherNeedAsr: false, // 是否在双录时开启违禁词检测
6787
7051
  faceDetectInterval: 6, // 人脸检测间隔(秒)
6788
7052
  lightDetectInterval: 6, // 背光检测间隔(秒)
6789
7053
  userSide: 2,