react_hsbc_teller 0.2.5 → 0.2.6
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 +29 -2
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@ class Video extends Component {
|
|
|
52
52
|
voiceStatue: false,
|
|
53
53
|
voiceImg: voiceImgOpen,
|
|
54
54
|
isBigVideo: 'video1',
|
|
55
|
-
isCustomer:
|
|
55
|
+
isCustomer: false,
|
|
56
56
|
publishDevic: 1,
|
|
57
57
|
isSharedScreen: false,
|
|
58
58
|
isSuspend: false,
|
|
@@ -90,8 +90,16 @@ class Video extends Component {
|
|
|
90
90
|
});
|
|
91
91
|
// eslint-disable-next-line no-undef
|
|
92
92
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
93
|
+
this.props.createRoomCallback({
|
|
94
|
+
type: 1,
|
|
95
|
+
errorManage: ''
|
|
96
|
+
})
|
|
93
97
|
} catch (err) {
|
|
94
98
|
console.error(err);
|
|
99
|
+
this.props.createRoomCallback({
|
|
100
|
+
type: 2,
|
|
101
|
+
errorManage: '保存房间信息失败'
|
|
102
|
+
})
|
|
95
103
|
}
|
|
96
104
|
};
|
|
97
105
|
/**
|
|
@@ -115,6 +123,7 @@ class Video extends Component {
|
|
|
115
123
|
}
|
|
116
124
|
} catch (err) {
|
|
117
125
|
console.error(err);
|
|
126
|
+
this.roomCallBack(2,'签名失败')
|
|
118
127
|
}
|
|
119
128
|
};
|
|
120
129
|
handleEdit = () => {
|
|
@@ -470,7 +479,7 @@ class Video extends Component {
|
|
|
470
479
|
} else {
|
|
471
480
|
newVideoHeight1 = subscribeVideoDivHeight * 320 / subscribeVideoDivWidth;
|
|
472
481
|
}
|
|
473
|
-
cobj.drawImage(subscribeVideoDiv, 320, 480 - newVideoHeight1, newVideoWidth1,
|
|
482
|
+
cobj.drawImage(subscribeVideoDiv, 320, 480 - newVideoHeight1, newVideoWidth1, newVideoHeight);
|
|
474
483
|
|
|
475
484
|
}, 100);
|
|
476
485
|
const captureStream = canvas.captureStream();
|
|
@@ -494,6 +503,19 @@ class Video extends Component {
|
|
|
494
503
|
});
|
|
495
504
|
}
|
|
496
505
|
};
|
|
506
|
+
roomCallBack=(type,manege) =>{
|
|
507
|
+
if (this.state.sessionId) {
|
|
508
|
+
this.props.joinRoomCallback({
|
|
509
|
+
type: type,
|
|
510
|
+
errorManage: manege
|
|
511
|
+
})
|
|
512
|
+
}else {
|
|
513
|
+
this.props.createRoomCallback({
|
|
514
|
+
type: type,
|
|
515
|
+
errorManage: manege
|
|
516
|
+
})
|
|
517
|
+
}
|
|
518
|
+
}
|
|
497
519
|
mountClick = () => {
|
|
498
520
|
window.IMEvt = msg => {
|
|
499
521
|
console.log(JSON.parse(msg));
|
|
@@ -619,6 +641,7 @@ class Video extends Component {
|
|
|
619
641
|
};
|
|
620
642
|
this.test_controller.OnConnectFailed = (code, msg) => {
|
|
621
643
|
console.log('建立连接失败', code, msg)
|
|
644
|
+
this.roomCallBack(2,'连接失败')
|
|
622
645
|
};
|
|
623
646
|
// 断开连接回调
|
|
624
647
|
this.test_controller.OnConnectClose = (code, msg) => {
|
|
@@ -632,6 +655,7 @@ class Video extends Component {
|
|
|
632
655
|
// 初始化房间失败
|
|
633
656
|
this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
|
|
634
657
|
console.log('初始化房间失败', err_code, err_msg)
|
|
658
|
+
this.roomCallBack(2,'初始化失败')
|
|
635
659
|
};
|
|
636
660
|
// 初始化成功回调
|
|
637
661
|
this.test_controller.OnInitRoomConfigOK = () => {
|
|
@@ -657,6 +681,7 @@ class Video extends Component {
|
|
|
657
681
|
// 创建房间失败
|
|
658
682
|
this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
|
|
659
683
|
console.log('创建房间失败', err_code, err_msg)
|
|
684
|
+
this.roomCallBack(2,'创建失败')
|
|
660
685
|
};
|
|
661
686
|
// 初始化⾳视频成功
|
|
662
687
|
this.test_controller.OnMediaCallSucc = (sid) => {
|
|
@@ -673,10 +698,12 @@ class Video extends Component {
|
|
|
673
698
|
// 加入房间成功
|
|
674
699
|
this.test_controller.OnJoinRoomSucc = () => {
|
|
675
700
|
console.log('加入房间成功')
|
|
701
|
+
this.roomCallBack(1,'')
|
|
676
702
|
};
|
|
677
703
|
// 加入房间失败
|
|
678
704
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
679
705
|
console.log('加入房间失败', err_code, err_msg)
|
|
706
|
+
this.roomCallBack(2,'加入失败')
|
|
680
707
|
};
|
|
681
708
|
// 发布媒体流成功
|
|
682
709
|
this.test_controller.OnPublishSucc = (sid) => {
|