react_hsbc_teller 2.0.26 → 2.0.27

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.26",
3
+ "version": "2.0.27",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -33,7 +33,7 @@ roomId
33
33
  // resourcePath: 'https://counter-web.leimondata.cn:7199',
34
34
  // resourcePath:'http://121.196.19.70:8027/',
35
35
  roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
36
- baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuulsit/api/leimon-counter-api',
36
+ baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
37
37
  resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
38
38
  prohibitPrompt: '无客户',
39
39
  titleBackground: '#40a9ff',
@@ -192,6 +192,10 @@ userExit =(val)=>{
192
192
 
193
193
  })
194
194
  }
195
+ componentDidCatch(error, info) {
196
+ console.log('componentDidCatch')
197
+ console.error(error, info)
198
+ }
195
199
  render() {
196
200
  return (
197
201
  <div className="test">
@@ -58,7 +58,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
58
58
  import axios from 'axios';
59
59
  import CryptoJS from "crypto-js";
60
60
 
61
- const SDK_VERISON = '2.0.26'
61
+ const SDK_VERISON = '2.0.27'
62
62
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
63
63
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
64
64
  const { Option } = Select;
@@ -139,6 +139,7 @@ function clearStreamRemain() {
139
139
  beautyDiv.beauty_canvas = null;
140
140
  }
141
141
  if (!(beautyDiv.beauty_player == null || beautyDiv.beauty_player == undefined)) {
142
+ console.log('beautyDiv destroy')
142
143
  beautyDiv.beauty_player.destroy();
143
144
  beautyDiv.beauty_player = null;
144
145
  }
@@ -612,15 +613,16 @@ class Video extends Component {
612
613
  // 开启录制
613
614
  enableServerRecording = (record_business_id) => {
614
615
  const that = this
616
+ const SCALE = 1.5
615
617
  this.rateAll().then((res) => {
616
618
  console.log('退出房间者', res)
617
619
  let list = [
618
620
  {
619
621
  tag: 'projectionWhiteboard',
620
622
  xPosition: 0,
621
- yPosition: 175,
622
- width: 960,
623
- height: 540
623
+ yPosition: 175 * SCALE,
624
+ width: 1280,
625
+ height: 720
624
626
  },
625
627
  // {
626
628
  // tag: 'VIDEO_SOURCE_SCREEN_ONE',
@@ -640,50 +642,50 @@ class Video extends Component {
640
642
  tag: 'tag1',
641
643
  xPosition: 0,
642
644
  yPosition: 0,
643
- width: 213,
644
- height: 175
645
+ width: 213 * SCALE,
646
+ height: 175 * SCALE
645
647
  },
646
648
  {
647
649
  tag: 'customer1',
648
- xPosition: 213,
650
+ xPosition: 213 * SCALE,
649
651
  yPosition: 0,
650
- width: 213,
651
- height: 175
652
+ width: 213 * SCALE,
653
+ height: 175 * SCALE
652
654
  },
653
655
  {
654
656
  tag: 'customer2',
655
- xPosition: 426,
657
+ xPosition: 426 * SCALE,
656
658
  yPosition: 0,
657
- width: 213,
658
- height: 175
659
+ width: 213 * SCALE,
660
+ height: 175 * SCALE
659
661
  },
660
662
  {
661
663
  tag: 'customer3',
662
- xPosition: 639,
664
+ xPosition: 639 * SCALE,
663
665
  yPosition: 0,
664
- width: 213,
665
- height: 175
666
+ width: 213 * SCALE,
667
+ height: 175 * SCALE
666
668
  },
667
669
  {
668
670
  tag: 'customer4',
669
- xPosition: 852,
671
+ xPosition: 852 * SCALE,
670
672
  yPosition: 0,
671
- width: 213,
672
- height: 175
673
+ width: 213 * SCALE,
674
+ height: 175 * SCALE
673
675
  },
674
676
  {
675
677
  tag: 'customer5',
676
- xPosition: 1065,
678
+ xPosition: 1065 * SCALE,
677
679
  yPosition: 0,
678
- width: 213,
679
- height: 175
680
+ width: 213 * SCALE,
681
+ height: 175 * SCALE
680
682
  },
681
683
  {
682
684
  tag: 'customer6',
683
- xPosition: 1278,
685
+ xPosition: 1278 * SCALE,
684
686
  yPosition: 0,
685
- width: 213,
686
- height: 175
687
+ width: 213 * SCALE,
688
+ height: 175 * SCALE
687
689
  },
688
690
  // {
689
691
  // tag: 'sharedScreen', // 一期暂时不需要录制
@@ -697,18 +699,18 @@ class Video extends Component {
697
699
  res.map((item) => {
698
700
  list.push({
699
701
  tag: item.tag,
700
- xPosition: item.xaxis,
701
- yPosition: item.yaxis,
702
- width: item.width,
703
- height: item.height
702
+ xPosition: (item.xaxis * SCALE),
703
+ yPosition: (item.yaxis * SCALE),
704
+ width: (item.width * SCALE),
705
+ height: (item.height * SCALE)
704
706
  })
705
707
  }) :
706
708
  list.push({
707
709
  tag: 'VIDEO_SOURCE_SCREEN',
708
- xPosition: 960,
709
- yPosition: 535,
710
- width: 320,
711
- height: 180
710
+ xPosition: 960 * SCALE,
711
+ yPosition: 535 * SCALE,
712
+ width: 320 * SCALE,
713
+ height: 180 * SCALE
712
714
  })
713
715
  // list.push({
714
716
  // tag: 'VIDEO_SOURCE_SCREEN_19_9',
@@ -719,8 +721,8 @@ class Video extends Component {
719
721
  // })
720
722
  const filePath = 'recordId_' + new Date().valueOf();
721
723
  const recordParam = {};
722
- recordParam.width = 1280;
723
- recordParam.height = 720;
724
+ recordParam.width = 1280 * SCALE;
725
+ recordParam.height = 720 * SCALE;
724
726
  recordParam.recordTotalStream = 0;
725
727
  recordParam.startTimeout = 10;
726
728
  recordParam.splitType = 0;
@@ -732,10 +734,10 @@ class Video extends Component {
732
734
  type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
733
735
  id: 2, // ⽔印 ID
734
736
  enable: true,
735
- xPosition: 640, // x 轴位置
736
- yPosition: 10, // y 轴位置
737
+ xPosition: 640 * SCALE, // x 轴位置
738
+ yPosition: 10 * SCALE, // y 轴位置
737
739
  text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
738
- fontSize: 16, // 字体⼤⼩
740
+ fontSize: 16 * SCALE, // 字体⼤⼩
739
741
  url: '' // ⽔印图⽚ HTTP 地址
740
742
  },
741
743
  {
@@ -743,10 +745,10 @@ class Video extends Component {
743
745
  type: 1, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
744
746
  id: 1, // ⽔印 ID
745
747
  enable: true,
746
- xPosition: 1080, // x 轴位置
747
- yPosition: 10, // y 轴位置
748
+ xPosition: 1080 * SCALE, // x 轴位置
749
+ yPosition: 10 * SCALE, // y 轴位置
748
750
  text: '', // ⽔印⽂字
749
- fontSize: 16, // 字体⼤⼩
751
+ fontSize: 16 * SCALE, // 字体⼤⼩
750
752
  url: '' // ⽔印图⽚ HTTP 地址
751
753
  },
752
754
  ];
@@ -3566,6 +3568,11 @@ class Video extends Component {
3566
3568
  }
3567
3569
  }
3568
3570
  }
3571
+ componentDidCatch(error, info) {
3572
+ console.log('componentDidCatch')
3573
+ console.error(error, info)
3574
+ }
3575
+
3569
3576
  componentWillUnmount() {
3570
3577
  this.saveLog('Exit meeting')
3571
3578
  if (this.test_controller && this.state.sessionType) {
@@ -3868,7 +3875,7 @@ class Video extends Component {
3868
3875
  })
3869
3876
  this.asr_controller = new MyAsrController({
3870
3877
  token: this.state.asrToken,
3871
- appkey: this.state.asrAppKey,
3878
+ appKey: this.state.asrAppKey,
3872
3879
  url: this.state.asrServerUrl,
3873
3880
  recorder: this.state.recorder
3874
3881
  })
@@ -5697,7 +5704,7 @@ class Video extends Component {
5697
5704
  this.setState({
5698
5705
  isModalVisibleEnvironment: false,
5699
5706
  })
5700
- if (!this.state.isPictureInPicture && this.props.recordMode != 2) {
5707
+ if (!this.state.isPictureInPicture) {
5701
5708
  this.pictureInPicture()
5702
5709
  }
5703
5710
  }
@@ -37,8 +37,9 @@ let websocket_audio2txt_complete_time_end = 100; //websocket 语音转文本
37
37
 
38
38
  export default class MyAsrController {
39
39
  constructor(headers) {
40
+ console.log('MyAsrController', headers, headers.appKey)
40
41
  this.token = headers.token || 'default';
41
- this.appKey = headers.appKey || 'E6DAPlpMun5L2dJ7';
42
+ this.appKey = headers.appKey;
42
43
  this.url = headers.url;
43
44
 
44
45
  //初始化录音实例
@@ -97,7 +98,11 @@ export default class MyAsrController {
97
98
  }
98
99
 
99
100
  Disconnect() {
100
- this.recorderInstance.stop();
101
+ try {
102
+ this.recorderInstance.stop();
103
+ } catch(err){
104
+ console.log(err)
105
+ }
101
106
  clearInterval(this.interval);
102
107
  this.websocketStopTranscription()
103
108
  }