react_hsbc_teller 1.7.7 → 1.7.51

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.7",
3
+ "version": "1.7.51",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -15,16 +15,16 @@ roomId: "656467744508298",
15
15
  // sessionId: '',
16
16
  isVideo: false,
17
17
  tellerAccount: '00000000',
18
- // callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
19
- callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
18
+ callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
19
+ // callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
20
20
  businessNumber: '',
21
21
  lang: 'zh',
22
- // roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
23
- // baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
24
- // resourcePath: 'https://counter-web.leimondata.cn:7199',
25
- roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
26
- baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
27
- resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
22
+ roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
23
+ baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
24
+ resourcePath: 'https://counter-web.leimondata.cn:7199',
25
+ // roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
26
+ // baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
27
+ // resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
28
28
  prohibitPrompt: '无客户',
29
29
  titleBackground: '#40a9ff',
30
30
  titleColor: '#faad14',
@@ -56,9 +56,6 @@ export default class foot extends Component {
56
56
  graffiti=()=>{
57
57
  this.props.graffiti()
58
58
  }
59
- virtualization=()=>{
60
- this.props.virtualization()
61
- }
62
59
  render() {
63
60
  const {clickedOcr,clickedFacial,img,isWhiteboard,cameraImg,isTranscribing ,screenName,suspendName,customerList,menus,voiceName,beautyName} = this.props
64
61
  const content = (
@@ -84,7 +81,8 @@ export default class foot extends Component {
84
81
  </div>
85
82
  </div>
86
83
  </div>
87
- } */}
84
+ } */}
85
+
88
86
  {
89
87
  menus.map((item,index)=>{
90
88
  return <div key={index}className='footHover'>
@@ -97,16 +95,6 @@ export default class foot extends Component {
97
95
  </div>
98
96
  </div>
99
97
  </div>
100
- }
101
- {
102
- item == 'BACK'&&<div className='footHover' onClick={this.virtualization.bind(this)}>
103
- <div className="one">
104
- <img className="imgClass" src={require("../../assets/img/beijing.png").default} alt="" />
105
- <div className="text">
106
- 背景虚化
107
- </div>
108
- </div>
109
- </div>
110
98
  }
111
99
  {
112
100
  item == 'BOARD'&&<div className='footHover' onClick={this.switchExternal.bind(this)}>
@@ -45,9 +45,8 @@ let messageValue = ''
45
45
  let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
46
46
  let rateList = []
47
47
  let beautyDiv = {};
48
- let isBackgroundBlur = true
48
+ let isBackgroundBlur = false
49
49
  let isSuccuseHs = false
50
- let isGraffiti = false
51
50
  let CanvasHome = styled.div`
52
51
  position: fixed;
53
52
  z-index: ${props=>props.zIndexNum};
@@ -95,47 +94,27 @@ function startBeauty(stream) {
95
94
  beautyDiv = meetingBeautifyStream(newStream, beautyNum);
96
95
  newStream = beautyDiv.stream;
97
96
  return newStream
98
- }
99
- async function startMix(stream,onState) {
100
- var drawCanvas = document.getElementById('canvas');
101
- await mixInit(drawCanvas);
102
- mixStart(stream,onState);
103
-
104
-
105
97
  }
106
98
  async function startHs(stream) {
107
99
  // var canvas = document.getElementById('publish_video_canvas');
108
- // var video_src = document.getElementById("publish_video1");
109
- // video_src.srcObject = stream;
100
+ var video_src = document.getElementById("publish_video1");
101
+ var mode = 'blur';
102
+ video_src.srcObject = stream;
110
103
 
111
104
  await hsInit();
112
-
113
- hsStart(stream, 'none');
105
+ isSuccuseHs = true;
106
+ hsStart(stream, mode);
114
107
 
115
108
  }
116
109
 
117
110
  async function stopHs() {
118
- var stop_stream = true;//控制是否内部来进行关闭流
119
- var stream = hsStop(stop_stream);
120
- if (stream != null && stream != undefined) {
121
- stream.getTracks().forEach((track) => {
122
- track.stop();
123
- });
124
- stream = null;
125
- }
126
- isSuccuseHs = false
127
-
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();
128
117
  }
129
- async function mixStopClick() {
130
- var stop_stream = true;//控制是否内部来进行关闭流
131
- var stream = mixStop(stop_stream);
132
- if (stream != null && stream != undefined) {
133
- stream.getTracks().forEach((track) => {
134
- track.stop();
135
- });
136
- stream = null;
137
- }
138
- isGraffiti = false
139
118
 
140
119
  }
141
120
  message.config({
@@ -155,10 +134,8 @@ class Video extends Component {
155
134
  isScreenSwitching: false,
156
135
  whiteboardWidth: '',
157
136
  whiteboardHeight: '',
158
- widthVideo: '',
159
137
  whiteboardTop: '',
160
138
  whiteboardLeft: '',
161
- leftVideo: '',
162
139
  laveRoomSharedScreen: false,
163
140
  isJoinRoom: false,
164
141
  sessionType: false,
@@ -2221,100 +2198,42 @@ class Video extends Component {
2221
2198
  this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
2222
2199
  console.log('发送失败',msgId,code, msg)
2223
2200
  }
2224
- this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) =>{
2225
- console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
2226
- if (stream_type == "subscribe") {
2227
- return stream
2228
- }
2229
- if (media_type == 2 || media_type == 4) {
2230
- return stream
2231
- }
2232
- // if (publish_device != 2) {
2233
- // return stream
2234
- // }
2235
- if(publish_tag == 'tag1') {
2236
- console.log('tag1',stream)
2237
- let newStream = stream;
2238
- let beauty_strength = beautyNum;
2239
- if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
2240
- newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
2241
- // 清理原始流
2242
- newStream.oninactive = function () {
2243
- clearOriginStream(stream);
2244
- };
2245
- newStream.getVideoTracks()[0].onended = function () {
2246
- clearOriginStream(stream);
2247
- };
2248
- function clearOriginStream(stream) {
2249
- stream.getTracks().forEach((track) => {
2250
- track.stop();
2251
- });
2252
- stream = null;
2253
- }
2254
- };
2255
- if (stream.getVideoTracks()[0]) {
2256
- await startHs(newStream);
2257
- newStream = hsCaptureStream();
2258
- // 清理原始流
2259
- newStream.oninactive = function () {
2260
- clearOriginStream(stream);
2261
- };
2262
- newStream.getVideoTracks()[0].onended = function () {
2263
- clearOriginStream(stream);
2264
- };
2265
- function clearOriginStream(stream) {
2266
- stream.getTracks().forEach((track) => {
2267
- track.stop();
2268
- });
2269
- stream = null;
2270
- }
2271
- }
2272
- if (stream.getAudioTracks()[0] && newStream.addTrack) {
2273
- newStream.addTrack(stream.getAudioTracks()[0])
2274
- }
2275
- return newStream
2276
- }
2277
-
2278
- if(publish_tag == 'projectionWhiteboard' && publish_device == 2) {
2279
- // this.graffiti()
2280
- console.log('projectionWhiteboard',stream)
2281
- let newStream1 = stream;
2282
- if (stream.getVideoTracks()[0]) {
2283
- if(this.state.operateShow) {
2284
- await startMix(newStream1,'mix');
2285
-
2286
- isGraffiti = true
2287
- this.setState({
2288
- zIndexNum: 999
2289
- })
2290
- const canvas = document.getElementById('canvas');
2291
- canvas.width = this.state.widthVideo
2292
- } else {
2293
- await startMix(newStream1,'none');
2294
- }
2295
-
2296
- newStream1 = mixCaptureStream();
2297
- console.log('projectionWhiteboard1',newStream1)
2298
- // 清理原始流
2299
- newStream1.oninactive = function () {
2300
- clearOriginStream(stream);
2301
- };
2302
- newStream1.getVideoTracks()[0].onended = function () {
2303
- clearOriginStream(stream);
2304
- };
2305
- function clearOriginStream(stream) {
2306
- stream.getTracks().forEach((track) => {
2307
- track.stop();
2308
- });
2309
- stream = null;
2310
- }
2311
- }
2312
- return newStream1
2313
- } else {
2314
- return stream
2315
- }
2201
+ // this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
2202
+ // console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
2203
+ // if (stream_type == "subscribe") {
2204
+ // return stream
2205
+ // }
2206
+ // if (media_type == 2 || media_type == 4) {
2207
+ // return stream
2208
+ // }
2209
+ // if(publish_tag == 'tag1') {
2210
+ // let newStream = stream;
2211
+ // let beauty_strength = beautyNum;
2212
+ // if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
2213
+ // newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
2214
+ // // 清理原始流
2215
+ // newStream.oninactive = function () {
2216
+ // clearOriginStream(stream);
2217
+ // };
2218
+ // newStream.getVideoTracks()[0].onended = function () {
2219
+ // clearOriginStream(stream);
2220
+ // };
2221
+ // function clearOriginStream(stream) {
2222
+ // stream.getTracks().forEach((track) => {
2223
+ // track.stop();
2224
+ // });
2225
+ // stream = null;
2226
+ // }
2227
+ // };
2228
+ // if (stream.getAudioTracks()[0] && newStream.addTrack) {
2229
+ // newStream.addTrack(stream.getAudioTracks()[0])
2230
+ // }
2231
+ // return newStream
2232
+ // } else {
2233
+ // return stream
2234
+ // }
2316
2235
 
2317
- }
2236
+ // }
2318
2237
  // 发布媒体流成功
2319
2238
  this.test_controller.OnPublishSucc = (sid) => {
2320
2239
  console.log('发布媒体流成功', sid)
@@ -2339,8 +2258,7 @@ class Video extends Component {
2339
2258
  if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
2340
2259
  this.setState({
2341
2260
  whiteboardTop: box.getBoundingClientRect().top * 1.08 - 40,
2342
- whiteboardLeft: box.getBoundingClientRect().left,
2343
- leftVideo: (box.offsetWidth - this.state.widthVideo)/2 + box.getBoundingClientRect().left
2261
+ whiteboardLeft: box.getBoundingClientRect().left
2344
2262
  })
2345
2263
  console.log('whiteboardDIV',this.state.whiteboardTop,this.state.whiteboardLeft)
2346
2264
  }
@@ -3135,9 +3053,6 @@ class Video extends Component {
3135
3053
  if(isSuccuseHs) {
3136
3054
  stopHs();
3137
3055
  }
3138
- if(isGraffiti) {
3139
- mixStopClick()
3140
- }
3141
3056
 
3142
3057
  console.log('退出房间回调', leaveType);
3143
3058
  };
@@ -3725,12 +3640,11 @@ userType:'1'
3725
3640
  this.props.resourcePath + "/html2canvas.js",
3726
3641
  this.props.resourcePath + "/dom-to-image.js",
3727
3642
 
3728
- this.props.resourcePath + "/hs/hs_human_segmentation_wrapper.js",
3729
- this.props.resourcePath + "/hs/hs_human_segmentation.js",
3730
- this.props.resourcePath + "/hs/hs_human_segmentation.wasm",
3643
+ // this.props.resourcePath + "/hs/hs_human_segmentation_wrapper.js",
3644
+ // this.props.resourcePath + "/hs/hs_human_segmentation.js",
3645
+ // this.props.resourcePath + "/hs/hs_human_segmentation.wasm",
3731
3646
 
3732
- this.props.resourcePath + "/mix/mix_frame.js",
3733
- this.props.resourcePath + "/mix/pageBoard.js"
3647
+
3734
3648
 
3735
3649
  ]
3736
3650
  const that = this
@@ -4325,9 +4239,9 @@ userType:'1'
4325
4239
  facialImg: ocrImage,
4326
4240
  },()=>{
4327
4241
  this.setState({
4328
- isModalVisibleFacial: true,
4329
- })
4242
+ isModalVisibleFacial: true,
4330
4243
  })
4244
+ })
4331
4245
  }
4332
4246
  }
4333
4247
  sgsinImage=()=>{
@@ -4607,14 +4521,6 @@ userType:'1'
4607
4521
 
4608
4522
  videoMedia.addEventListener('play', (event) =>{
4609
4523
  var $this = this; //cache
4610
- if($this.state.operateShow) {
4611
- isGraffiti = false
4612
- this.setState({
4613
- zIndexNum: 999
4614
- })
4615
- const canvas = document.getElementById('canvas');
4616
- canvas.width = this.state.whiteboardWidth
4617
- }
4618
4524
  console.log('addEventListener',!$this.paused,!$this.ended,x, y, width, height)
4619
4525
  loop()
4620
4526
  function loop() {
@@ -4675,7 +4581,6 @@ userType:'1'
4675
4581
  })
4676
4582
 
4677
4583
  streamShare = stream
4678
-
4679
4584
  stream.getVideoTracks()[0].onended = async ()=>{
4680
4585
  //单击停止共享按钮后,触发这个事件
4681
4586
  streamShare = ''
@@ -4759,30 +4664,13 @@ userType:'1'
4759
4664
  img.src = base64;
4760
4665
  document.body.appendChild(img);
4761
4666
 
4762
- }
4763
- graffitiClick=async()=>{
4764
- if(!isGraffiti) {
4765
- if (this.state.tabTitles.find(el=>el.value == 'RMScreen')) {
4766
- // await startMix(document.getElementById('video20').srcObject);
4767
- // document.getElementById('video20').srcObject = mixCaptureStream();
4768
-
4769
- mixSetMode('mix')
4770
- isGraffiti = true
4771
- console.log('isGraffiti',isGraffiti)
4772
- const canvas = document.getElementById('canvas');
4773
- canvas.width = this.state.widthVideo
4774
- }
4775
- }
4776
-
4777
4667
  }
4778
4668
  graffiti=()=>{
4779
-
4780
4669
  if(!this.state.operateShow) {
4781
4670
  this.setState({
4782
4671
  zIndexNum: 999
4783
4672
  })
4784
4673
  this.change(true)
4785
-
4786
4674
  }
4787
4675
 
4788
4676
  }
@@ -4791,13 +4679,6 @@ userType:'1'
4791
4679
  zIndexNum: -1
4792
4680
  })
4793
4681
  this.change(false)
4794
- if(isGraffiti) {
4795
- isGraffiti = false
4796
- mixSetMode('none')
4797
- console.log('isGraffiti',isGraffiti)
4798
- // var stream = mixStop(false);
4799
- // document.getElementById('video20').srcObject = stream
4800
- }
4801
4682
  }
4802
4683
  change(val) {
4803
4684
  this.setState({ operateShow: val })
@@ -4809,7 +4690,6 @@ userType:'1'
4809
4690
  setTimeout(() => {
4810
4691
  this.openCanvas(canvas)
4811
4692
  }, 0);
4812
- this.graffitiClick()
4813
4693
  } else {
4814
4694
  // this.downCanvas()
4815
4695
  this.closeCanvas();
@@ -4889,10 +4769,8 @@ userType:'1'
4889
4769
  if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
4890
4770
  this.state.whiteboardWidth = box.offsetWidth,
4891
4771
  this.state.whiteboardHeight = box.offsetHeight * 0.92,
4892
- this.state.widthVideo = this.state.whiteboardHeight * 1280 / 720
4893
4772
  this.state.whiteboardTop = box.getBoundingClientRect().top * 1.08 - 40
4894
4773
  this.state.whiteboardLeft = box.getBoundingClientRect().left
4895
- this.state.leftVideo = (box.offsetWidth - this.state.widthVideo)/2 + box.getBoundingClientRect().left
4896
4774
  console.log('whiteboardDIV', this.state.whiteboardHeight,this.state.whiteboardWidth,this.state.whiteboardTop,this.state.whiteboardLeft)
4897
4775
  }
4898
4776
  }
@@ -5028,20 +4906,6 @@ userType:'1'
5028
4906
  });
5029
4907
  },100)
5030
4908
 
5031
- }
5032
- virtualizationClick=async()=>{
5033
- if(!isSuccuseHs) {
5034
-
5035
- hsSetMode('blur')
5036
- isSuccuseHs = true
5037
- } else {
5038
- hsSetMode('none')
5039
- isSuccuseHs = false
5040
- }
5041
- }
5042
- virtualization=()=>{
5043
- this.virtualizationClick()
5044
-
5045
4909
  }
5046
4910
  handleChangeIdCardName = (event) => {
5047
4911
  this.setState({idCardName: event.target.value});
@@ -5196,7 +5060,7 @@ userType:'1'
5196
5060
  {tabTitleList}
5197
5061
  {/* <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" /> */}
5198
5062
  <div id="whiteboardDIV" style={{height: 'calc(100% - 33px)'}}>
5199
- <CanvasHome zIndexNum={this.state.zIndexNum} style={{width: isGraffiti ? this.state.widthVideo + 'px' : this.state.whiteboardWidth + 'Px',height: this.state.whiteboardHeight + 'Px',top: this.state.whiteboardTop + 'Px',left: isGraffiti ? this.state.leftVideo + 'px' :this.state.whiteboardLeft + 'Px'}}>
5063
+ <CanvasHome zIndexNum={this.state.zIndexNum} style={{width: this.state.whiteboardWidth + 'Px',height: this.state.whiteboardHeight + 'Px',top: this.state.whiteboardTop + 'Px',left:this.state.whiteboardLeft + 'Px'}}>
5200
5064
  {this.state.operateShow &&
5201
5065
  <OpreateDiv id="operate">
5202
5066
  <span style={{color: this.state.selectSpan == 'pen' ? '#1890ff' : '#333'}} onClick={() => this.setTool('pen')}>铅笔</span>
@@ -5210,12 +5074,11 @@ userType:'1'
5210
5074
  <canvas id="canvas" className="canvas"></canvas>
5211
5075
  </CanvasHome>
5212
5076
  <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen' || this.state.isSelect == 'staffScreen') ? '' : 'none', }}>
5213
- <div className="videoDiv" style={{'text-align': 'center'}}>
5077
+ <div className="videoDiv">
5214
5078
  <video
5215
5079
  id="video20"
5216
5080
  autoPlay
5217
5081
  muted={true}
5218
- style={{ height: this.state.whiteboardHeight + 'px',width: this.state.widthVideo + 'px'}}
5219
5082
  className="videoTab"
5220
5083
  disablePictureInPicture
5221
5084
  />
@@ -5702,7 +5565,6 @@ userType:'1'
5702
5565
  inspection={this.inspection}
5703
5566
  beautyClick={this.beautyClick}
5704
5567
  graffiti={this.graffiti}
5705
- virtualization={this.virtualization}
5706
5568
  ></Foot>
5707
5569
  <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
5708
5570
  onCancel={this.handleCancel}>
@@ -5875,7 +5737,7 @@ sessionId: "",
5875
5737
  microphoneSize: 25,
5876
5738
  fontSize: '14',
5877
5739
  fontFamily: 'auto',
5878
- menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY','GRAFFITI','BACK'],
5740
+ menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY','GRAFFITI'],
5879
5741
  customLeaveRoom: '客户离开房间',
5880
5742
  meetingInfo: {
5881
5743
  title: '--',
Binary file