react_hsbc_teller 2.0.4 → 2.0.6

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.4",
3
+ "version": "2.0.6",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -471,7 +471,24 @@ class API extends Server{
471
471
  throw err;
472
472
  }
473
473
  }
474
-
474
+ async addSensitiveRecord(params = {}){
475
+ try{
476
+ let result = await this.axios('post', '/sensitive/add', params);
477
+ if (result && (result.data instanceof Object) && result.code === 200){
478
+ return result.data||[];
479
+ } else{
480
+ let err = {
481
+ tip: '服务异常',
482
+ response: result,
483
+ data: params,
484
+ // url: 'https://api.cangdu.org/shopro/data/products',
485
+ }
486
+ throw err;
487
+ }
488
+ }catch(err){
489
+ throw err;
490
+ }
491
+ }
475
492
  // /**
476
493
  // * 用途:获取记录数据
477
494
  // * @url https://api.cangdu.org/shopro/data/record
Binary file
Binary file
@@ -27,6 +27,9 @@ export default class foot extends Component {
27
27
  ocrClick=()=>{
28
28
  this.props.ocrClick()
29
29
  }
30
+ paperOcrClick=()=>{
31
+ this.props.paperOcrClick()
32
+ }
30
33
  pictureInPicture=()=>{
31
34
  this.props.pictureInPicture()
32
35
  }
@@ -47,6 +50,12 @@ export default class foot extends Component {
47
50
  inspection = ()=>{
48
51
  this.props.inspection()
49
52
  }
53
+ envDetection = () => {
54
+ this.props.envDetection()
55
+ }
56
+ toggleAsr = ()=>{
57
+ this.props.toggleAsr()
58
+ }
50
59
  switchExternal=()=>{
51
60
  this.props.switchExternal()
52
61
  }
@@ -147,6 +156,15 @@ export default class foot extends Component {
147
156
  </div>
148
157
  // </Popover>
149
158
  }
159
+ {
160
+ item == 'PAPER_OCR' &&
161
+ <div className="one" onClick={this.paperOcrClick.bind(this)}>
162
+ <img className="imgClass" src={require("../../assets/img/icon_paper.png").default} alt="" />
163
+ <div className="text">
164
+ 纸质识别
165
+ </div>
166
+ </div>
167
+ }
150
168
  {
151
169
  item == 'INVITE' && <div className="one" onClick={this.invitationClick.bind(this)}>
152
170
  <img className="imgClass" src={require("../../assets/img/icon_invitation.png").default} alt="" />
@@ -199,6 +217,22 @@ export default class foot extends Component {
199
217
  </div>
200
218
  </div>
201
219
  </div>
220
+ <div className='footHover' onClick={this.envDetection.bind(this)}>
221
+ <div className="one">
222
+ <img className="imgClass" src={require("../../assets/img/icon_env.png").default} alt="" />
223
+ <div className="text">
224
+ 环境检测
225
+ </div>
226
+ </div>
227
+ </div>
228
+ <div className='footHover' onClick={this.toggleAsr.bind(this)}>
229
+ <div className="one">
230
+ <img className="imgClass" src={require("../../assets/img/icon_asr.png").default} alt="" />
231
+ <div className="text">
232
+ ASR检测
233
+ </div>
234
+ </div>
235
+ </div>
202
236
  </div>
203
237
  {defaultList}
204
238
 
@@ -25,6 +25,7 @@ width: 100%;
25
25
  }
26
26
  .footHover{
27
27
  margin: 0 5px;
28
+ cursor: pointer;
28
29
  }
29
30
  .footHover :hover{
30
31
  background: #F3F3F3;
@@ -17,6 +17,7 @@ import beautyImg from '../../assets/img/whiteningLut.jpg'
17
17
  import ocrImage from '../../assets/img/jietu.png'
18
18
  import faceImage from '../../assets/img/jietu_face.png'
19
19
  import autod from '../../assets/mp3/joinmeeting.mp3'
20
+ import recordErrorAudio from '../../assets/mp3/record_error.mp3'
20
21
  import internalJoin from '../../assets/mp3/internalJoin.mp3'
21
22
  import internalLeft from '../../assets/mp3/internalLeft.mp3'
22
23
  import leftMetting from '../../assets/mp3/leftmeeting.mp3'
@@ -37,6 +38,9 @@ import 'antd/lib/radio/style'
37
38
 
38
39
  import Space from "antd/lib/space";
39
40
  import 'antd/lib/space/style'
41
+ import { Collapse } from 'antd';
42
+ import 'antd/lib/collapse/style'
43
+ const { Panel } = Collapse;
40
44
 
41
45
 
42
46
  import styled from 'styled-components';
@@ -52,6 +56,7 @@ const LEAVE_TYPE = {
52
56
  TELLER_EXIT: 1, // 坐席退出
53
57
  ROOM_DESTROYED: -1, // 房间异常
54
58
  }
59
+ let media_status = 0
55
60
  let pictureInPictureVideo
56
61
  let mix_stream
57
62
  let worker
@@ -241,6 +246,8 @@ class Video extends Component {
241
246
  microphoneList: [],
242
247
  speakerList: [],
243
248
  isModalVisibleInspection: false,
249
+ envInfo: {},
250
+ isModalVisibleEnvironment: false,
244
251
  cameraValue: '',
245
252
  microphoneValue: '',
246
253
  imStatus: false,
@@ -296,7 +303,7 @@ class Video extends Component {
296
303
  saveLog = (val) => {
297
304
  axios({
298
305
  method: 'get',
299
- baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=2.0.4&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
306
+ baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=2.0.6&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
300
307
 
301
308
  }).then(res => {
302
309
 
@@ -341,7 +348,7 @@ class Video extends Component {
341
348
  publish_config.publish_tag = 'tag' + (i+1)
342
349
  this.test_controller.Publish(publish_config)
343
350
  })
344
- this.publishAllScreen();
351
+ // this.publishAllScreen();
345
352
 
346
353
  // eslint-disable-next-line no-undef
347
354
  setTimeout(() => {
@@ -957,6 +964,18 @@ class Video extends Component {
957
964
  this.selectCustomer('ocr')
958
965
  }
959
966
  };
967
+ paperOcrClick = () => {
968
+ setTimeout(() => {
969
+ // this.messageClick('系统检测到您已签署2/3个地方,还有1处未签署', 'error')
970
+ message.error({
971
+ content: '系统检测到您已签署2/3个地方,还有1处未签署',
972
+ icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
973
+ className: 'errorClassName',
974
+ top: 200,
975
+ duration: 10
976
+ })
977
+ }, 1500);
978
+ };
960
979
  endSessionValue = () => {
961
980
  this.saveLog('RM actively exits the meeting')
962
981
  if (streamShare) {
@@ -1183,6 +1202,26 @@ class Video extends Component {
1183
1202
  }
1184
1203
 
1185
1204
  }
1205
+
1206
+ // 敏感词提示
1207
+ let str = this.state.sensitiveTitle || ''
1208
+ if (str)
1209
+ cobj.fillStyle = 'red';
1210
+ cobj.font = "normal lighter 32px sans-serif";
1211
+ const textWidth = Math.min(cobj.measureText(str).width, 610)
1212
+ cobj.fillRect(320 - textWidth/ 2, 24, textWidth, 32)
1213
+ cobj.textAlign = 'center';
1214
+ cobj.strokeStyle = 'white';
1215
+ cobj.lineWidth = 2
1216
+ for (let k = 0; k < str.length; k++) {
1217
+ if (cobj.measureText(str.substring(0, k + 1)).width > 610) {
1218
+ str = str.substring(0, k - 2)
1219
+ str += '...'
1220
+ break;
1221
+ }
1222
+ }
1223
+ cobj.strokeText(str, 320, 50);
1224
+ cobj.stroke();
1186
1225
  };
1187
1226
 
1188
1227
  const captureStream = canvas.captureStream();
@@ -1473,6 +1512,11 @@ class Video extends Component {
1473
1512
  videoList: this.state.videoList
1474
1513
  })
1475
1514
  }
1515
+ } else if (Mival.typeId == 10020) {
1516
+ // 录制服务异常中断,请重试
1517
+ this.messageClick('录制服务异常中断,请重试', 'error')
1518
+ let audio = new Audio(recordErrorAudio)
1519
+ audio.play()
1476
1520
  }
1477
1521
  };
1478
1522
  window.IMOpenfire = msg => {
@@ -1617,6 +1661,7 @@ class Video extends Component {
1617
1661
  if (!this.state.appId && !this.state.sessionType) {
1618
1662
  console.log('cameraValue', this.state.cameraValue)
1619
1663
  this.mpaasSig(data);
1664
+ this.showEnvDetection()
1620
1665
  } else {
1621
1666
  console.log('cameraValue', this.state.cameraValue)
1622
1667
  this.setState({
@@ -1632,6 +1677,7 @@ class Video extends Component {
1632
1677
  this.state.sessionType = false
1633
1678
  this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头', 'error')
1634
1679
  this.roomCallBack(2, '获取设备失败', 1)
1680
+ this.showEnvDetection()
1635
1681
  };
1636
1682
  // 建立连接成功
1637
1683
  this.test_controller.OnConnectOK = () => {
@@ -1729,7 +1775,7 @@ class Video extends Component {
1729
1775
  publish_config.publish_tag = 'tag' + (i+1)
1730
1776
  this.test_controller.Publish(publish_config)
1731
1777
  })
1732
- this.publishAllScreen();
1778
+ // this.publishAllScreen();
1733
1779
 
1734
1780
  this.roomCallBack(1, '', 0)
1735
1781
  this.saveLog('mrtc join room success')
@@ -2714,6 +2760,135 @@ class Video extends Component {
2714
2760
 
2715
2761
 
2716
2762
  };
2763
+
2764
+ const that = this;
2765
+ this.asr_controller.OnGetSign = function(bizName, subBiz, uid) {
2766
+ return 'signature'
2767
+ }
2768
+ // 连接成功回调
2769
+ this.asr_controller.OnAsrConnectOK = function() {
2770
+ // 需要状态控制
2771
+ if (media_status == 1) {
2772
+ return
2773
+ }
2774
+
2775
+ const config_param = {}
2776
+ const biz_name = 'demo'
2777
+ const sub_biz = 'default'
2778
+ const uid = that.props.tellerAccount
2779
+ const sampleRate = 16000
2780
+ const procType = 8
2781
+ config_param.bizName = biz_name
2782
+ config_param.subBiz = sub_biz
2783
+ config_param.uid = uid
2784
+ config_param.sampleRate = sampleRate
2785
+ config_param.procType = procType
2786
+ config_param.mediaStreamType = 2 // 1:麦克风;2:传stream
2787
+ // console.log(test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_)
2788
+ config_param.audio_ = that.test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_
2789
+ config_param.idleTime = 6 // 12s没有识别结果返回通知上层
2790
+ config_param.tag = 'asr_tag0'
2791
+ that.asr_sid = that.asr_controller.TurnOnMicrophone(config_param, config_param.audio_)
2792
+ }
2793
+ // 初始化成功
2794
+ this.asr_controller.OnInitOk = function(sid, tag) {
2795
+ console.log('OnInitOk:')
2796
+ media_status = 1
2797
+ }
2798
+
2799
+ // 初始化失败
2800
+ this.asr_controller.OnInitError = function(sid, code, msg, tag) {
2801
+ console.log('OnInitError:' + msg)
2802
+ that.asr_sid = ''
2803
+ }
2804
+
2805
+ // 识别结果
2806
+ this.asr_controller.OnAsrMessage = function(msg, sid, tag, status) {
2807
+ that.asr_controller.trace(`OnAsrMessage sid=${sid},status=${status},tag=${tag}`)
2808
+ const parse = JSON.parse(msg)
2809
+ const resultValue = parse.value
2810
+ const sentence_id = parse.sentence_id
2811
+ // sentence_id相同,取最后一个值
2812
+ let text = resultValue || ''
2813
+ const sensitiveArr = that.props.sensitiveWords
2814
+ // const regex = new RegExp(sensitiveArr.join('|'), 'g') // /\#{(.+?)\}/g;
2815
+ // text = text.replace(regex, function(r) { return '<span style="background: red;">' + r + '</span>' })
2816
+ let matchArr = sensitiveArr.filter(el => text.includes(el));
2817
+ if (matchArr.length>0) {
2818
+ matchArr.forEach(el => {
2819
+ that.messageClick('检测到敏感词:' + matchArr, 'error')
2820
+ that.state.sensitiveTitle = '检测到敏感词:' + matchArr
2821
+ clearTimeout(that.state.sensitiveTitleTimer)
2822
+ that.state.sensitiveTitleTimer = setTimeout(() => {
2823
+ that.state.sensitiveTitle = ''
2824
+ }, 3000);
2825
+ if (!that.state.sensitiveRecordMap[sentence_id] || !that.state.sensitiveRecordMap[sentence_id].includes(el)){
2826
+ API.addSensitiveRecord({
2827
+ tellerId: that.props.tellerAccount,
2828
+ sessionId: that.state.sessionId,
2829
+ sensitiveWord: el
2830
+ });
2831
+ if (!that.state.sensitiveRecordMap[sentence_id]) {
2832
+ that.state.sensitiveRecordMap[sentence_id] = []
2833
+ }
2834
+ that.state.sensitiveRecordMap[sentence_id].push(el)
2835
+ }
2836
+ })
2837
+ }
2838
+ // that.AsrResultText = text
2839
+ }
2840
+
2841
+ // 停止录音回调
2842
+ this.asr_controller.OnTurnOffMicrophoneOK = function(sid, tag) {
2843
+ media_status = 0
2844
+ that.asr_controller.Disconnect()
2845
+ }
2846
+ this.asr_controller.OnAsrMsgIdle = function(sid, tag) {
2847
+ // that.AsrResultText = ''
2848
+ that.asr_controller.trace('OnAsrMsgIdle')
2849
+ }
2850
+ this.asr_controller.OnAsrDisconnectOK = function() {
2851
+ that.asr_controller.trace('Disconnect is success')
2852
+ }
2853
+
2854
+ }
2855
+ startASR() {
2856
+ // const publish_sid = document.getElementById('publish_video1').name
2857
+
2858
+ if (media_status == 1) {
2859
+ return
2860
+ }
2861
+ this.asr_controller.Connect(this.props.asrServerUrl)
2862
+ message.success({
2863
+ content: '敏感词检测已开启',
2864
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
2865
+ className: 'successClassName',
2866
+ top: 200,
2867
+ // duration: 10
2868
+ })
2869
+ this.state.isAsrStart = true
2870
+ this.state.sensitiveRecordMap = {}
2871
+ // this.AsrResultText = ''
2872
+ }
2873
+ stopASR() {
2874
+ this.state.isAsrStart = false
2875
+ // this.AsrResultText = ''
2876
+ // const { publish_sid } = this.getSidsInfo()
2877
+ if (media_status == 0) {
2878
+ return
2879
+ }
2880
+ this.asr_controller.TurnOffMicrophone(this.asr_sid)
2881
+ // clearInterval(this.asrTimer)
2882
+ // if (this.localRecordStatus && this.client_record_id) {
2883
+ // test_controller.StopRecord(this.client_record_id)
2884
+ // }
2885
+ message.success({
2886
+ content: '敏感词检测已关闭',
2887
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
2888
+ className: 'successClassName',
2889
+ top: 200,
2890
+ // duration: 10
2891
+ })
2717
2892
  }
2718
2893
  videoRecordCallback = async (type, status) => {
2719
2894
  try {
@@ -2799,6 +2974,10 @@ class Video extends Component {
2799
2974
  console.error(err)
2800
2975
  }
2801
2976
  }
2977
+ if (this.state.isAsrStart){
2978
+ this.stopASR()
2979
+ this.asr_controller.Disconnect()
2980
+ }
2802
2981
  if (this.state.imStatus) {
2803
2982
  console.log('disconnect断开连接')
2804
2983
  this.state.manualClose = true
@@ -2923,6 +3102,12 @@ class Video extends Component {
2923
3102
  }
2924
3103
  addToScriptClick = () => {
2925
3104
  const _dependScripts = [
3105
+ // 'http://121.196.19.70/download/asr_api.js',
3106
+ // 'http://121.196.19.70/download/reconnecting-websocket.min.js',
3107
+ // 'http://121.196.19.70/download/resampler.js',
3108
+ this.props.resourcePath + "/asr_api.js",
3109
+ this.props.resourcePath + "/reconnecting-websocket.min.js",
3110
+ this.props.resourcePath + "/resampler.js",
2926
3111
  this.props.resourcePath + "/beauty/beauty_frame_pkg.js",
2927
3112
  this.props.resourcePath + "/adapter.js",
2928
3113
  this.props.resourcePath + "/getMediaInfo.js",
@@ -2967,12 +3152,14 @@ class Video extends Component {
2967
3152
  script.onreadystatechange = () => {
2968
3153
  if (script.readyState == 'loaded' || script.readyState == 'complete') {
2969
3154
  that.test_controller = new McuController();
3155
+ that.asr_controller = new AsrController()
2970
3156
  that.mountClick()
2971
3157
  }
2972
3158
  }
2973
3159
  } else {
2974
3160
  script.onload = () => {
2975
3161
  that.test_controller = new McuController();
3162
+ that.asr_controller = new AsrController()
2976
3163
  that.mountClick()
2977
3164
  }
2978
3165
  }
@@ -2995,7 +3182,7 @@ class Video extends Component {
2995
3182
  }
2996
3183
  }
2997
3184
  componentWillMount() {
2998
- console.log('hsbc_teller_sdk', '2.0.4')
3185
+ console.log('hsbc_teller_sdk', '2.0.6')
2999
3186
  let arr = []
3000
3187
  for(let i=1;i<=12;i++){
3001
3188
  arr.push({
@@ -4553,6 +4740,114 @@ class Video extends Component {
4553
4740
  this.test_controller.GetDevices()
4554
4741
  }
4555
4742
  }
4743
+ toggleAsr = () => {
4744
+ if (this.isFileSuccuse()) {
4745
+ if (!this.state.isAsrStart){
4746
+ this.startASR()
4747
+ } else {
4748
+ this.stopASR()
4749
+ }
4750
+ }
4751
+ }
4752
+ showEnvDetection = () => {
4753
+ this.envDetection()
4754
+ this.setState({
4755
+ isModalVisibleEnvironment: true,
4756
+ })
4757
+ }
4758
+
4759
+ envDetection = () => {
4760
+ let self = this
4761
+ let envInfo = {
4762
+ batteryCharging: '未知', // 电池充电
4763
+ batteryLevel: '未知', // 电池电量
4764
+ networkStatus: '未知', // 网络状态 (已连接/未连接)
4765
+ cameraResult: this.state.cameraList.length>0 ? '合格': '不合格', // 摄像头检测
4766
+ microResult: this.state.microphoneList.length>0 ? '合格': '不合格', // 麦克风检测
4767
+ jsHeapSizeLimit: '未知', // 上下文内可用堆的最大体积
4768
+ totalJSHeapSize: '未知', // 已分配的堆体积
4769
+ usedJSHeapSize: '未知', // 当前 JS 堆活跃段(segment)的体积
4770
+ }
4771
+
4772
+ if (navigator) {
4773
+ // 电量检测
4774
+ navigator.getBattery().then(function(battery) {
4775
+ // console.log(battery)
4776
+ // 是否正在充电,yes-充电
4777
+ envInfo.batteryCharging = (battery.charging ? "正在充电" : "不在充电")
4778
+ // 当前剩余电量
4779
+ envInfo.batteryLevel = battery.level * 100 + "%"
4780
+ envInfo.batteryResult = (battery.charging )? '合格': '不合格'
4781
+ self.setState({
4782
+ envInfo: envInfo
4783
+ })
4784
+ battery.removeEventListener("chargingchange", self.envDetection);
4785
+ battery.removeEventListener("levelchange", self.envDetection);
4786
+ battery.addEventListener("chargingchange", self.envDetection);
4787
+ battery.addEventListener("levelchange", self.envDetection);
4788
+ });
4789
+
4790
+ // 网络检测
4791
+ envInfo.networkStatus = window.navigator.onLine? '已连接': '未连接'
4792
+ envInfo.networkResult = window.navigator.onLine? '合格': '不合格'
4793
+ window.removeEventListener("offline", self.envDetection);
4794
+ window.removeEventListener("online", self.envDetection);
4795
+ window.addEventListener("offline", self.envDetection);
4796
+ window.addEventListener("online", self.envDetection);
4797
+ if (navigator.connection){
4798
+ function setNetworkInfo() {
4799
+ const { rtt, downlink, effectiveType, saveData } = navigator.connection;
4800
+ // console.log(`有效网络连接类型: ${effectiveType}`);
4801
+ // console.log(`估算的下行速度/带宽: ${downlink}Mb/s`);
4802
+ // console.log(`估算的往返时间: ${rtt}ms`);
4803
+ if (!window.navigator.onLine) {envInfo.networkInfo = ''}
4804
+ else envInfo.networkInfo = `等效网络类型:${effectiveType};预估下行速度/带宽:${downlink}Mb/s;预估往返延时:${rtt}ms`
4805
+ }
4806
+ setNetworkInfo()
4807
+ navigator.connection.removeEventListener('change', self.envDetection);
4808
+ navigator.connection.addEventListener('change', self.envDetection);
4809
+ }
4810
+
4811
+ }
4812
+ // 内存检测
4813
+ if (performance.memory) {
4814
+ const filterSize = (size) => {
4815
+ if (!size) return ''
4816
+ if (size < pow1024(1)) return size + ' B'
4817
+ if (size < pow1024(2)) return (size / pow1024(1)).toFixed(2) + ' KB'
4818
+ if (size < pow1024(3)) return (size / pow1024(2)).toFixed(2) + ' MB'
4819
+ if (size < pow1024(4)) return (size / pow1024(3)).toFixed(2) + ' GB'
4820
+ return (size / pow1024(4)).toFixed(2) + ' TB'
4821
+ }
4822
+
4823
+ function pow1024(num) {
4824
+ return Math.pow(1024, num)
4825
+ }
4826
+ envInfo.jsHeapSizeLimit = filterSize(performance.memory.jsHeapSizeLimit)
4827
+ envInfo.totalJSHeapSize = filterSize(performance.memory.totalJSHeapSize)
4828
+ envInfo.usedJSHeapSize = filterSize(performance.memory.usedJSHeapSize)
4829
+ // console.log('上下文内可用堆的最大体积', envInfo.jsHeapSizeLimit)
4830
+ // console.log('已分配的堆体积', envInfo.totalJSHeapSize)
4831
+ // console.log('当前 JS 堆活跃段(segment)的体积', envInfo.usedJSHeapSize)
4832
+ envInfo.memoryResult = '合格'
4833
+ }
4834
+
4835
+
4836
+ this.setState({
4837
+ // isModalVisibleEnvironment: true,
4838
+ envInfo: envInfo
4839
+ })
4840
+ }
4841
+ handleOkEnvDetection = () => {
4842
+ this.setState({
4843
+ isModalVisibleEnvironment: false,
4844
+ })
4845
+ }
4846
+ // handleCancelEnvDetection = () => {
4847
+ // this.setState({
4848
+ // isModalVisibleEnvironment: false
4849
+ // })
4850
+ // }
4556
4851
  handleOkInspection = () => {
4557
4852
  this.setState({
4558
4853
  isModalVisibleInspection: false,
@@ -5422,8 +5717,11 @@ class Video extends Component {
5422
5717
  invitationClick={this.invitationClick}
5423
5718
  customerFaceClick={this.customerFaceClick}
5424
5719
  ocrClick={this.ocrClick}
5720
+ paperOcrClick={this.paperOcrClick}
5425
5721
  switchExternal={this.switchExternal}
5426
5722
  inspection={this.inspection}
5723
+ toggleAsr={this.toggleAsr}
5724
+ envDetection={this.showEnvDetection}
5427
5725
  beautyClick={this.beautyClick}
5428
5726
  graffiti={this.graffiti}
5429
5727
  virtualization={this.virtualization}
@@ -5785,6 +6083,51 @@ class Video extends Component {
5785
6083
 
5786
6084
  </div>
5787
6085
  </Modal>
6086
+ <Modal title="环境检测" maskClosable={false} width={650} closable={false} centered={true} visible={this.state.isModalVisibleEnvironment} footer={[
6087
+ <div key='env'>
6088
+ {/* <Button className="modelButtonCancel" onClick={this.handleCancelEnvDetection}>取消</Button> */}
6089
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkEnvDetection}>确定</Button>
6090
+ </div>
6091
+ ]}>
6092
+ <Collapse defaultActiveKey={['1', '2', '3', '4', '5']} ghost>
6093
+
6094
+ <Panel header={'网络检测 - ' +this.state.envInfo.networkResult} key="5" className={this.state.envInfo.networkResult=='不合格'? 'panel-error':''} >
6095
+ <p className='envClass'>网络状态:{this.state.envInfo.networkStatus}</p>
6096
+ {this.state.envInfo.networkInfo?<p className='envClass'>{this.state.envInfo.networkInfo}</p>:null}
6097
+ </Panel>
6098
+ <Panel header={'设备电量 - ' +this.state.envInfo.batteryResult} key="2" className={this.state.envInfo.batteryResult=='不合格'? 'panel-error':''}>
6099
+ <p className='envClass'>电量:{this.state.envInfo.batteryLevel}({this.state.envInfo.batteryCharging})</p>
6100
+ </Panel>
6101
+ <Panel header={'内存检测 - ' +this.state.envInfo.memoryResult} key="1" className={this.state.envInfo.memoryResult=='不合格'? 'panel-error':''}>
6102
+ <p className='envClass'>最大可用内存:{this.state.envInfo.jsHeapSizeLimit} ;当前已使用:{this.state.envInfo.usedJSHeapSize} </p>
6103
+ </Panel>
6104
+ <Panel header={'摄像头设备 - ' +this.state.envInfo.cameraResult} key="3" className={this.state.envInfo.cameraResult=='不合格'? 'panel-error':''}>
6105
+ <div >
6106
+ {
6107
+ this.state.cameraList.map((item, index) => {
6108
+ return <div key={index} className="envClass">
6109
+ {/* <input type="radio" name="camere" value={item.actionid} style={{ float: 'left' }} checked={this.state.cameraValue == item.actionid} readOnly disabled /><i></i> */}
6110
+ {item.actionname}{this.state.cameraValue == item.actionid ? '(当前设备)' : ''}
6111
+ </div>
6112
+ })
6113
+ }
6114
+ {this.state.cameraList.length == 0 ? <p className="envClass">获取不到摄像头设备,请检查</p> : null}
6115
+ </div>
6116
+ </Panel>
6117
+ <Panel header={'麦克风设备 - ' +this.state.envInfo.microResult} key="4" className={this.state.envInfo.microResult=='不合格'? 'panel-error':''}>
6118
+ <div>
6119
+ {
6120
+ this.state.microphoneList.map((item, index) => {
6121
+ return <div key={index} className="envClass">
6122
+ {item.actionname}{this.state.microphoneValue == item.actionid ? '(当前设备)' : ''}
6123
+ </div>
6124
+ })
6125
+ }
6126
+ {this.state.cameraList.length == 0 ? <p className="envClass">获取不到麦克风设备,请检查</p> : null}
6127
+ </div>
6128
+ </Panel>
6129
+ </Collapse>
6130
+ </Modal>
5788
6131
  <video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
5789
6132
  <video className="mixedvideo" id="manedvideo" autoPlay width="0" height="0"></video>
5790
6133
  <video className="mixedvideo" id="video30" autoPlay width="0" height="0"></video>
@@ -5806,7 +6149,7 @@ Video.defaultProps = {
5806
6149
  callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
5807
6150
  // roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
5808
6151
  roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
5809
-
6152
+ asrServerUrl: 'wss://ismis.alipay.com/ws',
5810
6153
  resourcePath: 'https://counter-web.leimondata.cn:7199',
5811
6154
  // resourcePath: 'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
5812
6155
  prohbiitPrompt: '当前无客户',
@@ -5816,8 +6159,9 @@ Video.defaultProps = {
5816
6159
  microphoneSize: 25,
5817
6160
  fontSize: '14',
5818
6161
  fontFamily: 'auto',
5819
- menus: ['BOARD', 'SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY', 'GRAFFITI', 'BACKGROUND'],
6162
+ menus: ['BOARD', 'SHARE', 'FRIES', 'OCR', 'PAPER_OCR', 'INVITE', 'PIP', 'BEAUTY', 'GRAFFITI', 'BACKGROUND'],
5820
6163
  customLeaveRoom: '客户离开房间',
6164
+ sensitiveWords: ['保本保息', '无风险'],
5821
6165
  meetingInfo: {
5822
6166
  title: '--',
5823
6167
  host: '--',
@@ -328,6 +328,16 @@
328
328
  padding: 6px 13px;
329
329
  }
330
330
  }
331
+ .envClass {
332
+ margin-bottom: 0;
333
+ padding-left: 1.25rem;
334
+ }
335
+ .ant-collapse > .ant-collapse-item > .ant-collapse-header{
336
+ font-weight: bold;
337
+ }
338
+ .ant-collapse > .ant-collapse-item.panel-error > .ant-collapse-header{
339
+ color: red;
340
+ }
331
341
  .voiceClass{
332
342
  width: 25Px;
333
343
  height: 25.3Px;