react_hsbc_teller 1.7.3 → 1.7.4

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": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
Binary file
@@ -12,6 +12,7 @@ import voiceImgOpen from '../../assets/img/icon_Mute.png'
12
12
  import voiceImgCloe from '../../assets/img/icon_MuteOne.png'
13
13
  import cameraImgOpen from '../../assets/img/icon_camera.png'
14
14
  import cameraImgCloe from '../../assets/img/icon_cameraOne.png'
15
+ import ocrImage from '../../assets/img/jietu.png'
15
16
  import autod from '../../assets/mp3/joinmeeting.mp3'
16
17
  import leftMetting from '../../assets/mp3/leftmeeting.mp3'
17
18
  import errorPng from '../../assets/img/tooltips2_fail.png'
@@ -44,6 +45,8 @@ let messageValue = ''
44
45
  let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
45
46
  let rateList = []
46
47
  let beautyDiv = {};
48
+ let isBackgroundBlur = false
49
+ let isSuccuseHs = false
47
50
  let CanvasHome = styled.div`
48
51
  position: fixed;
49
52
  z-index: ${props=>props.zIndexNum};
@@ -71,6 +74,7 @@ const OpreateDiv = styled.div`
71
74
  cursor:pointer;
72
75
  }
73
76
  `;
77
+
74
78
  function clearStreamRemain() {
75
79
  if (!(beautyDiv.beauty_canvas == null || beautyDiv.beauty_canvas == undefined)) {
76
80
  beautyDiv.beauty_canvas = null;
@@ -90,6 +94,28 @@ function startBeauty(stream) {
90
94
  beautyDiv = meetingBeautifyStream(newStream, beautyNum);
91
95
  newStream = beautyDiv.stream;
92
96
  return newStream
97
+ }
98
+ async function startHs(stream) {
99
+ // var canvas = document.getElementById('publish_video_canvas');
100
+ var video_src = document.getElementById("publish_video1");
101
+ var mode = 'blur';
102
+ video_src.srcObject = stream;
103
+
104
+ await hsInit();
105
+ isSuccuseHs = true;
106
+ hsStart(stream, mode);
107
+
108
+ }
109
+
110
+ async function stopHs() {
111
+ var video_src = document.getElementById("publish_video1");
112
+ if(video_src) {
113
+ console.log('video_src',video_src)
114
+ video_src.srcObject = null;
115
+ isSuccuseHs = false
116
+ hsStop();
117
+ }
118
+
93
119
  }
94
120
  message.config({
95
121
  getContainer: ()=>document.getElementById('allHSBC')
@@ -3015,6 +3041,10 @@ class Video extends Component {
3015
3041
  };
3016
3042
  // 退出房间回调
3017
3043
  this.test_controller.OnLeaveRoom = (leaveType) => {
3044
+ if(isSuccuseHs) {
3045
+ stopHs();
3046
+ }
3047
+
3018
3048
  console.log('退出房间回调', leaveType);
3019
3049
  };
3020
3050
  // 推送“退出房间者”给与会者
@@ -3600,6 +3630,10 @@ userType:'1'
3600
3630
  this.props.resourcePath + "/iconfont.js",
3601
3631
  this.props.resourcePath + "/html2canvas.js",
3602
3632
  this.props.resourcePath + "/dom-to-image.js",
3633
+
3634
+ // this.props.resourcePath + "/hs/hs_human_segmentation_wrapper.js",
3635
+ // this.props.resourcePath + "/hs/hs_human_segmentation.js",
3636
+ // this.props.resourcePath + "/hs/hs_human_segmentation.wasm",
3603
3637
 
3604
3638
 
3605
3639
 
@@ -4191,14 +4225,12 @@ userType:'1'
4191
4225
  this.setState({
4192
4226
  clickedFacial: false,
4193
4227
  clickedOcr: false,
4194
- isModalVisibleFacial: true,
4195
- facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
4196
- })
4197
- setTimeout(() => {
4228
+ facialImg: ocrImage,
4229
+ },()=>{
4198
4230
  this.setState({
4199
- facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
4231
+ isModalVisibleFacial: true,
4200
4232
  })
4201
- },1000)
4233
+ })
4202
4234
  }
4203
4235
  }
4204
4236
  sgsinImage=()=>{
@@ -5541,7 +5573,7 @@ userType:'1'
5541
5573
  <Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
5542
5574
  !this.state.idCardName && <div key='facial'>
5543
5575
  <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
5544
- <Button className="modelButtonCancel" onClick={this.sgsinImage}>重新截图</Button>
5576
+ <Button className="modelButtonCancel" onClick={this.sgsinImage}>截图</Button>
5545
5577
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
5546
5578
  </div>,
5547
5579
  this.state.idCardName && <div key='facial'>