react_hsbc_teller 1.3.0 → 1.3.3

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.3.0",
3
+ "version": "1.3.3",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -94,7 +94,7 @@ export default class foot extends Component {
94
94
  <div className="one">
95
95
  <img className="imgClass" src={require("../../assets/img/switchExternal.png").default} alt="" />
96
96
  <div className="text">
97
- 白板
97
+ 远程签署
98
98
  </div>
99
99
  </div>
100
100
  </div>
@@ -10,7 +10,7 @@ width: 100%;
10
10
  }
11
11
  .total{
12
12
  display: inline-flex;
13
- width: 33%;
13
+ width: 25%;
14
14
  height: 100%;
15
15
  align-items: center;
16
16
  // margin: 10px 0;
@@ -46,9 +46,12 @@ line-height: 11px;
46
46
  }
47
47
  .totalTwo{
48
48
  justify-content: center;
49
+ width: 50%;
49
50
  }
50
51
  .totalThree{
51
52
  // margin-top: 10px;
53
+ width: 25%;
54
+ padding-right: 20px;
52
55
  justify-content: flex-end;
53
56
  }
54
57
  .buttonClass{
@@ -852,6 +852,7 @@ class Video extends Component {
852
852
  endSessionValue = () => {
853
853
  if(streamShare) {
854
854
  streamShare.getTracks().forEach(track => track.stop());
855
+ streamShare=''
855
856
  }
856
857
  this.finishSession()
857
858
 
@@ -1439,6 +1440,7 @@ class Video extends Component {
1439
1440
  } else if (Mival.type == 2) {
1440
1441
  if(streamShare) {
1441
1442
  streamShare.getTracks().forEach(track => track.stop());
1443
+ streamShare = ''
1442
1444
  }
1443
1445
  this.tabTitlesClick('RMWhiteboard', 'delect')
1444
1446
  if (this.state.isSharedScreen) {
@@ -2311,7 +2313,7 @@ class Video extends Component {
2311
2313
  // 推送“有新发布”给与会者
2312
2314
  this.test_controller.OnNewPublish = (feed) => {
2313
2315
  console.log('有新发布者', feed);
2314
-
2316
+ console.log(new Date())
2315
2317
  callNimIM('sendCustomCmdMsg', {
2316
2318
  customId: this.state.imRoomId,
2317
2319
  content: JSON.stringify({
@@ -3042,36 +3044,31 @@ class Video extends Component {
3042
3044
  // 停止共享
3043
3045
  this.test_controller.OnDesktopDisplayClosed = () => {
3044
3046
  console.log('OnDesktopDisplayClosed', this.state.isSharedScreen ,this.state.laveRoomSharedScreen)
3045
- if(this.state.isScreenSwitching) {
3046
- this.state.isScreenSwitching = false
3047
+
3048
+ if(this.state.isScreenSwitching) {
3049
+ this.state.isScreenSwitching = false
3050
+ } else {
3051
+ if(!streamShare) {
3052
+ document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
3047
3053
  } else {
3048
- // if (this.state.isWhiteboard) {
3049
- // publish_config.publish_device = 4
3050
- // publish_config.media_type = 1
3051
- // publish_config.sid = document.getElementById('video20').name
3052
- // publish_config.part_of_screen_id = 'touBoxItem'
3053
- // publish_config.video_profile_type = 5
3054
- // this.test_controller.ChangeMediaStream(publish_config);
3055
- // this.setState({
3056
- // isPDF: true,
3057
- // })
3058
- // } else {
3059
- document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
3054
+ console.log('白板')
3055
+ }
3056
+ this.state.isSharedScreen = false
3057
+ this.state.isScreenSwitching = false
3058
+ this.setState({
3059
+ screenName: '共享模式'
3060
+ });
3061
+ console.log(pictureInPictureVideo)
3062
+ this.tabTitlesClick('RMScreen', 'delect')
3063
+ if (this.state.isPictureInPicture) {
3064
+ document.exitPictureInPicture()
3065
+ }
3066
+ // if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
3067
+ // this.sharedScreen()
3060
3068
  // }
3061
- this.state.isSharedScreen = false
3062
- this.state.isScreenSwitching = false
3063
- this.setState({
3064
- screenName: '共享模式'
3065
- });
3066
- console.log(pictureInPictureVideo)
3067
- this.tabTitlesClick('RMScreen', 'delect')
3068
- if (this.state.isPictureInPicture) {
3069
- document.exitPictureInPicture()
3070
3069
  }
3071
- // if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
3072
- // this.sharedScreen()
3073
- // }
3074
- }
3070
+
3071
+
3075
3072
 
3076
3073
 
3077
3074
  };
@@ -3455,6 +3452,7 @@ class Video extends Component {
3455
3452
  const publish_config = {};
3456
3453
  if(streamShare) {
3457
3454
  streamShare.getTracks().forEach(track => track.stop());
3455
+ streamShare = ''
3458
3456
  }
3459
3457
  if (this.state.isSharedScreen) {
3460
3458
  const publish_config = {}
@@ -4018,17 +4016,21 @@ class Video extends Component {
4018
4016
  const right = document.getElementById("whiteboardDIV").getBoundingClientRect().right
4019
4017
  const top = document.getElementById("whiteboardDIV").getBoundingClientRect().top
4020
4018
  const bottom = document.getElementById("whiteboardDIV").getBoundingClientRect().bottom
4021
- const width = right - left + 50
4022
- const height = bottom - top
4019
+ const width = (right - left)* window.screen.width / document.body.clientWidth
4020
+ const height = (bottom - top)* window.screen.height / (document.body.clientHeight + 100)
4021
+ const x = left * window.screen.width / document.body.clientWidth
4022
+ const y = top* window.screen.height / (document.body.clientHeight - 50)
4023
4023
  canvas.width = width;
4024
4024
  canvas.height = height;
4025
+ console.log('addEventListener',x,y,width,height)
4025
4026
  videoMedia.addEventListener('play', (event) =>{
4026
4027
  var $this = this; //cache
4027
4028
  console.log('addEventListener',!$this.paused,!$this.ended)
4028
4029
  loop()
4029
4030
  function loop() {
4030
4031
  if (!$this.paused && !$this.ended) {
4031
- cobj.drawImage(videoMedia, left, top, width, height, 0, 0,width, height,);
4032
+ cobj.drawImage(videoMedia, x, y, width, height, 0, 0,width, height,);
4033
+ // cobj.drawImage(videoMedia, 338.4848327636719, 145.45452880859375, 674.6685180664062, 553.39013671875, 0, 0,674.6685180664062, 553.39013671875,);
4032
4034
  setTimeout(loop, 1000 / 10); // drawing at 30fps
4033
4035
  }
4034
4036
  }
@@ -4065,15 +4067,19 @@ class Video extends Component {
4065
4067
  .then((stream) => {
4066
4068
  if(streamShare) {
4067
4069
  streamShare.getTracks().forEach(track => track.stop());
4070
+ streamShare = ''
4068
4071
  }
4069
4072
  videoMedia.srcObject = stream;
4070
4073
  stream.getVideoTracks()[0].applyConstraints({
4071
- width: document.body.offsetWidth,
4072
- height: document.body.offsetHeight
4074
+ // width: document.body.clientWidth,
4075
+ // height: document.body.clientHeight
4076
+ width: window.screen.width,
4077
+ height: window.screen.height
4073
4078
  })
4074
4079
  streamShare = stream
4075
4080
  stream.getVideoTracks()[0].onended = async ()=>{
4076
4081
  //单击停止共享按钮后,触发这个事件
4082
+ streamShare = ''
4077
4083
  if(document.getElementById('video20').name&&!this.state.isSharedScreen) {
4078
4084
  that.test_controller.UnPublish(document.getElementById('video20').name)
4079
4085
  }