react_hsbc_teller 0.9.0 → 0.9.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 +33 -30
- package/src/index.js +2 -2
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ class Video extends Component {
|
|
|
41
41
|
cancel = axios.CancelToken.source()
|
|
42
42
|
signCanvas = React.createRef();
|
|
43
43
|
state = {
|
|
44
|
+
laveRoomSharedScreen: false,
|
|
44
45
|
isJoinRoom: false,
|
|
45
46
|
sessionType: false,
|
|
46
47
|
isWhiteboard: false,
|
|
@@ -137,12 +138,6 @@ class Video extends Component {
|
|
|
137
138
|
// eslint-disable-next-line no-undef
|
|
138
139
|
test_controller = '';
|
|
139
140
|
|
|
140
|
-
componentDidMount() {
|
|
141
|
-
window.onbeforeunload = () => {
|
|
142
|
-
this.finishSession()
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
141
|
/**
|
|
147
142
|
* 创建房间成功后回调后台
|
|
148
143
|
* @param {JSON} data 数据类型
|
|
@@ -2462,9 +2457,24 @@ class Video extends Component {
|
|
|
2462
2457
|
}
|
|
2463
2458
|
// 停止共享
|
|
2464
2459
|
this.test_controller.OnDesktopDisplayClosed = () => {
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2460
|
+
console.log('OnDesktopDisplayClosed', this.state.isSharedScreen ,this.state.laveRoomSharedScreen)
|
|
2461
|
+
// if(this.state.laveRoomSharedScreen) {
|
|
2462
|
+
// if (this.state.roomCustomerList.length == 0 && this.state.sessionType) {
|
|
2463
|
+
// this.finishSessionClick()
|
|
2464
|
+
// }
|
|
2465
|
+
// if (this.test_controller&&this.state.sessionType) {
|
|
2466
|
+
// this.test_controller.LeaveRoom()
|
|
2467
|
+
// this.test_controller.Disconnect()
|
|
2468
|
+
// }
|
|
2469
|
+
// if(this.state.imStatus) {
|
|
2470
|
+
// disconnect();
|
|
2471
|
+
// }
|
|
2472
|
+
// } else {
|
|
2473
|
+
if (this.state.isSharedScreen) {
|
|
2474
|
+
this.sharedScreen()
|
|
2475
|
+
}
|
|
2476
|
+
// }
|
|
2477
|
+
|
|
2468
2478
|
}
|
|
2469
2479
|
}
|
|
2470
2480
|
enterRoom = async () =>{
|
|
@@ -2511,11 +2521,7 @@ class Video extends Component {
|
|
|
2511
2521
|
}
|
|
2512
2522
|
};
|
|
2513
2523
|
componentWillUnmount() {
|
|
2514
|
-
this.clearData()
|
|
2515
|
-
|
|
2516
2524
|
|
|
2517
|
-
}
|
|
2518
|
-
clearData=()=>{
|
|
2519
2525
|
if (this.state.roomCustomerList.length == 0 && this.state.sessionType) {
|
|
2520
2526
|
this.finishSessionClick()
|
|
2521
2527
|
}
|
|
@@ -2526,15 +2532,9 @@ class Video extends Component {
|
|
|
2526
2532
|
if(this.state.imStatus) {
|
|
2527
2533
|
disconnect();
|
|
2528
2534
|
}
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
isPictureInPicture: false,
|
|
2533
|
-
imStatus: false,
|
|
2534
|
-
imJoinRoom: false,
|
|
2535
|
-
sessionType: false
|
|
2536
|
-
});
|
|
2537
|
-
this.timer && clearInterval(this.timer);
|
|
2535
|
+
|
|
2536
|
+
}
|
|
2537
|
+
clearData=()=>{
|
|
2538
2538
|
this.setState = (state, callback) => {
|
|
2539
2539
|
return
|
|
2540
2540
|
}
|
|
@@ -2550,18 +2550,19 @@ class Video extends Component {
|
|
|
2550
2550
|
}
|
|
2551
2551
|
}
|
|
2552
2552
|
finishSession = () => {
|
|
2553
|
+
this.timer && clearInterval(this.timer);
|
|
2553
2554
|
if(this.state.isSharedScreen) {
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
this.tabTitlesClick('RMScreen', 'delect')
|
|
2555
|
+
this.setState({
|
|
2556
|
+
publishDevic: 1,
|
|
2557
|
+
isSharedScreen: false,
|
|
2558
|
+
screenName: '投屏',
|
|
2559
|
+
laveRoomSharedScreen: true
|
|
2560
|
+
});
|
|
2561
|
+
// this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2562
2562
|
if (this.state.isPictureInPicture) {
|
|
2563
2563
|
document.exitPictureInPicture()
|
|
2564
2564
|
}
|
|
2565
|
+
console.log('isSharedScreen', this.state.isSharedScreen)
|
|
2565
2566
|
this.props.onLeaveRoom({
|
|
2566
2567
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
2567
2568
|
errMsg: '坐席退出'
|
|
@@ -2571,7 +2572,9 @@ class Video extends Component {
|
|
|
2571
2572
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
2572
2573
|
errMsg: '坐席退出'
|
|
2573
2574
|
})
|
|
2575
|
+
|
|
2574
2576
|
}
|
|
2577
|
+
|
|
2575
2578
|
|
|
2576
2579
|
}
|
|
2577
2580
|
getRoomStatus = async data => {
|
package/src/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import "./index.less";
|
|
4
4
|
import '@babel/polyfill';
|
|
5
|
-
|
|
6
|
-
import {HSBC} from "../packages";
|
|
5
|
+
import { HSBC } from "../lib/hsbc";
|
|
6
|
+
// import {HSBC} from "../packages";
|
|
7
7
|
|
|
8
8
|
ReactDOM.render(
|
|
9
9
|
<div className="hsbc"><HSBC></HSBC></div>,
|