react_hsbc_teller 2.0.71 → 2.0.73

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.71",
3
+ "version": "2.0.73",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -46,15 +46,15 @@ class Demo extends Component {
46
46
  needPreSale: false
47
47
  }
48
48
  componentWillMount() {
49
- if(window.localStorage.getItem('sessionId') && window.localStorage.getItem('sessionId') != 'null' && window.localStorage.getItem('sessionId') != 'undefined') {
50
- this.setState({roomId: window.localStorage.getItem('roomId')});
51
- this.setState({mtoken: window.localStorage.getItem('mtoken')});
52
- this.setState({sessionId:window.localStorage.getItem('sessionId')});
53
- this.setState({imRoomId: window.localStorage.getItem('imRoomId')});
54
- this.setState({
55
- isVideo: true
56
- })
57
- }
49
+ // if(window.localStorage.getItem('sessionId') && window.localStorage.getItem('sessionId') != 'null' && window.localStorage.getItem('sessionId') != 'undefined') {
50
+ // this.setState({roomId: window.localStorage.getItem('roomId')});
51
+ // this.setState({mtoken: window.localStorage.getItem('mtoken')});
52
+ // this.setState({sessionId:window.localStorage.getItem('sessionId')});
53
+ // this.setState({imRoomId: window.localStorage.getItem('imRoomId')});
54
+ // this.setState({
55
+ // isVideo: true
56
+ // })
57
+ // }
58
58
 
59
59
  }
