react_hsbc_teller 1.2.9 → 1.3.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.2.9",
3
+ "version": "1.3.2",
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{
@@ -376,6 +376,7 @@ class Video extends Component {
376
376
  recordParam.startTimeout = 10;
377
377
  recordParam.splitType = 0;
378
378
  recordParam.endType = 1;
379
+ recordParam.crf = 30
379
380
  recordParam.overlaps = [
380
381
  {
381
382
  tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
@@ -851,6 +852,7 @@ class Video extends Component {
851
852
  endSessionValue = () => {
852
853
  if(streamShare) {
853
854
  streamShare.getTracks().forEach(track => track.stop());
855
+ streamShare=''
854
856
  }
855
857
  this.finishSession()
856
858
 
@@ -1438,6 +1440,7 @@ class Video extends Component {
1438
1440
  } else if (Mival.type == 2) {
1439
1441
  if(streamShare) {
1440
1442
  streamShare.getTracks().forEach(track => track.stop());
1443
+ streamShare = ''
1441
1444
  }
1442
1445
  this.tabTitlesClick('RMWhiteboard', 'delect')
1443
1446
  if (this.state.isSharedScreen) {
@@ -2310,7 +2313,7 @@ class Video extends Component {
2310
2313
  // 推送“有新发布”给与会者
2311
2314
  this.test_controller.OnNewPublish = (feed) => {
2312
2315
  console.log('有新发布者', feed);
2313
-
2316
+ console.log(new Date())
2314
2317
  callNimIM('sendCustomCmdMsg', {
2315
2318
  customId: this.state.imRoomId,
2316
2319
  content: JSON.stringify({
@@ -3041,36 +3044,31 @@ class Video extends Component {
3041
3044
  // 停止共享
3042
3045
  this.test_controller.OnDesktopDisplayClosed = () => {
3043
3046
  console.log('OnDesktopDisplayClosed', this.state.isSharedScreen ,this.state.laveRoomSharedScreen)
3044
- if(this.state.isScreenSwitching) {
3045
- 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) : ''
3046
3053
  } else {
3047
- // if (this.state.isWhiteboard) {
3048
- // publish_config.publish_device = 4
3049
- // publish_config.media_type = 1
3050
- // publish_config.sid = document.getElementById('video20').name
3051
- // publish_config.part_of_screen_id = 'touBoxItem'
3052
- // publish_config.video_profile_type = 5
3053
- // this.test_controller.ChangeMediaStream(publish_config);
3054
- // this.setState({
3055
- // isPDF: true,
3056
- // })
3057
- // } else {
3058
- 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()
3059
3068
  // }
3060
- this.state.isSharedScreen = false
3061
- this.state.isScreenSwitching = false
3062
- this.setState({
3063
- screenName: '共享模式'
3064
- });
3065
- console.log(pictureInPictureVideo)
3066
- this.tabTitlesClick('RMScreen', 'delect')
3067
- if (this.state.isPictureInPicture) {
3068
- document.exitPictureInPicture()
3069
3069
  }
3070
- // if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
3071
- // this.sharedScreen()
3072
- // }
3073
- }
3070
+
3071
+
3074
3072
 
3075
3073
 
3076
3074
  };
@@ -3454,6 +3452,7 @@ class Video extends Component {
3454
3452
  const publish_config = {};
3455
3453
  if(streamShare) {
3456
3454
  streamShare.getTracks().forEach(track => track.stop());
3455
+ streamShare = ''
3457
3456
  }
3458
3457
  if (this.state.isSharedScreen) {
3459
3458
  const publish_config = {}
@@ -4017,17 +4016,21 @@ class Video extends Component {
4017
4016
  const right = document.getElementById("whiteboardDIV").getBoundingClientRect().right
4018
4017
  const top = document.getElementById("whiteboardDIV").getBoundingClientRect().top
4019
4018
  const bottom = document.getElementById("whiteboardDIV").getBoundingClientRect().bottom
4020
- const width = right - left + 50
4021
- const height = bottom - top
4019
+ const width = (right - left)* window.screen.width / document.body.clientWidth
4020
+ const height = (bottom - top)* window.screen.width / document.body.clientWidth
4021
+ const x = left * window.screen.width / document.body.clientWidth
4022
+ const y = top
4022
4023
  canvas.width = width;
4023
4024
  canvas.height = height;
4025
+ console.log('addEventListener',x,y,width,height)
4024
4026
  videoMedia.addEventListener('play', (event) =>{
4025
4027
  var $this = this; //cache
4026
4028
  console.log('addEventListener',!$this.paused,!$this.ended)
4027
4029
  loop()
4028
4030
  function loop() {
4029
4031
  if (!$this.paused && !$this.ended) {
4030
- 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,);
4031
4034
  setTimeout(loop, 1000 / 10); // drawing at 30fps
4032
4035
  }
4033
4036
  }
@@ -4064,15 +4067,19 @@ class Video extends Component {
4064
4067
  .then((stream) => {
4065
4068
  if(streamShare) {
4066
4069
  streamShare.getTracks().forEach(track => track.stop());
4070
+ streamShare = ''
4067
4071
  }
4068
4072
  videoMedia.srcObject = stream;
4069
4073
  stream.getVideoTracks()[0].applyConstraints({
4070
- width: document.body.offsetWidth,
4071
- height: document.body.offsetHeight
4074
+ // width: document.body.clientWidth,
4075
+ // height: document.body.clientHeight
4076
+ width: window.screen.width,
4077
+ height: window.screen.height
4072
4078
  })
4073
4079
  streamShare = stream
4074
4080
  stream.getVideoTracks()[0].onended = async ()=>{
4075
4081
  //单击停止共享按钮后,触发这个事件
4082
+ streamShare = ''
4076
4083
  if(document.getElementById('video20').name&&!this.state.isSharedScreen) {
4077
4084
  that.test_controller.UnPublish(document.getElementById('video20').name)
4078
4085
  }