react_hsbc_teller 2.0.29 → 2.0.31

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.29",
3
+ "version": "2.0.31",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -105,6 +105,22 @@ class API extends Server{
105
105
  throw err;
106
106
  }
107
107
  }
108
+ /**
109
+ * 用途:开启业务录制
110
+ * @url https://api.cangdu.org/shopro/data/products
111
+ * 返回http_code为200表示成功
112
+ * @method post
113
+ * @return {promise}
114
+ */
115
+ async startBusinessRecord(params = {}){
116
+ // return this.axios('get', '/lang/select/2', params);
117
+ try{
118
+ let result = await this.axios('post', '/hsbc/business/record', params);
119
+ return result
120
+ }catch(err){
121
+ throw err;
122
+ }
123
+ }
108
124
  /**
109
125
  * 用途:人脸检测
110
126
  * @url https://api.cangdu.org/shopro/data/products
@@ -236,6 +236,7 @@ userExit =(val)=>{
236
236
  salesBranchCode={this.state.salesBranchCode}
237
237
  financialOffice={this.state.financialOffice}
238
238
  onLeaveRoom={this.onLeaveRoom}
239
+ getBusinessData={() => { return { businessList: [], businessType: 'REC' } }}
239
240
  createRoomCallback={this.createRoomCallback}
240
241
  joinRoomCallback={this.joinRoomCallback}
241
242
  imgCallback={this.imgCallback}
@@ -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.29'
61
+ const SDK_VERISON = '2.0.31'
62
62
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
63
63
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
64
64
  const { Option } = Select;
@@ -591,10 +591,11 @@ class Video extends Component {
591
591
  ];
592
592
  this.test_controller.InitRoomConfig(config_param)
593
593
  this.saveLog('mrtc InitRoomConfig start')
594
- // 预热摄像头
595
- config_param.videoSource = this.state.cameraValue
596
- config_param.audioSource = this.state.microphoneValue
597
- this.test_controller.PreOpenLocalMedia(config_param)
594
+
595
+ // 预热摄像头 (可能导致录屏插件发布时变成摄像头 以及重音问题,先注释掉)
596
+ // config_param.videoSource = this.state.cameraValue
597
+ // config_param.audioSource = this.state.microphoneValue
598
+ // this.test_controller.PreOpenLocalMedia(config_param)
598
599
  };
599
600
  rateAll = async () => {
600
601
  let data = ''
@@ -615,7 +616,7 @@ class Video extends Component {
615
616
  const that = this
616
617
  const SCALE = 1.5
617
618
  this.rateAll().then((res) => {
618
- console.log('退出房间者', res)
619
+ console.log('开启录制', res)
619
620
  let list = [
620
621
  {
621
622
  tag: 'projectionWhiteboard',
@@ -687,13 +688,13 @@ class Video extends Component {
687
688
  width: 213 * SCALE,
688
689
  height: 175 * SCALE
689
690
  },
690
- // {
691
- // tag: 'sharedScreen', // 一期暂时不需要录制
692
- // xPosition: 960,
693
- // yPosition: 180,
694
- // width: 320,
695
- // height: 180
696
- // }
691
+ {
692
+ tag: 'sharedScreen', // 一期暂时不需要录制
693
+ xPosition: 960 * SCALE,
694
+ yPosition: 180 * SCALE,
695
+ width: 320 * SCALE,
696
+ height: 180 * SCALE
697
+ }
697
698
  ]
698
699
  Array.isArray(res) ?
699
700
  res.map((item) => {
@@ -736,7 +737,7 @@ class Video extends Component {
736
737
  enable: true,
737
738
  xPosition: 640 * SCALE, // x 轴位置
738
739
  yPosition: 10 * SCALE, // y 轴位置
739
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
740
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.state.salesBranchCode || ''} ${this.state.branchName || ''} ${this.state.financialOffice || ''}`,
740
741
  fontSize: 16 * SCALE, // 字体⼤⼩
741
742
  url: '' // ⽔印图⽚ HTTP 地址
742
743
  },
@@ -779,7 +780,7 @@ class Video extends Component {
779
780
  enable: true,
780
781
  xPosition: 640, // x 轴位置
781
782
  yPosition: 10, // y 轴位置
782
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
783
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.state.salesBranchCode || ''} ${this.state.branchName || ''} ${this.state.financialOffice || ''}`,
783
784
  fontSize: 16, // 字体⼤⼩
784
785
  url: '' // ⽔印图⽚ HTTP 地址
785
786
  },
@@ -1771,6 +1772,13 @@ class Video extends Component {
1771
1772
 
1772
1773
  }
1773
1774
 
1775
+ } else if (Mival.typeId == 1219) {
1776
+ // 传入分行信息
1777
+ if (Mival.sessionId == this.state.sessionId && this.props.recordMode == 2) {
1778
+ this.state.salesBranchCode = Mival.salesBranchCode;
1779
+ this.state.financialOffice = Mival.financialOffice;
1780
+ this.state.branchName = Mival.salesBranchName;
1781
+ }
1774
1782
  } else if (Mival.typeId == 3100) {
1775
1783
  if(Mival.data.sessionId == this.state.sessionId) {
1776
1784
  muteJson.set(Mival.data.userId, JSON.stringify(Mival))
@@ -2770,6 +2778,10 @@ class Video extends Component {
2770
2778
  // 记录ipad摄像头流,需要单独开启录制
2771
2779
  if (feed.mediaSource == 'VIDEO_SOURCE_CAMERA' && feed.uid.includes(IPAD_SUFFIX)) {
2772
2780
  this.state.ipadTag = feed.tag;
2781
+ // 如果已经开启了业务录制且ipad未在录制,立即开启ipad录制(ipad后加入)
2782
+ if (this.state.businessId && !this.state.ipadRecordId) {
2783
+ this.enableIpadRecording(this.state.businessId)
2784
+ }
2773
2785
  }
2774
2786
  };
2775
2787
  // 推送“有新订阅”给与会者
@@ -3029,6 +3041,7 @@ class Video extends Component {
3029
3041
  if (!record_third_id && third_id_Map.get(recordId)) {
3030
3042
  record_third_id = third_id_Map.get(recordId)
3031
3043
  }
3044
+ console.log('record_third_id=', record_third_id)
3032
3045
  if (!record_third_id) {
3033
3046
  this.videoRecordCallback('2', true)
3034
3047
  this.saveLog('mrtc OnStopRemoteRecordSucc, recordId='+recordId)
@@ -4041,8 +4054,10 @@ class Video extends Component {
4041
4054
  // 业务录制
4042
4055
  this.state.businessRecordId = result.businessRecordId;
4043
4056
  this.state.businessId = result.businessId;
4057
+ this.state.ipadRecordId = result.businessIpadRecordId;
4044
4058
  third_id_Map.set(result.businessRecordId, result.businessId);
4045
- console.log(third_id_Map)
4059
+ third_id_Map.set(result.businessIpadRecordId, result.businessId+'_ipad');
4060
+ console.log("third_id_map", third_id_Map)
4046
4061
  if (this.props.whetherDetectFace && this.props.recordMode != 2) this.startFaceDetection();
4047
4062
  if (this.props.whetherDetectLight && this.props.recordMode != 2) this.startImageDetection();
4048
4063
  if (this.props.whetherNeedAsr) this.startASR();
@@ -5724,13 +5739,41 @@ class Video extends Component {
5724
5739
  duration: 3
5725
5740
  })
5726
5741
  }
5727
- handleOkEnvDetection = () => {
5742
+ handleOkEnvDetection = async () => {
5728
5743
  this.setState({
5729
5744
  isModalVisibleEnvironment: false,
5730
5745
  })
5731
5746
  if (!this.state.isPictureInPicture) {
5732
5747
  this.pictureInPicture()
5733
5748
  }
5749
+ // 分行模式,需要自动开启业务录制
5750
+ if (this.props.recordMode == 2) {
5751
+ this.startBusinessRecord()
5752
+ }
5753
+ }
5754
+
5755
+ async startBusinessRecord() {
5756
+ const busData = this.props.getBusinessData()
5757
+ if (busData) {
5758
+ try {
5759
+ let result = await API.startBusinessRecord({
5760
+ sessionId: this.state.sessionId,
5761
+ roomId: this.state.channelId,
5762
+ type: 1,
5763
+ ...busData
5764
+ });
5765
+ console.log(result)
5766
+ if (result.code == 200) {
5767
+ console.log('成功')
5768
+ } else if (result.code == 500) {
5769
+ this.messageClick('服务异常,业务录制开启失败','error')
5770
+ } else {
5771
+ console.warn('业务录制开启失败', result.code, result.message)
5772
+ }
5773
+ } catch (err) {
5774
+ console.log(err)
5775
+ }
5776
+ }
5734
5777
  }
5735
5778
  // handleCancelEnvDetection = () => {
5736
5779
  // this.setState({