react_hsbc_teller 1.5.6 → 1.5.9
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/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/video/video.jsx +47 -36
package/package.json
CHANGED
|
@@ -2245,7 +2245,8 @@ class Video extends Component {
|
|
|
2245
2245
|
console.log(array, newArray, this.state.roomCustomerList);
|
|
2246
2246
|
this.state.roomCustomerList = newArray
|
|
2247
2247
|
let config_param
|
|
2248
|
-
if (itemOne.tag
|
|
2248
|
+
if (rateList.indexOf(itemOne.tag) > -1) {
|
|
2249
|
+
// itemOne.tag == 'VIDEO_SOURCE_SCREEN'
|
|
2249
2250
|
config_param = {
|
|
2250
2251
|
subscribe_video_id: 'video21',
|
|
2251
2252
|
subscribe_audio_id: 'audio21',
|
|
@@ -2634,9 +2635,9 @@ class Video extends Component {
|
|
|
2634
2635
|
screenName: '共享模式'
|
|
2635
2636
|
});
|
|
2636
2637
|
this.tabTitlesClick('RMScreen', 'delect')
|
|
2637
|
-
if (this.state.isPictureInPicture) {
|
|
2638
|
-
|
|
2639
|
-
}
|
|
2638
|
+
// if (this.state.isPictureInPicture) {
|
|
2639
|
+
// document.exitPictureInPicture()
|
|
2640
|
+
// }
|
|
2640
2641
|
|
|
2641
2642
|
}
|
|
2642
2643
|
};
|
|
@@ -2993,9 +2994,9 @@ class Video extends Component {
|
|
|
2993
2994
|
});
|
|
2994
2995
|
console.log(pictureInPictureVideo)
|
|
2995
2996
|
this.tabTitlesClick('RMScreen', 'delect')
|
|
2996
|
-
if (this.state.isPictureInPicture) {
|
|
2997
|
-
|
|
2998
|
-
}
|
|
2997
|
+
// if (this.state.isPictureInPicture) {
|
|
2998
|
+
// document.exitPictureInPicture()
|
|
2999
|
+
// }
|
|
2999
3000
|
}
|
|
3000
3001
|
};
|
|
3001
3002
|
// 服务端录制初始化成功
|
|
@@ -3133,9 +3134,9 @@ class Video extends Component {
|
|
|
3133
3134
|
});
|
|
3134
3135
|
console.log(pictureInPictureVideo)
|
|
3135
3136
|
this.tabTitlesClick('RMScreen', 'delect')
|
|
3136
|
-
if (this.state.isPictureInPicture) {
|
|
3137
|
-
|
|
3138
|
-
}
|
|
3137
|
+
// if (this.state.isPictureInPicture) {
|
|
3138
|
+
// document.exitPictureInPicture()
|
|
3139
|
+
// }
|
|
3139
3140
|
// if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
|
|
3140
3141
|
// this.sharedScreen()
|
|
3141
3142
|
// }
|
|
@@ -3209,6 +3210,9 @@ class Video extends Component {
|
|
|
3209
3210
|
clearInterval(value)
|
|
3210
3211
|
})
|
|
3211
3212
|
this.timer && clearInterval(this.timer);
|
|
3213
|
+
if (this.state.isPictureInPicture) {
|
|
3214
|
+
document.exitPictureInPicture()
|
|
3215
|
+
}
|
|
3212
3216
|
if(this.state.isSharedScreen) {
|
|
3213
3217
|
this.setState({
|
|
3214
3218
|
screenName: '共享模式',
|
|
@@ -3216,9 +3220,7 @@ class Video extends Component {
|
|
|
3216
3220
|
this.state.isSharedScreen = false
|
|
3217
3221
|
this.state.laveRoomSharedScreen = true
|
|
3218
3222
|
// this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
3219
|
-
|
|
3220
|
-
document.exitPictureInPicture()
|
|
3221
|
-
}
|
|
3223
|
+
|
|
3222
3224
|
|
|
3223
3225
|
this.props.onLeaveRoom({
|
|
3224
3226
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
@@ -3511,6 +3513,7 @@ class Video extends Component {
|
|
|
3511
3513
|
// publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3512
3514
|
publish_config.enableDesktopAudio=true
|
|
3513
3515
|
publish_config.degradationType=2
|
|
3516
|
+
publish_config.desktopStreamToCanvas=true
|
|
3514
3517
|
publish_config.sid = document.getElementById('video20').name
|
|
3515
3518
|
this.test_controller.ChangeMediaStream(publish_config)
|
|
3516
3519
|
this.state.isScreenSwitching = true
|
|
@@ -3522,6 +3525,7 @@ class Video extends Component {
|
|
|
3522
3525
|
// publish_config.video_profile_type=100
|
|
3523
3526
|
// publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3524
3527
|
publish_config.enableDesktopAudio=true
|
|
3528
|
+
publish_config.desktopStreamToCanvas=true
|
|
3525
3529
|
publish_config.degradationType=2
|
|
3526
3530
|
publish_config.sid = document.getElementById('video20').name;
|
|
3527
3531
|
this.test_controller.ChangeMediaStream(publish_config);
|
|
@@ -3530,6 +3534,7 @@ class Video extends Component {
|
|
|
3530
3534
|
publish_config.publish_device = 2
|
|
3531
3535
|
publish_config.need_volume_analyser = true
|
|
3532
3536
|
publish_config.video_profile_type = 1
|
|
3537
|
+
publish_config.desktopStreamToCanvas=true
|
|
3533
3538
|
// publish_config.video_profile_type=100
|
|
3534
3539
|
// publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3535
3540
|
publish_config.enableDesktopAudio=true
|
|
@@ -4079,14 +4084,18 @@ class Video extends Component {
|
|
|
4079
4084
|
let height = 0
|
|
4080
4085
|
let x = 0
|
|
4081
4086
|
let y = 0
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
width = ((right - left)* 1280 / document.body.clientWidth) - 5
|
|
4087
|
-
height = ((bottom - top)* 1280 / document.body.clientWidth) - 30
|
|
4088
|
-
x = (left* 1280 / document.body.clientWidth)
|
|
4089
|
-
y = (top* 1280 / document.body.clientWidth) + 8
|
|
4087
|
+
width = ((right - left)* window.screen.width / document.body.clientWidth) - 5
|
|
4088
|
+
height = ((bottom - top)* window.screen.width / document.body.clientWidth) - 30
|
|
4089
|
+
x = (left * window.screen.width / document.body.clientWidth)
|
|
4090
|
+
y = (top* window.screen.width / document.body.clientWidth) + 8
|
|
4091
|
+
// width = ((right - left)* 1280 / document.body.clientWidth) - 5
|
|
4092
|
+
// height = ((bottom - top)* 1280 / document.body.clientWidth) - 30
|
|
4093
|
+
// x = (left* 1280 / document.body.clientWidth)
|
|
4094
|
+
// y = (top* 1280 / document.body.clientWidth) + 8
|
|
4095
|
+
// width = ((right - left)) - 5
|
|
4096
|
+
// height = ((bottom - top)) - 30
|
|
4097
|
+
// x = (left)
|
|
4098
|
+
// y = (top) + 8
|
|
4090
4099
|
canvas.width = 960;
|
|
4091
4100
|
canvas.height = 540;
|
|
4092
4101
|
|
|
@@ -4098,6 +4107,7 @@ class Video extends Component {
|
|
|
4098
4107
|
function loop() {
|
|
4099
4108
|
if (!$this.paused && !$this.ended) {
|
|
4100
4109
|
// if(!that.state.tabTitles.find(el=>el.value == 'customerScreen')) {
|
|
4110
|
+
console.log('addEventListener',x, y, width, height)
|
|
4101
4111
|
cobj.drawImage(videoMedia, x, y, width, height, 0, 0,960, 540);
|
|
4102
4112
|
// } else {
|
|
4103
4113
|
// cobj.fillStyle = 'rgb(0 0 0)'
|
|
@@ -4134,10 +4144,10 @@ class Video extends Component {
|
|
|
4134
4144
|
navigator.mediaDevices.getDisplayMedia({
|
|
4135
4145
|
video: true,
|
|
4136
4146
|
preferCurrentTab:true,
|
|
4137
|
-
video: {
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
}
|
|
4147
|
+
// video: {
|
|
4148
|
+
// width: document.body.clientWidth,
|
|
4149
|
+
// height: document.body.clientHeight
|
|
4150
|
+
// }
|
|
4141
4151
|
})
|
|
4142
4152
|
.then((stream) => {
|
|
4143
4153
|
if(streamShare) {
|
|
@@ -4145,12 +4155,12 @@ class Video extends Component {
|
|
|
4145
4155
|
streamShare = ''
|
|
4146
4156
|
}
|
|
4147
4157
|
videoMedia.srcObject = stream;
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4158
|
+
stream.getVideoTracks()[0].applyConstraints({
|
|
4159
|
+
// width: 1280,
|
|
4160
|
+
// height: 720
|
|
4161
|
+
width: window.screen.width,
|
|
4162
|
+
height: window.screen.height
|
|
4163
|
+
})
|
|
4154
4164
|
|
|
4155
4165
|
streamShare = stream
|
|
4156
4166
|
stream.getVideoTracks()[0].onended = async ()=>{
|
|
@@ -4182,9 +4192,9 @@ class Video extends Component {
|
|
|
4182
4192
|
screenName: '共享模式'
|
|
4183
4193
|
});
|
|
4184
4194
|
this.tabTitlesClick('RMScreen', 'delect')
|
|
4185
|
-
if (this.state.isPictureInPicture) {
|
|
4186
|
-
|
|
4187
|
-
}
|
|
4195
|
+
// if (this.state.isPictureInPicture) {
|
|
4196
|
+
// document.exitPictureInPicture()
|
|
4197
|
+
// }
|
|
4188
4198
|
}
|
|
4189
4199
|
}
|
|
4190
4200
|
|
|
@@ -4375,7 +4385,8 @@ class Video extends Component {
|
|
|
4375
4385
|
sendNotification = () =>{
|
|
4376
4386
|
console.log(this.props.shareMask,this.state.shareMaskState)
|
|
4377
4387
|
this.state.shareMaskState = this.props.shareMask
|
|
4378
|
-
//
|
|
4388
|
+
// 加延迟是因为在关闭的时候可以看到部分rm的操作
|
|
4389
|
+
setTimeout(() => {
|
|
4379
4390
|
callNimIM('sendCustomCmdMsg', {
|
|
4380
4391
|
customId: this.state.imRoomId,
|
|
4381
4392
|
content: JSON.stringify({
|
|
@@ -4384,7 +4395,7 @@ class Video extends Component {
|
|
|
4384
4395
|
'type': this.state.shareMaskState ? 1 : 2
|
|
4385
4396
|
})
|
|
4386
4397
|
});
|
|
4387
|
-
|
|
4398
|
+
},100)
|
|
4388
4399
|
|
|
4389
4400
|
}
|
|
4390
4401
|
componentDidUpdate(prevProps){
|