react_hsbc_teller 1.6.9 → 1.7.2

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.6.9",
3
+ "version": "1.7.2",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -5,10 +5,11 @@ import Pdf from './pdf.js'
5
5
  class Demo extends Component {
6
6
  state = {
7
7
  shareMask: false,
8
- mtoken: "492948d0a7ec",
9
- roomId: "656467744508298",
10
- imRoomId: "ACkhcdtat@conference.openfire2.leimondata.cn",
11
- sessionId: "ACkhcdtat",
8
+ imRoomId: "AIByYlxRE@conference.openfire2.leimondata.cn",
9
+ sessionId: "AIByYlxRE",
10
+ mtoken: "101046e69f16",
11
+ roomId: "657007173551208",
12
+
12
13
  // roomId: '',
13
14
  // mtoken: '',
14
15
  // imRoomId: '',
@@ -55,8 +55,9 @@ handleResourcePath = (event) => {
55
55
  }
56
56
 
57
57
  render() {
58
+ console.log('22',this.props)
58
59
  return (
59
- <div className="test">
60
+ <div className="test" style={{width: this.props.width,height:this.props.height}}>
60
61
  {
61
62
  <div>
62
63
  坐席账号:<input placeholder="请输入坐席账号" value={this.state.tellerAccount} onChange={e => this.handleChangeTeller(e)}></input>
@@ -44,16 +44,13 @@ let messageValue = ''
44
44
  let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
45
45
  let rateList = []
46
46
  let beautyDiv = {};
47
- const CanvasHome = styled.div`
47
+ let CanvasHome = styled.div`
48
48
  position: fixed;
49
- width: 76vw;
50
- height: 74vh;
51
- top: 3vh;
52
- left: 1.5vw;
53
- z-index:999;
49
+ z-index: ${props=>props.zIndexNum};
54
50
 
55
51
  .canvas{
56
52
  width:100%;
53
+
57
54
  height:100%;
58
55
  box-shadow: 0 0 5px 0 #06a;
59
56
  display:none;
@@ -63,8 +60,8 @@ const OpreateDiv = styled.div`
63
60
  display: inline-block;
64
61
  margin-left: 10vw;
65
62
  padding: 0 6px;
66
- height: 4vh;
67
- line-height: 4vh;
63
+ height: 40px;
64
+ line-height: 40px;
68
65
  border-radius: 5px;
69
66
  background: #fff;
70
67
  font-size: 16px;
@@ -111,6 +108,8 @@ class Video extends Component {
111
108
  isScreenSwitching: false,
112
109
  whiteboardWidth: '',
113
110
  whiteboardHeight: '',
111
+ whiteboardTop: '',
112
+ whiteboardLeft: '',
114
113
  laveRoomSharedScreen: false,
115
114
  isJoinRoom: false,
116
115
  sessionType: false,
@@ -250,11 +249,14 @@ class Video extends Component {
250
249
  operateShow: false,
251
250
  drawConfig: {
252
251
  curryControl: 'pen', // 工具类型
253
- }
252
+ },
253
+ zIndexNum: -1,
254
+ selectSpan: 'pen'
254
255
  };
255
256
  // eslint-disable-next-line no-undef
256
257
  test_controller = '';
257
258
 
259
+
258
260
  /**
259
261
  * 创建房间成功后回调后台
260
262
  * @param {JSON} data 数据类型
@@ -492,9 +494,9 @@ class Video extends Component {
492
494
  {
493
495
  tag: 'projectionWhiteboard',
494
496
  xPosition: 0,
495
- yPosition: 175,
496
- width: 960,
497
- height: 540
497
+ yPosition: 270,
498
+ width: 1280,
499
+ height: 720
498
500
  },
499
501
  // {
500
502
  // tag: 'VIDEO_SOURCE_SCREEN_ONE',
@@ -514,43 +516,43 @@ class Video extends Component {
514
516
  tag: 'tag1',
515
517
  xPosition: 0,
516
518
  yPosition: 0,
517
- width: 213,
518
- height: 175
519
+ width: 310,
520
+ height: 180
519
521
  },
520
522
  {
521
523
  tag: 'customer1',
522
- xPosition: 213,
524
+ xPosition: 320,
523
525
  yPosition: 0,
524
- width: 213,
525
- height: 175
526
+ width: 310,
527
+ height: 180
526
528
  },
527
529
  {
528
530
  tag: 'customer2',
529
- xPosition: 426,
531
+ xPosition: 640,
530
532
  yPosition: 0,
531
- width: 213,
532
- height: 175
533
+ width: 310,
534
+ height: 180
533
535
  },
534
536
  {
535
537
  tag: 'customer3',
536
- xPosition: 639,
538
+ xPosition: 960,
537
539
  yPosition: 0,
538
- width: 213,
539
- height: 175
540
+ width: 310,
541
+ height: 180
540
542
  },
541
543
  {
542
544
  tag: 'customer4',
543
- xPosition: 852,
545
+ xPosition: 1280,
544
546
  yPosition: 0,
545
- width: 213,
546
- height: 175
547
+ width: 310,
548
+ height: 180
547
549
  },
548
550
  {
549
551
  tag: 'customer5',
550
- xPosition: 1065,
552
+ xPosition: 1600,
551
553
  yPosition: 0,
552
- width: 213,
553
- height: 175
554
+ width: 310,
555
+ height: 180
554
556
  },
555
557
  // {
556
558
  // tag: 'customer6',
@@ -604,25 +606,17 @@ class Video extends Component {
604
606
  width: item.width,
605
607
  height: item.height
606
608
  })
607
- }) :
608
- list.push({
609
+ }) : list.push({
609
610
  tag: 'VIDEO_SOURCE_SCREEN',
610
- xPosition: 960,
611
- yPosition: 535,
612
- width: 320,
613
- height: 180
611
+ xPosition: 1290,
612
+ yPosition: 640,
613
+ width: 630,
614
+ height: 350
614
615
  })
615
- // list.push({
616
- // tag: 'VIDEO_SOURCE_SCREEN_19_9',
617
- // xPosition: 960,
618
- // yPosition: 573,
619
- // width: 304,
620
- // height: 144
621
- // })
622
616
  const filePath = 'recordId_' + new Date().valueOf();
623
617
  const recordParam = {};
624
- recordParam.width = 1280;
625
- recordParam.height = 720;
618
+ recordParam.width = 1920;
619
+ recordParam.height = 1080;
626
620
  recordParam.recordTotalStream = 0;
627
621
  recordParam.startTimeout = 10;
628
622
  recordParam.splitType = 0;
@@ -3334,7 +3328,7 @@ userType:'1'
3334
3328
  let result = await API.videoRecordCallback({
3335
3329
  activityId: this.props.businessNumber,
3336
3330
  sessionId: this.state.sessionId,
3337
- roomId: this.state.channelId,
3331
+ roomId: this.state.channelId + '',
3338
3332
  type: type,
3339
3333
  status: status
3340
3334
  });
@@ -3530,7 +3524,8 @@ userType:'1'
3530
3524
 
3531
3525
  this.props.resourcePath + "/eruda.js",
3532
3526
  this.props.resourcePath + "/iconfont.js",
3533
- this.props.resourcePath + "/dialogue.css",
3527
+ this.props.resourcePath + "/html2canvas.js",
3528
+ this.props.resourcePath + "/dom-to-image.js",
3534
3529
 
3535
3530
 
3536
3531
 
@@ -3721,7 +3716,7 @@ userType:'1'
3721
3716
  // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3722
3717
  publish_config.enableDesktopAudio=true
3723
3718
  publish_config.degradationType=2
3724
- publish_config.desktopStreamToCanvas=true
3719
+ publish_config.desktopStreamToCanvas=false
3725
3720
  publish_config.sid = document.getElementById('video20').name
3726
3721
  this.test_controller.ChangeMediaStream(publish_config)
3727
3722
  this.state.isScreenSwitching = true
@@ -3733,7 +3728,7 @@ userType:'1'
3733
3728
  // publish_config.video_profile_type=100
3734
3729
  // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3735
3730
  publish_config.enableDesktopAudio=true
3736
- publish_config.desktopStreamToCanvas=true
3731
+ publish_config.desktopStreamToCanvas=false
3737
3732
  publish_config.degradationType=2
3738
3733
  publish_config.sid = document.getElementById('video20').name;
3739
3734
  this.test_controller.ChangeMediaStream(publish_config);
@@ -3742,7 +3737,7 @@ userType:'1'
3742
3737
  publish_config.publish_device = 2
3743
3738
  publish_config.need_volume_analyser = true
3744
3739
  publish_config.video_profile_type = 1
3745
- publish_config.desktopStreamToCanvas=true
3740
+ publish_config.desktopStreamToCanvas=false
3746
3741
  // publish_config.video_profile_type=100
3747
3742
  // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3748
3743
  publish_config.enableDesktopAudio=true
@@ -3767,8 +3762,22 @@ userType:'1'
3767
3762
  if (!this.state.isPictureInPicture) {
3768
3763
  this.pictureInPicture()
3769
3764
  }
3770
-
3765
+
3766
+
3771
3767
  }
3768
+ // const publish_config1 = {};
3769
+ // publish_config1.publish_device = 4;
3770
+ // publish_config1.media_type = 1;
3771
+ // publish_config1.part_of_screen_id = 'whiteboardDIV';
3772
+ // publish_config1.video_profile_type = 2;
3773
+ // publish_config1.degradationType=2
3774
+ // publish_config1.publish_video_id = 'video30';
3775
+ // publish_config1.publish_tag = 'projectionWhiteboard';
3776
+ // publish_config1.capture_interval = 200
3777
+ // publish_config1.capture_mode = 2
3778
+ // publish_config.capture_lib = 'dom2image'
3779
+ // publish_config1.listen_events = ['keyup', 'scroll', 'click','touchstart','touchend','touchmove','mousemove']
3780
+ // this.test_controller.Publish(publish_config1)
3772
3781
  } else {
3773
3782
  this.messageClick('internal staff正在共享屏幕,请先关闭','error')
3774
3783
  }
@@ -4516,7 +4525,7 @@ userType:'1'
4516
4525
  type
4517
4526
  });
4518
4527
 
4519
- this.setState({ drawConfig });
4528
+ this.setState({ drawConfig,selectSpan: type });
4520
4529
  }
4521
4530
 
4522
4531
  setOpreate(type) {
@@ -4539,11 +4548,17 @@ userType:'1'
4539
4548
  }
4540
4549
  graffiti=()=>{
4541
4550
  if(!this.state.operateShow) {
4551
+ this.setState({
4552
+ zIndexNum: 999
4553
+ })
4542
4554
  this.change(true)
4543
4555
  }
4544
4556
 
4545
4557
  }
4546
4558
  closeGraffiti=()=>{
4559
+ this.setState({
4560
+ zIndexNum: -1
4561
+ })
4547
4562
  this.change(false)
4548
4563
  }
4549
4564
  change(val) {
@@ -4635,6 +4650,8 @@ userType:'1'
4635
4650
  if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
4636
4651
  this.state.whiteboardWidth = box.offsetWidth,
4637
4652
  this.state.whiteboardHeight = box.offsetHeight * 0.92,
4653
+ this.state.whiteboardTop = box.getBoundingClientRect().top * 1.08 - 40
4654
+ this.state.whiteboardLeft = box.getBoundingClientRect().left
4638
4655
  console.log('whiteboardDIV', this.state.whiteboardHeight,box.clientHeight,this.state.whiteboardWidth)
4639
4656
  }
4640
4657
  }
@@ -4924,11 +4941,11 @@ userType:'1'
4924
4941
  {tabTitleList}
4925
4942
  {/* <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" /> */}
4926
4943
  <div id="whiteboardDIV" style={{height: 'calc(100% - 33px)'}}>
4927
- <CanvasHome>
4944
+ <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'}}>
4928
4945
  {this.state.operateShow &&
4929
4946
  <OpreateDiv id="operate">
4930
- <span onClick={() => this.setTool('pen')}>铅笔</span>
4931
- <span onClick={() => this.setTool('eraser')}>橡皮</span>
4947
+ <span style={{color: this.state.selectSpan == 'pen' ? '#1890ff' : '#333'}} onClick={() => this.setTool('pen')}>铅笔</span>
4948
+ <span style={{color: this.state.selectSpan == 'eraser' ? '#1890ff' : '#333'}} onClick={() => this.setTool('eraser')}>橡皮</span>
4932
4949
  <span onClick={() => this.setOpreate('undo')}>撤销</span>
4933
4950
  <span onClick={() => this.setOpreate('redo')}>恢复</span>
4934
4951
  <span onClick={() => this.setOpreate('clear')}>清除</span>
@@ -5568,6 +5585,8 @@ userType:'1'
5568
5585
  </Modal>
5569
5586
  <video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
5570
5587
  <video className="mixedvideo" id="manedvideo" autoPlay width="0" height="0"></video>
5588
+ <video className="mixedvideo" id="video30" autoPlay width="0" height="0"></video>
5589
+
5571
5590
 
5572
5591
  </Spin>
5573
5592
  </div>);