react_hsbc_teller 2.0.3 → 2.0.5

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.3",
3
+ "version": "2.0.5",
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
@@ -47,6 +47,12 @@ export default class foot extends Component {
47
47
  inspection = ()=>{
48
48
  this.props.inspection()
49
49
  }
50
+ envDetection = () => {
51
+ this.props.envDetection()
52
+ }
53
+ toggleAsr = ()=>{
54
+ this.props.toggleAsr()
55
+ }
50
56
  switchExternal=()=>{
51
57
  this.props.switchExternal()
52
58
  }
@@ -199,6 +205,22 @@ export default class foot extends Component {
199
205
  </div>
200
206
  </div>
201
207
  </div>
208
+ <div className='footHover' onClick={this.envDetection.bind(this)}>
209
+ <div className="one">
210
+ <img className="imgClass" src={require("../../assets/img/icon_env.png").default} alt="" />
211
+ <div className="text">
212
+ 环境检测
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <div className='footHover' onClick={this.toggleAsr.bind(this)}>
217
+ <div className="one">
218
+ <img className="imgClass" src={require("../../assets/img/icon_asr.png").default} alt="" />
219
+ <div className="text">
220
+ ASR检测
221
+ </div>
222
+ </div>
223
+ </div>
202
224
  </div>
203
225
  {defaultList}
204
226
 
@@ -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.3&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.5&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
 
@@ -1183,6 +1190,25 @@ class Video extends Component {
1183
1190
  }
1184
1191
 
1185
1192
  }
1193
+
1194
+ // 敏感词提示
1195
+ let str = this.state.sensitiveTitle || ''
1196
+ if (str)
1197
+ cobj.fillStyle = 'red';
1198
+ const textWidth = Math.min(cobj.measureText(str).width, 610)
1199
+ cobj.fillRect(320 - textWidth/ 2, 26, textWidth, 32)
1200
+ cobj.textAlign = 'center';
1201
+ cobj.strokeStyle = 'white';
1202
+ cobj.lineWidth = 2
1203
+ for (let k = 0; k < str.length; k++) {
1204
+ if (cobj.measureText(str.substring(0, k + 1)).width > 610) {
1205
+ str = str.substring(0, k - 2)
1206
+ str += '...'
1207
+ break;
1208
+ }
1209
+ }
1210
+ cobj.strokeText(str, 320, 50);
1211
+ cobj.stroke();
1186
1212
  };
1187
1213
 
1188
1214
  const captureStream = canvas.captureStream();
@@ -1473,6 +1499,11 @@ class Video extends Component {
1473
1499
  videoList: this.state.videoList
1474
1500
  })
1475
1501
  }
1502
+ } else if (Mival.typeId == 10020) {
1503
+ // 录制服务异常中断,请重试
1504
+ this.messageClick('录制服务异常中断,请重试', 'error')
1505
+ let audio = new Audio(recordErrorAudio)
1506
+ audio.play()
1476
1507
  }
1477
1508
  };
