react_hsbc_teller 1.5.7 → 1.5.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.5.7",
3
+ "version": "1.5.8",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -3512,6 +3512,7 @@ class Video extends Component {
3512
3512
  // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3513
3513
  publish_config.enableDesktopAudio=true
3514
3514
  publish_config.degradationType=2
3515
+ publish_config.desktopStreamToCanvas=true
3515
3516
  publish_config.sid = document.getElementById('video20').name
3516
3517
  this.test_controller.ChangeMediaStream(publish_config)
3517
3518
  this.state.isScreenSwitching = true
@@ -3523,6 +3524,7 @@ class Video extends Component {
3523
3524
  // publish_config.video_profile_type=100
3524
3525
  // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3525
3526
  publish_config.enableDesktopAudio=true
3527
+ publish_config.desktopStreamToCanvas=true
3526
3528
  publish_config.degradationType=2
3527
3529
  publish_config.sid = document.getElementById('video20').name;
3528
3530
  this.test_controller.ChangeMediaStream(publish_config);
@@ -3531,6 +3533,7 @@ class Video extends Component {
3531
3533
  publish_config.publish_device = 2
3532
3534
  publish_config.need_volume_analyser = true
3533
3535
  publish_config.video_profile_type = 1
3536
+ publish_config.desktopStreamToCanvas=true
3534
3537
  // publish_config.video_profile_type=100
3535
3538
  // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3536
3539
  publish_config.enableDesktopAudio=true
@@ -4080,18 +4083,18 @@ class Video extends Component {
4080
4083
  let height = 0
4081
4084
  let x = 0
4082
4085
  let y = 0
4083
- // width = ((right - left)* window.screen.width / document.body.clientWidth) - 5
4084
- // height = ((bottom - top)* window.screen.width / document.body.clientWidth) - 30
4085
- // x = (left * window.screen.width / document.body.clientWidth)
4086
- // y = (top* window.screen.width / document.body.clientWidth) + 8
4086
+ width = ((right - left)* window.screen.width / document.body.clientWidth) - 5
4087
+ height = ((bottom - top)* window.screen.width / document.body.clientWidth) - 30
4088
+ x = (left * window.screen.width / document.body.clientWidth)
4089
+ y = (top* window.screen.width / document.body.clientWidth) + 8
4087
4090
  // width = ((right - left)* 1280 / document.body.clientWidth) - 5
4088
4091
  // height = ((bottom - top)* 1280 / document.body.clientWidth) - 30
4089
4092
  // x = (left* 1280 / document.body.clientWidth)
4090
4093
  // y = (top* 1280 / document.body.clientWidth) + 8
4091
- width = ((right - left)) - 5
4092
- height = ((bottom - top)) - 30
4093
- x = (left)
4094
- y = (top) + 8
4094
+ // width = ((right - left)) - 5
4095
+ // height = ((bottom - top)) - 30
4096
+ // x = (left)
4097
+ // y = (top) + 8
4095
4098
  canvas.width = 960;
4096
4099
  canvas.height = 540;
4097
4100
 
@@ -4103,6 +4106,7 @@ class Video extends Component {
4103
4106
  function loop() {
4104
4107
  if (!$this.paused && !$this.ended) {
4105
4108
  // if(!that.state.tabTitles.find(el=>el.value == 'customerScreen')) {
4109
+ console.log('addEventListener',x, y, width, height)
4106
4110
  cobj.drawImage(videoMedia, x, y, width, height, 0, 0,960, 540);
4107
4111
  // } else {
4108
4112
  // cobj.fillStyle = 'rgb(0 0 0)'
@@ -4139,10 +4143,10 @@ class Video extends Component {
4139
4143
  navigator.mediaDevices.getDisplayMedia({
4140
4144
  video: true,
4141
4145
  preferCurrentTab:true,
4142
- video: {
4143
- width: document.body.clientWidth,
4144
- height: document.body.clientHeight
4145
- }
4146
+ // video: {
4147
+ // width: document.body.clientWidth,
4148
+ // height: document.body.clientHeight
4149
+ // }
4146
4150
  })
4147
4151
  .then((stream) => {
4148
4152
  if(streamShare) {
@@ -4150,12 +4154,12 @@ class Video extends Component {
4150
4154
  streamShare = ''
4151
4155
  }
4152
4156
  videoMedia.srcObject = stream;
4153
- // stream.getVideoTracks()[0].applyConstraints({
4154
- // width: 1280,
4155
- // height: 720
4156
- // // width: window.screen.width,
4157
- // // height: window.screen.height
4158
- // })
4157
+ stream.getVideoTracks()[0].applyConstraints({
4158
+ // width: 1280,
4159
+ // height: 720
4160
+ width: window.screen.width,
4161
+ height: window.screen.height
4162
+ })
4159
4163
 
4160
4164
  streamShare = stream
4161
4165
  stream.getVideoTracks()[0].onended = async ()=>{