react_hsbc_teller 1.0.7 → 1.0.8

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.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -1,5 +1,6 @@
1
1
  import React, { Component } from "react";
2
2
  import HSBC from "../pages/index";
3
+ import Pdf from './pdf.js'
3
4
 
4
5
  class Demo extends Component {
5
6
  state = {
@@ -169,7 +170,7 @@ joinRoomCallback=(data)=>{
169
170
  imgCallback={this.imgCallback}
170
171
  >
171
172
 
172
- {/* <Pdf></Pdf> */}
173
+ <Pdf></Pdf>
173
174
  </HSBC>
174
175
  :
175
176
  <div>
@@ -0,0 +1,78 @@
1
+ import React, { Component } from "react";
2
+
3
+ class pdf extends Component {
4
+ state = {
5
+ isVideo: false,
6
+ tellerAccount: '',
7
+ callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
8
+ businessNumber: '',
9
+ lang: 'zh',
10
+ roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
11
+ baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
12
+ resourcePath:'https://counter-web.leimondata.cn:7199',
13
+ }
14
+ startVideo = () => {
15
+ this.setState({
16
+ isVideo: true
17
+ })
18
+ }
19
+ onLeaveRoom = (val) => {
20
+ console.log(val)
21
+ this.setState({
22
+ isVideo: false
23
+ })
24
+ }
25
+ handleChangeTeller = (event) => {
26
+ this.setState({
27
+ tellerAccount: event.target.value
28
+ })
29
+ }
30
+ handleChangeCall = (event) => {
31
+ this.setState({
32
+ callbackUrl: event.target.value
33
+ })
34
+ }
35
+ handleChangeBysiness = (event) => {
36
+ this.setState({
37
+ businessNumber: event.target.value
38
+ })
39
+ }
40
+
41
+ handleRoomServerUrl = (event) => {
42
+ this.setState({
43
+ roomServerUrl: event.target.value
44
+ })
45
+ }
46
+ handleBaseURL = (event) => {
47
+ this.setState({
48
+ baseURL: event.target.value
49
+ })
50
+ }
51
+ handleResourcePath = (event) => {
52
+ this.setState({
53
+ resourcePath: event.target.value
54
+ })
55
+ }
56
+
57
+ render() {
58
+ return (
59
+ <div className="test">
60
+ {
61
+ <div>
62
+ 坐席账号:<input placeholder="请输入坐席账号" value={this.state.tellerAccount} onChange={e => this.handleChangeTeller(e)}></input>
63
+ 回调地址:<input placeholder="请输入回调地址" value={this.state.callbackUrl} onChange={e => this.handleChangeCall(e)}></input>
64
+ 全局流水号:<input placeholder="请输入全局流水号" value={this.state.businessNumber} onChange={e => this.handleChangeBysiness(e)}></input>
65
+ 阿里服务器地址:<input placeholder="请输入阿里服务器地址" value={this.state.roomServerUrl} onChange={e => this.handleRoomServerUrl(e)}></input>
66
+ 接口地址:<input placeholder="请输入接口地址" value={this.state.baseURL} onChange={e => this.handleBaseURL(e)}></input>
67
+ 阿里资源服务地址:<input placeholder="请输入阿里资源服务地址" value={this.state.resourcePath} onChange={e => this.handleResourcePath(e)}></input>
68
+
69
+ <button className="button" onClick={this.startVideo.bind(this)}>开启视频</button>
70
+ </div>
71
+ }
72
+ </div>
73
+ );
74
+ }
75
+ }
76
+
77
+
78
+ export default pdf;
@@ -113,7 +113,7 @@ export default class foot extends Component {
113
113
  item == 'INVITE' && <div className="one" onClick={this.invitationClick.bind(this)}>
114
114
  <img className="imgClass" src={require("../../assets/img/icon_invitation.png").default} alt="" />
115
115
  <div className="text">
116
- 会议邀请
116
+ 邀请参会者
117
117
  </div>
118
118
  </div>
119
119
  }
@@ -123,7 +123,7 @@ export default class foot extends Component {
123
123
  item == 'PIP' && <div className="one" onClick={this.pictureInPicture.bind(this)}>
124
124
  <img className="imgClass" src={require("../../assets/img/huazhonghua.png").default} alt="" />
125
125
  <div className="text">
126
- 画中画
126
+ 开启视频画中画
127
127
  </div>
128
128
  </div>
129
129
  }
@@ -149,7 +149,7 @@ export default class foot extends Component {
149
149
  <div className="one">
150
150
  <img className="imgClass" src={require("../../assets/img/inspection.png").default} alt="" />
151
151
  <div className="text">
152
- 设备检测
152
+ 设置视频设备
153
153
  </div>
154
154
  </div>
155
155
  </div>
@@ -166,7 +166,7 @@ export default class foot extends Component {
166
166
 
167
167
  <div className="total totalThree">
168
168
  <button className="buttonClass" onClick={this.endSession.bind(this)}>
169
- <span className="spanClass">结束</span>
169
+ <span className="spanClass">结束会议</span>
170
170
  </button>
171
171
  </div>
172
172
  </div>
@@ -23,6 +23,9 @@ width: 100%;
23
23
  align-items: center;
24
24
  flex-wrap: nowrap;
25
25
  }
26
+ .footHover{
27
+ margin: 0 5px;
28
+ }
26
29
  .footHover :hover{
27
30
  background: #F3F3F3;
28
31
  border-radius: 8px;
@@ -31,7 +34,7 @@ width: 100%;
31
34
  margin-top: 8px;
32
35
  padding-bottom: 10px;
33
36
  text-align: center;
34
- width: 80px;
37
+ max-width: 110px;
35
38
  height: 11px;
36
39
  font-size: 14px;
37
40
  font-family: PingFangSC-Regular, PingFang SC;
@@ -50,7 +53,7 @@ line-height: 11px;
50
53
  .buttonClass{
51
54
  font-size: 16px;
52
55
  color: #ffffff;
53
- width: 70px;
56
+ width: 90px;
54
57
  height: 32px;
55
58
  background: #B70000;
56
59
  border-radius: 6px;
@@ -8,7 +8,7 @@ export default class header extends Component {
8
8
  return(
9
9
  <div className="Hamburger">
10
10
  <div className="left-header">
11
- <div className="title">汇丰银行营业厅</div>
11
+ <div className="title">汇丰银行远程会议</div>
12
12
  </div>
13
13
  </div>
14
14
  )
@@ -63,7 +63,7 @@ class Video extends Component {
63
63
  isModalVisibleFacial: false,
64
64
  isModalVisibleEnd: false,
65
65
  isModalVisible: false,
66
- screenName: '投屏',
66
+ screenName: '共享模式',
67
67
  suspendName: '暂停',
68
68
  cameraImg: cameraImgOpen,
69
69
  voiceStatue: false,
@@ -716,8 +716,24 @@ class Video extends Component {
716
716
  const cobj = canvas.getContext('2d'); // 获取绘图环境
717
717
  canvas.width = width;
718
718
  canvas.height = height;
719
-
720
- interval = setInterval(() => {
719
+ let blob = new Blob([
720
+ `
721
+ let timer;
722
+ onmessage = ({data:flag})=>{
723
+ if(!flag){
724
+ clearInterval(timer);
725
+ }else{
726
+ timer = setInterval(function() { postMessage(''); }, 100);
727
+ }
728
+ }
729
+ `,
730
+ ]);
731
+ let url = window.URL.createObjectURL(blob);
732
+ var worker = new Worker(url);
733
+ window.URL.revokeObjectURL(blob);
734
+ let flag1 = true;
735
+
736
+ worker.onmessage =() => {
721
737
  cobj.clearRect(0, 0, width, height);
722
738
  for (let i = 0; i < list.length; i++) {
723
739
 
@@ -856,7 +872,8 @@ class Video extends Component {
856
872
  }
857
873
 
858
874
  }
859
- }, 100);
875
+ };
876
+ worker.postMessage(flag1);
860
877
  const captureStream = canvas.captureStream();
861
878
  const mix_stream = new MediaStream(captureStream);
862
879
  pictureInPictureVideo = document.getElementById('mixedvideo');
@@ -875,7 +892,7 @@ class Video extends Component {
875
892
  pictureInPictureVideo.addEventListener('leavepictureinpicture', (event) => {
876
893
  pictureInPictureVideo.srcObject = null;
877
894
  pictureInPictureVideo.style.display = "none";
878
- clearInterval(interval);
895
+ worker.postMessage(false);
879
896
  this.state.isPictureInPicture = false
880
897
  });
881
898
  }
@@ -1505,6 +1522,9 @@ class Video extends Component {
1505
1522
  // 音视频关闭通知
1506
1523
  this.test_controller.OnMediaClose = (code, sid) => {
1507
1524
  console.log(code, sid)
1525
+ if((code == 5004 || code == 5007) && document.getElementById('publish_video1').name == sid) {
1526
+ this.roomCallBack(2, '媒体链路连接异常/超时',8)
1527
+ }
1508
1528
  };
1509
1529
  // 加入房间成功
1510
1530
  this.test_controller.OnJoinRoomSucc = () => {
@@ -1781,7 +1801,8 @@ class Video extends Component {
1781
1801
  'meetingInfo': {
1782
1802
  'title': this.props.meetingInfo.title,
1783
1803
  'host': this.props.meetingInfo.host,
1784
- 'customers': this.props.meetingInfo.customers
1804
+ 'customers': this.props.meetingInfo.customers,
1805
+ 'otherAttendees': this.props.meetingInfo.otherAttendees
1785
1806
  }
1786
1807
 
1787
1808
  })
@@ -2000,7 +2021,7 @@ class Video extends Component {
2000
2021
  this.state.isSharedScreen = false
2001
2022
  this.setState({
2002
2023
 
2003
- screenName: '投屏'
2024
+ screenName: '共享模式'
2004
2025
  });
2005
2026
  this.tabTitlesClick('RMScreen', 'delect')
2006
2027
  if (this.state.isPictureInPicture) {
@@ -2286,10 +2307,10 @@ class Video extends Component {
2286
2307
  // 切流成功通知
2287
2308
  this.test_controller.OnChangeMediaStreamSuccess = (sid) => {
2288
2309
  console.log('切流成功通知', sid);
2289
- if(this.state.isModalVisibleInspection) {
2290
- this.messageClick('切换摄像头或麦克风成功','success')
2310
+ if(this.state.loading) {
2311
+ this.messageClick('摄像头或麦克风切换成功','success')
2291
2312
  this.setState({
2292
- isModalVisibleInspection: false
2313
+ loading: false
2293
2314
  })
2294
2315
  }
2295
2316
 
@@ -2301,7 +2322,12 @@ class Video extends Component {
2301
2322
  msg
2302
2323
  ) => {
2303
2324
  console.log('切流失败通知', sid, code, msg)
2325
+ if(this.state.loading) {
2326
+ this.setState({
2327
+ loading: false
2328
+ })
2304
2329
  this.messageClick('切换摄像头或麦克风失败,请先检查设备','error')
2330
+ }
2305
2331
  };
2306
2332
  // 服务端录制初始化成功
2307
2333
  this.test_controller.OnInitRemoteRecordSucc = (
@@ -2502,7 +2528,7 @@ class Video extends Component {
2502
2528
  this.timer && clearInterval(this.timer);
2503
2529
  if(this.state.isSharedScreen) {
2504
2530
  this.setState({
2505
- screenName: '投屏',
2531
+ screenName: '共享模式',
2506
2532
  })
2507
2533
  this.state.isSharedScreen = false
2508
2534
  this.state.laveRoomSharedScreen = true
@@ -2517,7 +2543,7 @@ class Video extends Component {
2517
2543
  })
2518
2544
  } else {
2519
2545
  this.setState({
2520
- screenName: '投屏',
2546
+ screenName: '共享模式',
2521
2547
  });
2522
2548
  this.state.isSharedScreen = false
2523
2549
  this.state.laveRoomSharedScreen = true
@@ -2809,7 +2835,7 @@ class Video extends Component {
2809
2835
  this.state.isSharedScreen = false
2810
2836
  this.state.isScreenSwitching = false
2811
2837
  this.setState({
2812
- screenName: '投屏'
2838
+ screenName: '共享模式'
2813
2839
  });
2814
2840
  console.log(pictureInPictureVideo)
2815
2841
  this.tabTitlesClick('RMScreen', 'delect')
@@ -2842,7 +2868,7 @@ class Video extends Component {
2842
2868
  this.tabTitlesClick(
2843
2869
  {
2844
2870
  value: 'RMScreen',
2845
- name: '坐席投屏'
2871
+ name: '共享内容'
2846
2872
  }, 'add'
2847
2873
  )
2848
2874
  if (!this.state.isPictureInPicture) {
@@ -3279,11 +3305,16 @@ class Video extends Component {
3279
3305
  this.test_controller.GetDevices()
3280
3306
  }
3281
3307
  handleOkInspection = () => {
3308
+ this.setState({
3309
+ isModalVisibleInspection: false,
3310
+ loading: true
3311
+ })
3282
3312
  const config = {}
3283
3313
  config.sid = document.getElementById('publish_video1').name
3284
3314
  config.videoSource = this.state.cameraValue
3285
3315
  config.audioSource = this.state.microphoneValue
3286
3316
  this.test_controller.ChangeProfile(config)
3317
+
3287
3318
  }
3288
3319
  handleCancelInspection = () => {
3289
3320
  this.setState({
@@ -3316,6 +3347,21 @@ class Video extends Component {
3316
3347
  if (this.props.children) {
3317
3348
  pdfChildren = React.cloneElement(this.props.children, { width: this.state.whiteboardWidth, height: this.state.whiteboardHeight, show: this.state.isSelect == 'RMWhiteboard'})
3318
3349
  }
3350
+ const otherAttendeesList = (
3351
+ <span className='labelClass'>
3352
+ {(meetingInfo.otherAttendees ? meetingInfo.otherAttendees.length>0 ? true : false : false) &&
3353
+ meetingInfo.otherAttendees.map((item, index) => {
3354
+ return <label key={index}>
3355
+ {item}
3356
+ {
3357
+ meetingInfo.otherAttendees.length > 0 && index != meetingInfo.otherAttendees.length - 1 && <label>,</label>
3358
+ }
3359
+
3360
+ </label>
3361
+ })
3362
+ }
3363
+ </span>
3364
+ )
3319
3365
  const customerNameList = (
3320
3366
  <span className='labelClass'>
3321
3367
  {
@@ -3413,9 +3459,9 @@ class Video extends Component {
3413
3459
  <Header></Header>
3414
3460
  <div className="health">
3415
3461
  <div className="healthVideo">
3416
- <div className="projection">
3462
+ <div className="projection" style={{background: this.state.tabTitles.length > 0 ? '#f0f0f0' : '#ffffff'}}>
3417
3463
  {tabTitleList}
3418
- <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" />
3464
+ {/* <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" /> */}
3419
3465
  <div id="whiteboardDIV" style={{height: this.state.tabTitles.length > 0 ? 'calc(100% - 33px)' : '100%'}}>
3420
3466
 
3421
3467
  <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
@@ -3431,7 +3477,8 @@ class Video extends Component {
3431
3477
  </div>
3432
3478
 
3433
3479
  </div>
3434
- <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMWhiteboard') ? '' : 'none', }}>
3480
+ {/* <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMWhiteboard') ? '' : 'none', }}> */}
3481
+ <div className="videoDiv">
3435
3482
  <div id="touBoxItem">
3436
3483
  {pdfChildren}
3437
3484
  </div>
@@ -3463,9 +3510,17 @@ class Video extends Component {
3463
3510
  <label className='labelClass'>{meetingInfo.host}</label>
3464
3511
  </li>
3465
3512
  <li>
3466
- <span>参会者:</span>
3513
+ <span>客户:</span>
3467
3514
  {customerNameList}
3468
3515
  </li>
3516
+ {
3517
+ (meetingInfo.otherAttendees ? meetingInfo.otherAttendees.length>0 ? true : false : false) && <li>
3518
+ <span>其他参会者:</span>
3519
+ {otherAttendeesList}
3520
+ </li>
3521
+ }
3522
+
3523
+
3469
3524
  </ul>
3470
3525
  </div>
3471
3526
  </div>
@@ -3885,7 +3940,7 @@ class Video extends Component {
3885
3940
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkEnd}>确定</Button>
3886
3941
  </div>
3887
3942
  ]}>
3888
- <div className='endModal'>确定是否结束会话?</div>
3943
+ <div className='endModal'>是否要结束并退出会议?</div>
3889
3944
  </Modal>
3890
3945
  <Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
3891
3946
  <div key='facial'>
@@ -3904,7 +3959,7 @@ class Video extends Component {
3904
3959
  </div>
3905
3960
 
3906
3961
  </Modal> */}
3907
- <Modal className="modelClass" title="新增预约" closable={false} centered={true} visible={this.state.isModalVisibleInvitation} footer={[
3962
+ <Modal className="modelClass" title="邀请参会人员" closable={false} centered={true} visible={this.state.isModalVisibleInvitation} footer={[
3908
3963
  <div key='invitation'>
3909
3964
  <Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>
3910
3965
  {
@@ -3958,21 +4013,21 @@ class Video extends Component {
3958
4013
  ></CanvasDraw>
3959
4014
  </div>
3960
4015
  </Modal>
3961
- <Modal title="设备检测" closable={false} centered={true} visible={this.state.isModalVisibleInspection} footer={[
4016
+ <Modal title="设置视频设备" closable={false} centered={true} visible={this.state.isModalVisibleInspection} footer={[
3962
4017
  <div key='inspection'>
3963
4018
  <Button className="modelButtonCancel" onClick={this.handleCancelInspection}>取消</Button>
3964
4019
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkInspection}>确定</Button>
3965
4020
  </div>
3966
4021
  ]}>
3967
4022
  <div className="inspection">
3968
- <div>摄像头设备:</div>
4023
+ <div>摄像头:</div>
3969
4024
  {camera}
3970
- <div>麦克风设备:</div>
4025
+ <div>麦克风:</div>
3971
4026
  {microphone}
3972
4027
  {
3973
4028
  this.state.speakerList.length > 0 &&
3974
4029
  <span>
3975
- <div>扬声器设备:</div>
4030
+ <div>扬声器:</div>
3976
4031
  {speaker}
3977
4032
  </span>
3978
4033
  }
@@ -3991,7 +4046,7 @@ imRoomId: "Fwua8kGB6@conference.openfire2.leimondata.cn",
3991
4046
  sessionId: "Fwua8kGB6",
3992
4047
  tellerAccount: 't001',
3993
4048
  businessNumber: '123',
3994
- callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
4049
+ callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
3995
4050
  // roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
3996
4051
  roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
3997
4052
 
@@ -4009,7 +4064,8 @@ sessionId: "Fwua8kGB6",
4009
4064
  meetingInfo: {
4010
4065
  title: '--',
4011
4066
  host: '--',
4012
- customers: ['--']
4067
+ customers: ['--'],
4068
+ otherAttendees: undefined
4013
4069
  },
4014
4070
  isTranscribing: false,
4015
4071
  }
@@ -164,7 +164,7 @@
164
164
  .projection{
165
165
  width: 80%;
166
166
  position: relative;
167
- background: #f3f3f3;
167
+ // background: #fff;
168
168
  color: #333;
169
169
  border-radius: 0 4px 4px 4px;
170
170
  text-align: left;