1478
1509
  window.IMOpenfire = msg => {
@@ -1617,6 +1648,7 @@ class Video extends Component {
1617
1648
  if (!this.state.appId && !this.state.sessionType) {
1618
1649
  console.log('cameraValue', this.state.cameraValue)
1619
1650
  this.mpaasSig(data);
1651
+ this.showEnvDetection()
1620
1652
  } else {
1621
1653
  console.log('cameraValue', this.state.cameraValue)
1622
1654
  this.setState({
@@ -1632,6 +1664,7 @@ class Video extends Component {
1632
1664
  this.state.sessionType = false
1633
1665
  this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头', 'error')
1634
1666
  this.roomCallBack(2, '获取设备失败', 1)
1667
+ this.showEnvDetection()
1635
1668
  };
1636
1669
  // 建立连接成功
1637
1670
  this.test_controller.OnConnectOK = () => {
@@ -1843,23 +1876,7 @@ class Video extends Component {
1843
1876
  if (publish_tag == 'tag1') {
1844
1877
  console.log('tag1', stream)
1845
1878
  let newStream = stream;
1846
- // if (stream.getVideoTracks()[0]) {
1847
- // await startBeauty(newStream);
1848
- // newStream = beautyCaptureStream();
1849
- // // 清理原始流
1850
- // newStream.oninactive = function () {
1851
- // clearOriginStream(stream);
1852
- // };
1853
- // newStream.getVideoTracks()[0].onended = function () {
1854
- // clearOriginStream(stream);
1855
- // };
1856
- // function clearOriginStream(stream) {
1857
- // stream.getTracks().forEach((track) => {
1858
- // track.stop();
1859
- // });
1860
- // stream = null;
1861
- // }
1862
- // };
1879
+
1863
1880
  if (stream.getVideoTracks()[0]) {
1864
1881
  await startBeauty(newStream);
1865
1882
  newStream = beautyCaptureStream();
@@ -1886,8 +1903,7 @@ class Video extends Component {
1886
1903
  }
1887
1904
 
1888
1905
  if (publish_tag == 'projectionWhiteboard' && publish_device == 2) {
1889
- // this.graffiti()
1890
- console.log('projectionWhiteboard', stream)
1906
+
1891
1907
  let newStream1 = stream;
1892
1908
  if (stream.getVideoTracks()[0]) {
1893
1909
  if (this.state.operateShow) {
@@ -1904,6 +1920,8 @@ class Video extends Component {
1904
1920
  }
1905
1921
 
1906
1922
  newStream1 = mixCaptureStream();
1923
+ newStream1.getVideoTracks()[0].contentHint = "text"; // 解决清晰度问题
1924
+
1907
1925
  console.log('projectionWhiteboard1', newStream1)
1908
1926
  // 清理原始流
1909
1927
  newStream1.oninactive = function () {
@@ -2729,6 +2747,135 @@ class Video extends Component {
2729
2747
 
2730
2748
 
2731
2749
  };
2750
+
2751
+ const that = this;
2752
+ this.asr_controller.OnGetSign = function(bizName, subBiz, uid) {
2753
+ return 'signature'
2754
+ }
2755
+ // 连接成功回调
2756
+ this.asr_controller.OnAsrConnectOK = function() {
2757
+ // 需要状态控制
2758
+ if (media_status == 1) {
2759
+ return
2760
+ }
2761
+
2762
+ const config_param = {}
2763
+ const biz_name = 'demo'
2764
+ const sub_biz = 'default'
2765
+ const uid = that.props.tellerAccount
2766
+ const sampleRate = 16000
2767
+ const procType = 8
2768
+ config_param.bizName = biz_name
2769
+ config_param.subBiz = sub_biz
2770
+ config_param.uid = uid
2771
+ config_param.sampleRate = sampleRate
2772
+ config_param.procType = procType
2773
+ config_param.mediaStreamType = 2 // 1:麦克风;2:传stream
2774
+ // console.log(test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_)
2775
+ config_param.audio_ = that.test_controller.GetMediaInfo(document.getElementById('publish_video1').name).audio_
2776
+ config_param.idleTime = 6 // 12s没有识别结果返回通知上层
2777
+ config_param.tag = 'asr_tag0'
2778
+ that.asr_sid = that.asr_controller.TurnOnMicrophone(config_param, config_param.audio_)
2779
+ }
2780
+ // 初始化成功
2781
+ this.asr_controller.OnInitOk = function(sid, tag) {
2782
+ console.log('OnInitOk:')
2783
+ media_status = 1
2784
+ }
2785
+
2786
+ // 初始化失败
2787
+ this.asr_controller.OnInitError = function(sid, code, msg, tag) {
2788
+ console.log('OnInitError:' + msg)
2789
+ that.asr_sid = ''
2790
+ }
2791
+
2792
+ // 识别结果
2793
+ this.asr_controller.OnAsrMessage = function(msg, sid, tag, status) {
2794
+ that.asr_controller.trace(`OnAsrMessage sid=${sid},status=${status},tag=${tag}`)
2795
+ const parse = JSON.parse(msg)
2796
+ const resultValue = parse.value
2797
+ const sentence_id = parse.sentence_id
2798
+ // sentence_id相同,取最后一个值
2799
+ let text = resultValue || ''
2800
+ const sensitiveArr = that.props.sensitiveWords
2801
+ // const regex = new RegExp(sensitiveArr.join('|'), 'g') // /\#{(.+?)\}/g;
2802
+ // text = text.replace(regex, function(r) { return '<span style="background: red;">' + r + '</span>' })
2803
+ let matchArr = sensitiveArr.filter(el => text.includes(el));
2804
+ if (matchArr.length>0) {
2805
+ matchArr.forEach(el => {
2806
+ that.messageClick('检测到敏感词:' + matchArr, 'error')
2807
+ that.state.sensitiveTitle = '检测到敏感词:' + matchArr
2808
+ clearTimeout(that.state.sensitiveTitleTimer)
2809
+ that.state.sensitiveTitleTimer = setTimeout(() => {
2810
+ that.state.sensitiveTitle = ''
2811
+ }, 3000);
2812
+ if (!that.state.sensitiveRecordMap[sentence_id] || !that.state.sensitiveRecordMap[sentence_id].includes(el)){
2813
+ API.addSensitiveRecord({
2814
+ tellerId: that.props.tellerAccount,
2815
+ sessionId: that.state.sessionId,
2816
+ sensitiveWord: el
2817
+ });
2818
+ if (!that.state.sensitiveRecordMap[sentence_id]) {
2819
+ that.state.sensitiveRecordMap[sentence_id] = []
2820
+ }
2821
+ that.state.sensitiveRecordMap[sentence_id].push(el)
2822
+ }
2823
+ })
2824
+ }
2825
+ // that.AsrResultText = text
2826
+ }
2827
+
2828
+ // 停止录音回调
2829
+ this.asr_controller.OnTurnOffMicrophoneOK = function(sid, tag) {
2830
+ media_status = 0
2831
+ that.asr_controller.Disconnect()
2832
+ }
2833
+ this.asr_controller.OnAsrMsgIdle = function(sid, tag) {
2834
+ // that.AsrResultText = ''
2835
+ that.asr_controller.trace('OnAsrMsgIdle')
2836
+ }
2837
+ this.asr_controller.OnAsrDisconnectOK = function() {
2838
+ that.asr_controller.trace('Disconnect is success')
2839
+ }
2840
+
2841
+ }
2842
+ startASR() {
2843
+ // const publish_sid = document.getElementById('publish_video1').name
2844
+
2845
+ if (media_status == 1) {
2846
+ return
2847
+ }
2848
+ this.asr_controller.Connect(this.props.asrServerUrl)
2849
+ message.success({
2850
+ content: '敏感词检测已开启',
2851
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
2852
+ className: 'successClassName',
2853
+ top: 200,
2854
+ // duration: 10
2855
+ })
2856
+ this.state.isAsrStart = true
2857
+ this.state.sensitiveRecordMap = {}
2858
+ // this.AsrResultText = ''
2859
+ }
2860
+ stopASR() {
2861
+ this.state.isAsrStart = false
2862
+ // this.AsrResultText = ''
2863
+ // const { publish_sid } = this.getSidsInfo()
2864
+ if (media_status == 0) {
2865
+ return
2866
+ }
2867
+ this.asr_controller.TurnOffMicrophone(this.asr_sid)
2868
+ // clearInterval(this.asrTimer)
2869
+ // if (this.localRecordStatus && this.client_record_id) {
2870
+ // test_controller.StopRecord(this.client_record_id)
2871
+ // }
2872
+ message.success({
2873
+ content: '敏感词检测已关闭',
2874
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
2875
+ className: 'successClassName',
2876
+ top: 200,
2877
+ // duration: 10
2878
+ })
2732
2879
  }
2733
2880
  videoRecordCallback = async (type, status) => {
2734
2881
  try {
@@ -2814,6 +2961,10 @@ class Video extends Component {
2814
2961
  console.error(err)
2815
2962
  }
2816
2963
  }
2964
+ if (this.state.isAsrStart){
2965
+ this.stopASR()
2966
+ this.asr_controller.Disconnect()
2967
+ }
2817
2968
  if (this.state.imStatus) {
2818
2969
  console.log('disconnect断开连接')
2819
2970
  this.state.manualClose = true
@@ -2938,6 +3089,12 @@ class Video extends Component {
2938
3089
  }
2939
3090
  addToScriptClick = () => {
2940
3091
  const _dependScripts = [
3092
+ // 'http://121.196.19.70/download/asr_api.js',
3093
+ // 'http://121.196.19.70/download/reconnecting-websocket.min.js',
3094
+ // 'http://121.196.19.70/download/resampler.js',
3095
+ this.props.resourcePath + "/asr_api.js",
3096
+ this.props.resourcePath + "/reconnecting-websocket.min.js",
3097
+ this.props.resourcePath + "/resampler.js",
2941
3098
  this.props.resourcePath + "/beauty/beauty_frame_pkg.js",
2942
3099
  this.props.resourcePath + "/adapter.js",
2943
3100
  this.props.resourcePath + "/getMediaInfo.js",
@@ -2982,12 +3139,14 @@ class Video extends Component {
2982
3139
  script.onreadystatechange = () => {
2983
3140
  if (script.readyState == 'loaded' || script.readyState == 'complete') {
2984
3141
  that.test_controller = new McuController();
3142
+ that.asr_controller = new AsrController()
2985
3143
  that.mountClick()
2986
3144
  }
2987
3145
  }
2988
3146
  } else {
2989
3147
  script.onload = () => {
2990
3148
  that.test_controller = new McuController();
3149
+ that.asr_controller = new AsrController()
2991
3150
  that.mountClick()
2992
3151
  }
2993
3152
  }
@@ -3010,7 +3169,7 @@ class Video extends Component {
3010
3169
  }
3011
3170
  }
3012
3171
  componentWillMount() {
3013
- console.log('hsbc_teller_sdk', '2.0.3')
3172
+ console.log('hsbc_teller_sdk', '2.0.5')
3014
3173
  let arr = []
3015
3174
  for(let i=1;i<=12;i++){
3016
3175
  arr.push({
@@ -4568,6 +4727,114 @@ class Video extends Component {
4568
4727
  this.test_controller.GetDevices()
4569
4728
  }
4570
4729
  }
4730
+ toggleAsr = () => {
4731
+ if (this.isFileSuccuse()) {
4732
+ if (!this.state.isAsrStart){
4733
+ this.startASR()
4734
+ } else {
4735
+ this.stopASR()
4736
+ }
4737
+ }
4738
+ }
4739
+ showEnvDetection = () => {
4740
+ this.envDetection()
4741
+ this.setState({
4742
+ isModalVisibleEnvironment: true,
4743
+ })
4744
+ }
4745
+
4746
+ envDetection = () => {
4747
+ let self = this
4748
+ let envInfo = {
4749
+ batteryCharging: '未知', // 电池充电
4750
+ batteryLevel: '未知', // 电池电量
4751
+ networkStatus: '未知', // 网络状态 (已连接/未连接)
4752
+ cameraResult: this.state.cameraList.length>0 ? '合格': '不合格', // 摄像头检测
4753
+ microResult: this.state.microphoneList.length>0 ? '合格': '不合格', // 麦克风检测
4754
+ jsHeapSizeLimit: '未知', // 上下文内可用堆的最大体积
4755
+ totalJSHeapSize: '未知', // 已分配的堆体积
4756
+ usedJSHeapSize: '未知', // 当前 JS 堆活跃段(segment)的体积
4757
+ }
4758
+
4759
+ if (navigator) {
4760
+ // 电量检测
4761
+ navigator.getBattery().then(function(battery) {
4762
+ // console.log(battery)
4763
+ // 是否正在充电,yes-充电
4764
+ envInfo.batteryCharging = (battery.charging ? "正在充电" : "不在充电")
4765
+ // 当前剩余电量
4766
+ envInfo.batteryLevel = battery.level * 100 + "%"
4767
+ envInfo.batteryResult = (battery.charging )? '合格': '不合格'
4768
+ self.setState({
4769
+ envInfo: envInfo
4770
+ })
4771
+ battery.removeEventListener("chargingchange", self.envDetection);
4772
+ battery.removeEventListener("levelchange", self.envDetection);
4773
+ battery.addEventListener("chargingchange", self.envDetection);
4774
+ battery.addEventListener("levelchange", self.envDetection);
4775
+ });
4776
+
4777
+ // 网络检测
4778
+ envInfo.networkStatus = window.navigator.onLine? '已连接': '未连接'
4779
+ envInfo.networkResult = window.navigator.onLine? '合格': '不合格'
4780
+ window.removeEventListener("offline", self.envDetection);
4781
+ window.removeEventListener("online", self.envDetection);
4782
+ window.addEventListener("offline", self.envDetection);
4783
+ window.addEventListener("online", self.envDetection);
4784
+ if (navigator.connection){
4785
+ function setNetworkInfo() {
4786
+ const { rtt, downlink, effectiveType, saveData } = navigator.connection;
4787
+ // console.log(`有效网络连接类型: ${effectiveType}`);
4788
+ // console.log(`估算的下行速度/带宽: ${downlink}Mb/s`);
4789
+ // console.log(`估算的往返时间: ${rtt}ms`);
4790
+ if (!window.navigator.onLine) {envInfo.networkInfo = ''}
4791
+ else envInfo.networkInfo = `等效网络类型:${effectiveType};预估下行速度/带宽:${downlink}Mb/s;预估往返延时:${rtt}ms`
4792
+ }
4793
+ setNetworkInfo()
4794
+ navigator.connection.removeEventListener('change', self.envDetection);
4795
+ navigator.connection.addEventListener('change', self.envDetection);
4796
+ }
4797
+
4798
+ }
4799
+ // 内存检测
4800
+ if (performance.memory) {
4801
+ const filterSize = (size) => {
4802
+ if (!size) return ''
4803
+ if (size < pow1024(1)) return size + ' B'
4804
+ if (size < pow1024(2)) return (size / pow1024(1)).toFixed(2) + ' KB'
4805
+ if (size < pow1024(3)) return (size / pow1024(2)).toFixed(2) + ' MB'
4806
+ if (size < pow1024(4)) return (size / pow1024(3)).toFixed(2) + ' GB'
4807
+ return (size / pow1024(4)).toFixed(2) + ' TB'
4808
+ }
4809
+
4810
+ function pow1024(num) {
4811
+ return Math.pow(1024, num)
4812
+ }
4813
+ envInfo.jsHeapSizeLimit = filterSize(performance.memory.jsHeapSizeLimit)
4814
+ envInfo.totalJSHeapSize = filterSize(performance.memory.totalJSHeapSize)
4815
+ envInfo.usedJSHeapSize = filterSize(performance.memory.usedJSHeapSize)
4816
+ // console.log('上下文内可用堆的最大体积', envInfo.jsHeapSizeLimit)
4817
+ // console.log('已分配的堆体积', envInfo.totalJSHeapSize)
4818
+ // console.log('当前 JS 堆活跃段(segment)的体积', envInfo.usedJSHeapSize)
4819
+ envInfo.memoryResult = '合格'
4820
+ }
4821
+
4822
+
4823
+ this.setState({
4824
+ // isModalVisibleEnvironment: true,
4825
+ envInfo: envInfo
4826
+ })
4827
+ }
4828
+ handleOkEnvDetection = () => {
4829
+ this.setState({
4830
+ isModalVisibleEnvironment: false,
4831
+ })
4832
+ }
4833
+ // handleCancelEnvDetection = () => {
4834
+ // this.setState({
4835
+ // isModalVisibleEnvironment: false
4836
+ // })
4837
+ // }
4571
4838
  handleOkInspection = () => {
4572
4839
  this.setState({
4573
4840
  isModalVisibleInspection: false,
@@ -5439,6 +5706,8 @@ class Video extends Component {
5439
5706
  ocrClick={this.ocrClick}
5440
5707
  switchExternal={this.switchExternal}
5441
5708
  inspection={this.inspection}
5709
+ toggleAsr={this.toggleAsr}
5710
+ envDetection={this.showEnvDetection}
5442
5711
  beautyClick={this.beautyClick}
5443
5712
  graffiti={this.graffiti}
5444
5713
  virtualization={this.virtualization}
@@ -5800,6 +6069,51 @@ class Video extends Component {
5800
6069
 
5801
6070
  </div>
5802
6071
  </Modal>
6072
+ <Modal title="环境检测" maskClosable={false} width={650} closable={false} centered={true} visible={this.state.isModalVisibleEnvironment} footer={[
6073
+ <div key='env'>
6074
+ {/* <Button className="modelButtonCancel" onClick={this.handleCancelEnvDetection}>取消</Button> */}
6075
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkEnvDetection}>确定</Button>
6076
+ </div>
6077
+ ]}>
6078
+ <Collapse defaultActiveKey={['1', '2', '3', '4', '5']} ghost>
6079
+
6080
+ <Panel header={'网络检测 - ' +this.state.envInfo.networkResult} key="5" className={this.state.envInfo.networkResult=='不合格'? 'panel-error':''} >
6081
+ <p className='envClass'>网络状态:{this.state.envInfo.networkStatus}</p>
6082
+ {this.state.envInfo.networkInfo?<p className='envClass'>{this.state.envInfo.networkInfo}</p>:null}
6083
+ </Panel>
6084
+ <Panel header={'设备电量 - ' +this.state.envInfo.batteryResult} key="2" className={this.state.envInfo.batteryResult=='不合格'? 'panel-error':''}>
6085
+ <p className='envClass'>电量:{this.state.envInfo.batteryLevel}({this.state.envInfo.batteryCharging})</p>
6086
+ </Panel>
6087
+ <Panel header={'内存检测 - ' +this.state.envInfo.memoryResult} key="1" className={this.state.envInfo.memoryResult=='不合格'? 'panel-error':''}>
6088
+ <p className='envClass'>最大可用内存:{this.state.envInfo.jsHeapSizeLimit} ;当前已使用:{this.state.envInfo.usedJSHeapSize} </p>
6089
+ </Panel>
6090
+ <Panel header={'摄像头设备 - ' +this.state.envInfo.cameraResult} key="3" className={this.state.envInfo.cameraResult=='不合格'? 'panel-error':''}>
6091
+ <div >
6092
+ {
6093
+ this.state.cameraList.map((item, index) => {
6094
+ return <div key={index} className="envClass">
6095
+ {/* <input type="radio" name="camere" value={item.actionid} style={{ float: 'left' }} checked={this.state.cameraValue == item.actionid} readOnly disabled /><i></i> */}
6096
+ {item.actionname}{this.state.cameraValue == item.actionid ? '(当前设备)' : ''}
6097
+ </div>
6098
+ })
6099
+ }
6100
+ {this.state.cameraList.length == 0 ? <p className="envClass">获取不到摄像头设备,请检查</p> : null}
6101
+ </div>
6102
+ </Panel>
6103
+ <Panel header={'麦克风设备 - ' +this.state.envInfo.microResult} key="4" className={this.state.envInfo.microResult=='不合格'? 'panel-error':''}>
6104
+ <div>
6105
+ {
6106
+ this.state.microphoneList.map((item, index) => {
6107
+ return <div key={index} className="envClass">
6108
+ {item.actionname}{this.state.microphoneValue == item.actionid ? '(当前设备)' : ''}
6109
+ </div>
6110
+ })
6111
+ }
6112
+ {this.state.cameraList.length == 0 ? <p className="envClass">获取不到麦克风设备,请检查</p> : null}
6113
+ </div>
6114
+ </Panel>
6115
+ </Collapse>
6116
+ </Modal>
5803
6117
  <video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
5804
6118
  <video className="mixedvideo" id="manedvideo" autoPlay width="0" height="0"></video>
5805
6119
  <video className="mixedvideo" id="video30" autoPlay width="0" height="0"></video>
@@ -5821,7 +6135,7 @@ Video.defaultProps = {
5821
6135
  callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
5822
6136
  // roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
5823
6137
  roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
5824
-
6138
+ asrServerUrl: 'wss://ismis.alipay.com/ws',
5825
6139
  resourcePath: 'https://counter-web.leimondata.cn:7199',
5826
6140
  // resourcePath: 'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
5827
6141
  prohbiitPrompt: '当前无客户',
@@ -5833,6 +6147,7 @@ Video.defaultProps = {
5833
6147
  fontFamily: 'auto',
5834
6148
  menus: ['BOARD', 'SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY', 'GRAFFITI', 'BACKGROUND'],
5835
6149
  customLeaveRoom: '客户离开房间',
6150
+ sensitiveWords: ['保本保息', '无风险'],
5836
6151
  meetingInfo: {
5837
6152
  title: '--',
5838
6153
  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;