60
60
  handleChangeRoomId = (event) => {
@@ -63,7 +63,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
63
63
  import axios from 'axios';
64
64
  import CryptoJS from "crypto-js";
65
65
 
66
- const SDK_VERISON = '2.0.71'
66
+ const SDK_VERISON = '2.0.73'
67
67
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
68
68
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
69
69
  const { Option } = Select;
@@ -350,7 +350,6 @@ class Video extends Component {
350
350
  transcribeErrorModalVisible: false, // 双录异常
351
351
  transcribeErrorCode: '',
352
352
  presaleRecordId: '',
353
- ipadsaleRecordId: '',
354
353
  salePresaleRecordId: '',
355
354
  supplesalePresaleRecordId: ''
356
355
 
@@ -361,7 +360,7 @@ class Video extends Component {
361
360
  saveLog = (val) => {
362
361
  axios({
363
362
  method: 'get',
364
- baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller='+ SDK_VERISON +'&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
363
+ baseURL: this.props.logUrl + '&message=SDK:' + encodeURIComponent(val) + '&react_hsbc_teller='+ SDK_VERISON +'&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
365
364
 
366
365
  }).then(res => {
367
366
 
@@ -411,7 +410,7 @@ class Video extends Component {
411
410
  publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
412
411
  publish_config.publish_video_id = 'publish_video1'
413
412
  publish_config.publish_streamId_id = 'publish_streamId1'
414
- publish_config.publish_tag = 'tag1customer'
413
+ publish_config.publish_tag = 'tag1'
415
414
  if (this.props.recordMode == 2) {
416
415
  // 分行模式,只收音 不发布摄像头
417
416
  publish_config.media_type = 2
@@ -565,7 +564,7 @@ class Video extends Component {
565
564
  {
566
565
  publish_video_id: 'publish_video1',
567
566
  publish_streamId_id: 'publish_streamId1',
568
- publish_tag: 'tag1customer'
567
+ publish_tag: 'tag1'
569
568
  },
570
569
  // {
571
570
  // publish_video_id: 'publish_video2',
@@ -653,49 +652,49 @@ class Video extends Component {
653
652
  height: 720
654
653
  },
655
654
  {
656
- tag: 'tag1customer',
655
+ tag: 'tag1',
657
656
  xPosition: 0,
658
657
  yPosition: 0,
659
658
  width: 213 * SCALE,
660
659
  height: 175 * SCALE
661
660
  },
662
661
  {
663
- tag: 'customer1',
662
+ tag: 'customertag1',
664
663
  xPosition: 213 * SCALE,
665
664
  yPosition: 0,
666
665
  width: 213 * SCALE,
667
666
  height: 175 * SCALE
668
667
  },
669
668
  {
670
- tag: 'customer2',
669
+ tag: 'customertag2',
671
670
  xPosition: 426 * SCALE,
672
671
  yPosition: 0,
673
672
  width: 213 * SCALE,
674
673
  height: 175 * SCALE
675
674
  },
676
675
  {
677
- tag: 'customer3',
676
+ tag: 'customertag3',
678
677
  xPosition: 639 * SCALE,
679
678
  yPosition: 0,
680
679
  width: 213 * SCALE,
681
680
  height: 175 * SCALE
682
681
  },
683
682
  {
684
- tag: 'customer4',
683
+ tag: 'customertag4',
685
684
  xPosition: 852 * SCALE,
686
685
  yPosition: 0,
687
686
  width: 213 * SCALE,
688
687
  height: 175 * SCALE
689
688
  },
690
689
  {
691
- tag: 'customer5',
690
+ tag: 'customertag5',
692
691
  xPosition: 1065 * SCALE,
693
692
  yPosition: 0,
694
693
  width: 213 * SCALE,
695
694
  height: 175 * SCALE
696
695
  },
697
696
  {
698
- tag: 'customer6',
697
+ tag: 'customertag6',
699
698
  xPosition: 1278 * SCALE,
700
699
  yPosition: 0,
701
700
  width: 213 * SCALE,
@@ -754,7 +753,7 @@ class Video extends Component {
754
753
  },
755
754
  ];
756
755
  recordParam.tagPositions = list
757
- recordParam.tagFilter = 'customer'
756
+ recordParam.tagFilter = 'tag'
758
757
  console.log('recordParam', recordParam);
759
758
  // 开启音频录制,如果有业务id用,没用sessionid 用于在成功回调里去区分是音频还是正常
760
759
  that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id ? record_business_id + '_' + type : this.state.sessionId + '_' + type)
@@ -763,58 +762,6 @@ class Video extends Component {
763
762
  }
764
763
 
765
764
  }
766
- // 开启ipad音频录制
767
- enableIpadAudioRecording = (record_business_id) => {
768
- const that = this
769
- const filePath = 'recordId_' + new Date().valueOf() + '_ipadsale';
770
- const recordParam = {};
771
- recordParam.width = 1280;
772
- recordParam.height = 720;
773
- recordParam.recordTotalStream = 0;
774
- recordParam.startTimeout = 10;
775
- recordParam.splitType = 1;
776
- recordParam.endType = 1;
777
- recordParam.crf = 26
778
- recordParam.overlaps = [
779
- {
780
- tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
781
- type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
782
- id: 2, // ⽔印 ID
783
- enable: true,
784
- xPosition: 16, // x 轴位置
785
- yPosition: 8, // y 轴位置
786
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
787
- fontSize: 16, // 字体⼤⼩
788
- url: '' // ⽔印图⽚ HTTP 地址
789
- },
790
- {
791
- tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
792
- type: 1, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
793
- id: 1, // ⽔印 ID
794
- enable: true,
795
- xPosition: 1080, // x 轴位置
796
- yPosition: 10, // y 轴位置
797
- text: '', // ⽔印⽂字
798
- fontSize: 16, // 字体⼤⼩
799
- url: '' // ⽔印图⽚ HTTP 地址
800
- },
801
- ];
802
- recordParam.tagPositions = [{
803
- tag: that.state.ipadTag,
804
- xPosition: 0,
805
- yPosition: 0,
806
- width: 1280,
807
- height: 720
808
- },{
809
- tag: 'tag1customer',
810
- xPosition: 0,
811
- yPosition: 0,
812
- width: 0,
813
- height: 0
814
- }]
815
- console.log('recordParam', recordParam);
816
- that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id+'_ipadsale')
817
- }
818
765
  // 开启录制
819
766
  enableServerRecording = (record_business_id, type) => {
820
767
  const that = this
@@ -844,49 +791,49 @@ class Video extends Component {
844
791
  // height: 350
845
792
  // },
846
793
  {
847
- tag: 'tag1customer',
794
+ tag: 'tag1',
848
795
  xPosition: 0,
849
796
  yPosition: 0,
850
797
  width: 213 * SCALE,
851
798
  height: 175 * SCALE
852
799
  },
853
800
  {
854
- tag: 'customer1',
801
+ tag: 'customertag1',
855
802
  xPosition: 213 * SCALE,
856
803
  yPosition: 0,
857
804
  width: 213 * SCALE,
858
805
  height: 175 * SCALE
859
806
  },
860
807
  {
861
- tag: 'customer2',
808
+ tag: 'customertag2',
862
809
  xPosition: 426 * SCALE,
863
810
  yPosition: 0,
864
811
  width: 213 * SCALE,
865
812
  height: 175 * SCALE
866
813
  },
867
814
  {
868
- tag: 'customer3',
815
+ tag: 'customertag3',
869
816
  xPosition: 639 * SCALE,
870
817
  yPosition: 0,
871
818
  width: 213 * SCALE,
872
819
  height: 175 * SCALE
873
820
  },
874
821
  {
875
- tag: 'customer4',
822
+ tag: 'customertag4',
876
823
  xPosition: 852 * SCALE,
877
824
  yPosition: 0,
878
825
  width: 213 * SCALE,
879
826
  height: 175 * SCALE
880
827
  },
881
828
  {
882
- tag: 'customer5',
829
+ tag: 'customertag5',
883
830
  xPosition: 1065 * SCALE,
884
831
  yPosition: 0,
885
832
  width: 213 * SCALE,
886
833
  height: 175 * SCALE
887
834
  },
888
835
  {
889
- tag: 'customer6',
836
+ tag: 'customertag6',
890
837
  xPosition: 1278 * SCALE,
891
838
  yPosition: 0,
892
839
  width: 213 * SCALE,
@@ -1003,7 +950,7 @@ class Video extends Component {
1003
950
  width: 1280,
1004
951
  height: 720
1005
952
  },{
1006
- tag: 'tag1customer',
953
+ tag: 'tag1',
1007
954
  xPosition: 0,
1008
955
  yPosition: 0,
1009
956
  width: 0,
@@ -2202,7 +2149,6 @@ class Video extends Component {
2202
2149
  // 这里加定时1秒后触发Ipad录制--阿里的胡子老师要求加的,解决录制的问题
2203
2150
  setTimeout(() => {
2204
2151
  if (this.state.ipadTag) this.enableIpadRecording(Mival.id)
2205
- if (this.state.ipadTag) this.enableIpadAudioRecording(Mival.id)
2206
2152
  }, 1000);
2207
2153
 
2208
2154
  if (this.props.whetherDetectFace && this.props.recordMode != 2){
@@ -2664,7 +2610,7 @@ class Video extends Component {
2664
2610
  publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
2665
2611
  publish_config.publish_video_id = 'publish_video1'
2666
2612
  publish_config.publish_streamId_id = 'publish_streamId1'
2667
- publish_config.publish_tag = 'tag1customer'
2613
+ publish_config.publish_tag = 'tag1'
2668
2614
  if (this.props.recordMode == 2) {
2669
2615
  // 分行模式,只收音 不发布摄像头
2670
2616
  publish_config.media_type = 2
@@ -2742,8 +2688,8 @@ class Video extends Component {
2742
2688
  // if (publish_device != 2) {
2743
2689
  // return stream
2744
2690
  // }
2745
- if (publish_tag == 'tag1customer') {
2746
- console.log('tag1customer', stream)
2691
+ if (publish_tag == 'tag1') {
2692
+ console.log('tag1', stream)
2747
2693
  let newStream = stream;
2748
2694
  if (stream.getVideoTracks()[0]) {
2749
2695
  if (this.state.beautyType || isSuccuseHs){
@@ -2920,6 +2866,7 @@ class Video extends Component {
2920
2866
  })
2921
2867
  this.roomCallBack(2, '发布失败', '4-' + err_code)
2922
2868
  } else {
2869
+ this.test_controller.UnPublish(sid)
2923
2870
  this.messageClick('投屏失败请重新投屏', 'error')
2924
2871
  this.setSharedScreenState(false)
2925
2872
  this.setSharedScreenTimer(false)
@@ -3163,7 +3110,6 @@ class Video extends Component {
3163
3110
  // 如果已经开启了业务录制且ipad未在录制,立即开启ipad录制(ipad后加入)
3164
3111
  if (this.state.businessId && !this.state.ipadRecordId) {
3165
3112
  this.enableIpadRecording(this.state.businessId)
3166
- this.enableIpadAudioRecording(this.state.businessId)
3167
3113
  }
3168
3114
  }
3169
3115
  };
@@ -3446,11 +3392,6 @@ class Video extends Component {
3446
3392
  this.state.presaleRecordId = record_id
3447
3393
  this.audioPresaleRecordCallback('1', true)
3448
3394
  this.saveLog('mrtc OnStartPresaleRecordSucc')
3449
- } else if (String(record_third_id).includes('_ipadsale')){
3450
- // full录制的ipad音频
3451
- this.state.ipadsaleRecordId = record_id
3452
- this.audioIpadsaleRecordCallback('1', true)
3453
- this.saveLog('mrtc OnStartIpadsaleRecordSucc')
3454
3395
  } else if (String(record_third_id).includes('_sale')){
3455
3396
  // 业务录制的音频
3456
3397
  this.state.salePresaleRecordId = record_id
@@ -3494,11 +3435,6 @@ class Video extends Component {
3494
3435
  this.state.presaleRecordId = ''
3495
3436
  this.audioPresaleRecordCallback('1', false)
3496
3437
  this.saveLog('mrtc OnStartPresaleRecordFailed, code=' + err_code)
3497
- } else if (String(record_third_id).includes('_ipadsale')){
3498
- // 录制的ipad音频
3499
- this.state.ipadsaleRecordId = ''
3500
- this.audioIpadsaleRecordCallback('1', false)
3501
- this.saveLog('mrtc OnStartIpadsaleRecordFailed, code=' + err_code)
3502
3438
  } else if (String(record_third_id).includes('_sale')){
3503
3439
  // 业务录制的音频
3504
3440
  this.state.salePresaleRecordId = ''
@@ -3537,11 +3473,6 @@ class Video extends Component {
3537
3473
  this.state.presaleRecordId = ''
3538
3474
  this.audioPresaleRecordCallback('2', true)
3539
3475
  this.saveLog('mrtc OnStopPresaleRecordSucc, recordId='+recordId)
3540
- } else if (String(record_third_id).includes('_ipadsale')){
3541
- // 录制的ipad音频
3542
- this.state.ipadsaleRecordId = ''
3543
- this.audioIpadsaleRecordCallback('2', true)
3544
- this.saveLog('mrtc OnStopIpadsaleRecordSucc, recordId='+recordId)
3545
3476
  } else if (String(record_third_id).includes('_sale')){
3546
3477
  // 业务录制的音频
3547
3478
  this.state.salePresaleRecordId = ''
@@ -3583,11 +3514,6 @@ class Video extends Component {
3583
3514
  this.state.presaleRecordId = ''
3584
3515
  this.audioPresaleRecordCallback('2', false)
3585
3516
  this.saveLog('mrtc OnStopPresaleRecordFailed, err_code='+err_code)
3586
- } else if (String(record_third_id).includes('_ipadsale')){
3587
- // 录制的ipad音频
3588
- this.state.ipadsaleRecordId = ''
3589
- this.audioIpadsaleRecordCallback('2', false)
3590
- this.saveLog('mrtc OnStopIpadsaleRecordFailed, err_code='+err_code)
3591
3517
  } else if (String(record_third_id).includes('_sale')){
3592
3518
  // 业务录制的音频
3593
3519
  this.state.salePresaleRecordId = ''
@@ -4033,27 +3959,6 @@ class Video extends Component {
4033
3959
  }
4034
3960
  }
4035
3961
  // 业务音频录制
4036
- audioIpadsaleRecordCallback = async (type, status) => {
4037
- try {
4038
- let result = await API.videoRecordCallback({
4039
- activityId: this.props.businessNumber,
4040
- sessionId: this.state.sessionId,
4041
- roomId: this.state.channelId + '',
4042
- appId: this.state.appId,
4043
- recordId: this.state.ipadsaleRecordId,
4044
- customerId: this.props.customerId,
4045
- type: type,
4046
- status: status,
4047
- isAudio: '1'
4048
- });
4049
- console.log(result);
4050
- } catch (err) {
4051
- console.error(err);
4052
- if (err.status == 502 || err.status == 404) {
4053
- }
4054
- }
4055
- }
4056
- // ipad音频录制
4057
3962
  audioSalePresaleRecordCallback = async (type, status) => {
4058
3963
  try {
4059
3964
  let result = await API.videoRecordCallback({
@@ -4507,6 +4412,7 @@ class Video extends Component {
4507
4412
  }
4508
4413
  componentWillMount() {
4509
4414
  console.log('hsbc_teller_sdk', SDK_VERISON)
4415
+ console.log(`${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`)
4510
4416
  let arr = []
4511
4417
  for(let i=1;i<=12;i++){
4512
4418
  arr.push({
@@ -5063,7 +4969,6 @@ class Video extends Component {
5063
4969
  if (!this.state.businessRecordId) this.enableServerRecording(this.state.businessId)
5064
4970
  if (!this.state.businessRecordId) this.enableAudioRecording(this.state.businessId,'presale')
5065
4971
  if (!this.state.ipadRecordId && this.state.ipadTag) this.enableIpadRecording(this.state.businessId)
5066
- if (!this.state.ipadRecordId && this.state.ipadTag) this.enableIpadAudioRecording(this.state.businessId)
5067
4972
  clearTimeout(this.recordLoopPlayTimer)
5068
4973
  }
5069
4974
  handleOkLowPowerConfirm = () => {
@@ -8166,7 +8071,7 @@ Video.defaultProps = {
8166
8071
  lightSensitivity: 1, // 光线敏感度系数,默认1
8167
8072
  userSide: 2,
8168
8073
  meetingDuration: null, // 会议时长,单位小时
8169
- recordMode: 1, // 录制模式 1远程录制 2网点录制 在开启单独音频流的时候1-会有多个音频流单独录制,2-只需要RM
8074
+ recordMode: 1, // 录制模式 1远程录制 2网点录制-分行 在开启单独音频流的时候1-会有多个音频流单独录制,2-只需要RM
8170
8075
  defaultBranchCode: "",// 员工网点缩写
8171
8076
  customerId: "", //客户号
8172
8077
  customerType: "", // 客户类型