react_hsbc_teller 1.7.8 → 1.8.1
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/foot/foot.jsx +1 -1
- package/packages/pages/video/video.jsx +43 -13
package/package.json
CHANGED
|
@@ -99,7 +99,7 @@ export default class foot extends Component {
|
|
|
99
99
|
</div>
|
|
100
100
|
}
|
|
101
101
|
{
|
|
102
|
-
item == '
|
|
102
|
+
item == 'BACKGROUND'&&<div className='footHover' onClick={this.virtualization.bind(this)}>
|
|
103
103
|
<div className="one">
|
|
104
104
|
<img className="imgClass" src={require("../../assets/img/beijing.png").default} alt="" />
|
|
105
105
|
<div className="text">
|
|
@@ -48,6 +48,7 @@ let beautyDiv = {};
|
|
|
48
48
|
let isBackgroundBlur = true
|
|
49
49
|
let isSuccuseHs = false
|
|
50
50
|
let isGraffiti = false
|
|
51
|
+
let strokeColor = '#333'
|
|
51
52
|
let CanvasHome = styled.div`
|
|
52
53
|
position: fixed;
|
|
53
54
|
z-index: ${props=>props.zIndexNum};
|
|
@@ -2335,15 +2336,7 @@ class Video extends Component {
|
|
|
2335
2336
|
}
|
|
2336
2337
|
}
|
|
2337
2338
|
if(sid == document.getElementById('publish_video1').name) {
|
|
2338
|
-
|
|
2339
|
-
if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
|
|
2340
|
-
this.setState({
|
|
2341
|
-
whiteboardTop: box.getBoundingClientRect().top * 1.08 - 40,
|
|
2342
|
-
whiteboardLeft: box.getBoundingClientRect().left,
|
|
2343
|
-
leftVideo: (box.offsetWidth - this.state.widthVideo)/2 + box.getBoundingClientRect().left
|
|
2344
|
-
})
|
|
2345
|
-
console.log('whiteboardDIV',this.state.whiteboardTop,this.state.whiteboardLeft)
|
|
2346
|
-
}
|
|
2339
|
+
|
|
2347
2340
|
this.setState({
|
|
2348
2341
|
|
|
2349
2342
|
loading: false,
|
|
@@ -2381,6 +2374,21 @@ class Video extends Component {
|
|
|
2381
2374
|
},
|
|
2382
2375
|
1000
|
|
2383
2376
|
);
|
|
2377
|
+
} else {
|
|
2378
|
+
var box=document.getElementById("whiteboardDIV");
|
|
2379
|
+
var box1 = document.getElementById("operate")
|
|
2380
|
+
var height = box1 ? box1.offsetHeight : 40
|
|
2381
|
+
var width = this.state.whiteboardHeight * document.getElementById("video20").videoWidth / document.getElementById("video20").videoHeight
|
|
2382
|
+
if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
|
|
2383
|
+
this.setState({
|
|
2384
|
+
widthVideo: width,
|
|
2385
|
+
whiteboardTop: box.getBoundingClientRect().top - height,
|
|
2386
|
+
whiteboardLeft: box.getBoundingClientRect().left,
|
|
2387
|
+
leftVideo: (box.offsetWidth - width)/2 + box.getBoundingClientRect().left
|
|
2388
|
+
})
|
|
2389
|
+
console.log('whiteboardVideo20',this.state.whiteboardTop,this.state.whiteboardLeft,this.state.widthVideo,this.state.leftVideo)
|
|
2390
|
+
|
|
2391
|
+
}
|
|
2384
2392
|
}
|
|
2385
2393
|
};
|
|
2386
2394
|
// 发布媒体流失败
|
|
@@ -3776,6 +3784,7 @@ userType:'1'
|
|
|
3776
3784
|
}
|
|
3777
3785
|
}
|
|
3778
3786
|
componentWillMount() {
|
|
3787
|
+
console.log('hsbc_teller_sdk', '1.8.1')
|
|
3779
3788
|
if (this.props.sessionId) {
|
|
3780
3789
|
this.getRoomStatus({
|
|
3781
3790
|
sessionId: this.props.sessionId
|
|
@@ -4721,7 +4730,7 @@ userType:'1'
|
|
|
4721
4730
|
openCanvas(drawCanvas) {
|
|
4722
4731
|
if (!this.boardOperate) {
|
|
4723
4732
|
this.boardOperate = new BoardOperate(drawCanvas, {
|
|
4724
|
-
drawColor:
|
|
4733
|
+
drawColor: strokeColor,
|
|
4725
4734
|
drawType: "pen",
|
|
4726
4735
|
lineWidth: 5,
|
|
4727
4736
|
fillStyle: '', // 初始背景色,若为空则透明背景
|
|
@@ -4741,8 +4750,23 @@ userType:'1'
|
|
|
4741
4750
|
});
|
|
4742
4751
|
|
|
4743
4752
|
this.setState({ drawConfig,selectSpan: type });
|
|
4753
|
+
this.boardOperate.drawColor = '#333'
|
|
4744
4754
|
}
|
|
4755
|
+
setStrokeColor() {
|
|
4756
|
+
console.log(this.boardOperate)
|
|
4757
|
+
const { drawConfig } = this.state;
|
|
4758
|
+
const type = 'pen'
|
|
4759
|
+
drawConfig.curryControl = type;
|
|
4760
|
+
this.boardOperate.changeWay({
|
|
4761
|
+
type
|
|
4762
|
+
});
|
|
4745
4763
|
|
|
4764
|
+
this.setState({ drawConfig,selectSpan: type });
|
|
4765
|
+
this.boardOperate.drawColor = '#ff4d4f'
|
|
4766
|
+
this.setState({
|
|
4767
|
+
selectSpan: 'redPen'
|
|
4768
|
+
})
|
|
4769
|
+
}
|
|
4746
4770
|
setOpreate(type) {
|
|
4747
4771
|
this.boardOperate[type]();
|
|
4748
4772
|
}
|
|
@@ -4811,6 +4835,9 @@ userType:'1'
|
|
|
4811
4835
|
this.openCanvas(canvas)
|
|
4812
4836
|
}, 0);
|
|
4813
4837
|
this.graffitiClick()
|
|
4838
|
+
this.setState({
|
|
4839
|
+
selectSpan: 'pen'
|
|
4840
|
+
})
|
|
4814
4841
|
} else {
|
|
4815
4842
|
// this.downCanvas()
|
|
4816
4843
|
this.closeCanvas();
|
|
@@ -4887,11 +4914,13 @@ userType:'1'
|
|
|
4887
4914
|
}
|
|
4888
4915
|
componentDidMount() {
|
|
4889
4916
|
var box=document.getElementById("whiteboardDIV");
|
|
4917
|
+
var box1 = document.getElementById("operate")
|
|
4918
|
+
var height = box1 ? box1.offsetHeight : 40
|
|
4890
4919
|
if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
|
|
4891
4920
|
this.state.whiteboardWidth = box.offsetWidth,
|
|
4892
4921
|
this.state.whiteboardHeight = box.offsetHeight * 0.92,
|
|
4893
4922
|
this.state.widthVideo = this.state.whiteboardHeight * 1280 / 720
|
|
4894
|
-
this.state.whiteboardTop = box.getBoundingClientRect().top
|
|
4923
|
+
this.state.whiteboardTop = box.getBoundingClientRect().top - height
|
|
4895
4924
|
this.state.whiteboardLeft = box.getBoundingClientRect().left
|
|
4896
4925
|
this.state.leftVideo = (box.offsetWidth - this.state.widthVideo)/2 + box.getBoundingClientRect().left
|
|
4897
4926
|
console.log('whiteboardDIV', this.state.whiteboardHeight,this.state.whiteboardWidth,this.state.whiteboardTop,this.state.whiteboardLeft)
|
|
@@ -5201,6 +5230,7 @@ userType:'1'
|
|
|
5201
5230
|
{this.state.operateShow &&
|
|
5202
5231
|
<OpreateDiv id="operate">
|
|
5203
5232
|
<span style={{color: this.state.selectSpan == 'pen' ? '#1890ff' : '#333'}} onClick={() => this.setTool('pen')}>铅笔</span>
|
|
5233
|
+
<span style={{color: this.state.selectSpan == 'redPen' ? '#1890ff' : '#333'}} onClick={() => this.setStrokeColor()}>红笔</span>
|
|
5204
5234
|
<span style={{color: this.state.selectSpan == 'eraser' ? '#1890ff' : '#333'}} onClick={() => this.setTool('eraser')}>橡皮</span>
|
|
5205
5235
|
<span onClick={() => this.setOpreate('undo')}>撤销</span>
|
|
5206
5236
|
<span onClick={() => this.setOpreate('redo')}>恢复</span>
|
|
@@ -5216,7 +5246,7 @@ userType:'1'
|
|
|
5216
5246
|
id="video20"
|
|
5217
5247
|
autoPlay
|
|
5218
5248
|
muted={true}
|
|
5219
|
-
style={{ height: this.state.whiteboardHeight + 'px'
|
|
5249
|
+
style={{ height: this.state.whiteboardHeight + 'px'}}
|
|
5220
5250
|
className="videoTab"
|
|
5221
5251
|
disablePictureInPicture
|
|
5222
5252
|
/>
|
|
@@ -5876,7 +5906,7 @@ sessionId: "",
|
|
|
5876
5906
|
microphoneSize: 25,
|
|
5877
5907
|
fontSize: '14',
|
|
5878
5908
|
fontFamily: 'auto',
|
|
5879
|
-
menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY','GRAFFITI','
|
|
5909
|
+
menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY','GRAFFITI','BACKGROUND'],
|
|
5880
5910
|
customLeaveRoom: '客户离开房间',
|
|
5881
5911
|
meetingInfo: {
|
|
5882
5912
|
title: '--',
|