react_hsbc_teller 1.0.3 → 1.0.4
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/demo/demo.js +34 -19
- package/packages/pages/foot/foot.jsx +14 -3
- package/packages/pages/video/video.jsx +48 -13
- package/packages/pages/video/video.less +1 -1
package/package.json
CHANGED
package/packages/demo/demo.js
CHANGED
|
@@ -7,10 +7,10 @@ class Demo extends Component {
|
|
|
7
7
|
// sessionId: "9K9ea1vOM",
|
|
8
8
|
// mtoken: "d4e648858b03",
|
|
9
9
|
// roomId: "645110140224386",
|
|
10
|
-
roomId: '
|
|
11
|
-
mtoken: '
|
|
12
|
-
imRoomId: '
|
|
13
|
-
sessionId: '
|
|
10
|
+
roomId: '',
|
|
11
|
+
mtoken: '',
|
|
12
|
+
imRoomId: '',
|
|
13
|
+
sessionId: '',
|
|
14
14
|
isVideo: false,
|
|
15
15
|
tellerAccount: '00000000',
|
|
16
16
|
callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
|
|
@@ -28,22 +28,23 @@ class Demo extends Component {
|
|
|
28
28
|
titleColor: '#faad14',
|
|
29
29
|
microphoneSize: 50,
|
|
30
30
|
fontSize: 14,
|
|
31
|
-
fontFamily: 'auto'
|
|
31
|
+
fontFamily: 'auto',
|
|
32
|
+
isTranscribing: false
|
|
32
33
|
}
|
|
33
34
|
componentWillMount() {
|
|
34
|
-
if(window.localStorage.getItem('roomId')) {
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
if(window.localStorage.getItem('mtoken')) {
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
if(window.localStorage.getItem('sessionId')) {
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
if(window.localStorage.getItem('imRoomId')) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
35
|
+
// if(window.localStorage.getItem('roomId')) {
|
|
36
|
+
// this.setState({roomId: window.localStorage.getItem('roomId')});
|
|
37
|
+
// }
|
|
38
|
+
// if(window.localStorage.getItem('mtoken')) {
|
|
39
|
+
// this.setState({mtoken: window.localStorage.getItem('mtoken')});
|
|
40
|
+
// }
|
|
41
|
+
// if(window.localStorage.getItem('sessionId')) {
|
|
42
|
+
// this.setState({sessionId: window.localStorage.getItem('sessionId')});
|
|
43
|
+
// }
|
|
44
|
+
// if(window.localStorage.getItem('imRoomId')) {
|
|
45
|
+
// this.setState({imRoomId: window.localStorage.getItem('imRoomId')});
|
|
46
|
+
// this.startVideo()
|
|
47
|
+
// }
|
|
47
48
|
|
|
48
49
|
}
|
|
49
50
|
handleChangeRoomId = (event) => {
|
|
@@ -99,11 +100,19 @@ handleBaseURL = (event) => {
|
|
|
99
100
|
baseURL: event.target.value
|
|
100
101
|
})
|
|
101
102
|
}
|
|
103
|
+
handleChangeisTranscribing = (event) => {
|
|
104
|
+
this.setState({
|
|
105
|
+
isTranscribing: event.target.value
|
|
106
|
+
})
|
|
107
|
+
}
|
|
102
108
|
handleResourcePath = (event) => {
|
|
103
109
|
this.setState({
|
|
104
110
|
resourcePath: event.target.value
|
|
105
111
|
})
|
|
106
112
|
}
|
|
113
|
+
imgCallback=(file)=>{
|
|
114
|
+
console.log(file)
|
|
115
|
+
}
|
|
107
116
|
createRoomCallback=(data)=>{
|
|
108
117
|
console.log('createRoomCallback', data)
|
|
109
118
|
this.setState({roomId: data.data.roomId});
|
|
@@ -143,9 +152,13 @@ joinRoomCallback=(data)=>{
|
|
|
143
152
|
roomServerUrl={this.state.roomServerUrl}
|
|
144
153
|
baseURL={this.state.baseURL}
|
|
145
154
|
resourcePath={this.state.resourcePath}
|
|
155
|
+
isTranscribing={this.state.isTranscribing}
|
|
146
156
|
onLeaveRoom={this.onLeaveRoom}
|
|
147
157
|
createRoomCallback={this.createRoomCallback}
|
|
148
|
-
joinRoomCallback={this.joinRoomCallback}
|
|
158
|
+
joinRoomCallback={this.joinRoomCallback}
|
|
159
|
+
imgCallback={this.imgCallback}
|
|
160
|
+
>
|
|
161
|
+
|
|
149
162
|
{/* <Pdf></Pdf> */}
|
|
150
163
|
</HSBC>
|
|
151
164
|
:
|
|
@@ -162,6 +175,8 @@ joinRoomCallback=(data)=>{
|
|
|
162
175
|
<div>rtoken: <input type="text" value={this.state.mtoken} onChange={this.handleChangeRToken} /></div>
|
|
163
176
|
<div>sessionId: <input type="text" value={this.state.sessionId} onChange={this.handleChangeSessionId} /></div>
|
|
164
177
|
<div>imRoomId: <input type="text" value={this.state.imRoomId} onChange={this.handleChangeImRoomId} /></div>
|
|
178
|
+
<div>isTranscribing: <input type="text" value={this.state.isTranscribing} onChange={this.handleChangeisTranscribing} /></div>
|
|
179
|
+
|
|
165
180
|
<button className="button" onClick={this.startVideo.bind(this)}>开启视频</button>
|
|
166
181
|
</div>
|
|
167
182
|
}
|
|
@@ -50,8 +50,11 @@ export default class foot extends Component {
|
|
|
50
50
|
inspection = ()=>{
|
|
51
51
|
this.props.inspection()
|
|
52
52
|
}
|
|
53
|
+
screenSwitching =()=>{
|
|
54
|
+
this.props.screenSwitching()
|
|
55
|
+
}
|
|
53
56
|
render() {
|
|
54
|
-
const {clickedOcr,clickedFacial,
|
|
57
|
+
const {clickedOcr,clickedFacial,img,cameraImg,isTranscribing ,screenName,suspendName,customerList,menus,voiceName} = this.props
|
|
55
58
|
const content = (
|
|
56
59
|
<div>
|
|
57
60
|
{customerList.map((item,index)=>{
|
|
@@ -69,7 +72,7 @@ export default class foot extends Component {
|
|
|
69
72
|
{
|
|
70
73
|
menus.map((item,index)=>{
|
|
71
74
|
return <div key={index}className='footHover'>
|
|
72
|
-
{
|
|
75
|
+
{/* {
|
|
73
76
|
isTranscribing &&
|
|
74
77
|
<div className="one" onClick={this.transcribingClick.bind(this)}>
|
|
75
78
|
<img className="imgClass"src={require("../../assets/img/icon_copy.png").default} alt="" />
|
|
@@ -77,7 +80,7 @@ export default class foot extends Component {
|
|
|
77
80
|
签字
|
|
78
81
|
</div>
|
|
79
82
|
</div>
|
|
80
|
-
}
|
|
83
|
+
} */}
|
|
81
84
|
{
|
|
82
85
|
item == 'SHARE' && <div className="one" onClick={this.sharedScreen.bind(this)}>
|
|
83
86
|
<img className="imgClass" src={require("../../assets/img/Projection_screen.png").default} alt="" />
|
|
@@ -150,6 +153,14 @@ export default class foot extends Component {
|
|
|
150
153
|
</div>
|
|
151
154
|
</div>
|
|
152
155
|
</div>
|
|
156
|
+
{/* <div className='footHover' onClick={this.screenSwitching.bind(this)}>
|
|
157
|
+
<div className="one">
|
|
158
|
+
<img className="imgClass" src={require("../../assets/img/inspection.png").default} alt="" />
|
|
159
|
+
<div className="text">
|
|
160
|
+
切换投屏
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div> */}
|
|
153
164
|
</div>
|
|
154
165
|
{defaultList}
|
|
155
166
|
|
|
@@ -41,6 +41,7 @@ class Video extends Component {
|
|
|
41
41
|
cancel = axios.CancelToken.source()
|
|
42
42
|
signCanvas = React.createRef();
|
|
43
43
|
state = {
|
|
44
|
+
isScreenSwitching: false,
|
|
44
45
|
whiteboardWidth: '',
|
|
45
46
|
whiteboardHeight: '',
|
|
46
47
|
laveRoomSharedScreen: false,
|
|
@@ -49,7 +50,8 @@ class Video extends Component {
|
|
|
49
50
|
isWhiteboard: false,
|
|
50
51
|
isSelect: '',
|
|
51
52
|
loading: false,
|
|
52
|
-
isModalVisibleSign:
|
|
53
|
+
// isModalVisibleSign: '',
|
|
54
|
+
isModalVisibleSign: this.props.isTranscribing,
|
|
53
55
|
titleModal: '人脸识别',
|
|
54
56
|
faceCustomerType: 1, // 1无感人脸,2ocr
|
|
55
57
|
faceCustomerUid: '',
|
|
@@ -321,8 +323,8 @@ class Video extends Component {
|
|
|
321
323
|
enableServerRecording = () => {
|
|
322
324
|
const filePath = 'recordId_' + new Date().valueOf();
|
|
323
325
|
const recordParam = {};
|
|
324
|
-
recordParam.width =
|
|
325
|
-
recordParam.height =
|
|
326
|
+
recordParam.width = 1280;
|
|
327
|
+
recordParam.height = 720;
|
|
326
328
|
recordParam.recordTotalStream = 0;
|
|
327
329
|
recordParam.startTimeout = 10;
|
|
328
330
|
recordParam.splitType = 0;
|
|
@@ -2286,10 +2288,13 @@ class Video extends Component {
|
|
|
2286
2288
|
// 切流成功通知
|
|
2287
2289
|
this.test_controller.OnChangeMediaStreamSuccess = (sid) => {
|
|
2288
2290
|
console.log('切流成功通知', sid);
|
|
2289
|
-
this.
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2291
|
+
if(this.state.isModalVisibleInspection) {
|
|
2292
|
+
this.messageClick('切换摄像头或麦克风成功','success')
|
|
2293
|
+
this.setState({
|
|
2294
|
+
isModalVisibleInspection: false
|
|
2295
|
+
})
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2293
2298
|
};
|
|
2294
2299
|
// 切流失败通知
|
|
2295
2300
|
this.test_controller.OnChangeMediaStreamFailed = (
|
|
@@ -2411,9 +2416,14 @@ class Video extends Component {
|
|
|
2411
2416
|
// 停止共享
|
|
2412
2417
|
this.test_controller.OnDesktopDisplayClosed = () => {
|
|
2413
2418
|
console.log('OnDesktopDisplayClosed', this.state.isSharedScreen ,this.state.laveRoomSharedScreen)
|
|
2419
|
+
if(this.state.isScreenSwitching) {
|
|
2420
|
+
this.state.isScreenSwitching = false
|
|
2421
|
+
} else {
|
|
2414
2422
|
if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
|
|
2415
2423
|
this.sharedScreen()
|
|
2416
2424
|
}
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2417
2427
|
|
|
2418
2428
|
}
|
|
2419
2429
|
}
|
|
@@ -2766,6 +2776,20 @@ class Video extends Component {
|
|
|
2766
2776
|
}
|
|
2767
2777
|
}
|
|
2768
2778
|
};
|
|
2779
|
+
screenSwitching=()=>{
|
|
2780
|
+
if (this.isFileSuccuse()) {
|
|
2781
|
+
const publish_config = {};
|
|
2782
|
+
if (this.state.isSharedScreen) {
|
|
2783
|
+
const publish_config = {}
|
|
2784
|
+
publish_config.media_type = 1
|
|
2785
|
+
publish_config.publish_device = 2
|
|
2786
|
+
publish_config.video_profile_type = 1
|
|
2787
|
+
publish_config.sid = document.getElementById('video20').name
|
|
2788
|
+
this.test_controller.ChangeMediaStream(publish_config)
|
|
2789
|
+
this.state.isScreenSwitching = true
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2769
2793
|
sharedScreen = () => {
|
|
2770
2794
|
console.log('投屏')
|
|
2771
2795
|
if (this.isFileSuccuse()) {
|
|
@@ -2785,6 +2809,7 @@ class Video extends Component {
|
|
|
2785
2809
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
2786
2810
|
}
|
|
2787
2811
|
this.state.isSharedScreen = false
|
|
2812
|
+
this.state.isScreenSwitching = false
|
|
2788
2813
|
this.setState({
|
|
2789
2814
|
screenName: '投屏'
|
|
2790
2815
|
});
|
|
@@ -2797,20 +2822,21 @@ class Video extends Component {
|
|
|
2797
2822
|
if (document.getElementById('video20').name) {
|
|
2798
2823
|
publish_config.media_type = 1;
|
|
2799
2824
|
publish_config.publish_device = 2;
|
|
2800
|
-
publish_config.video_profile_type =
|
|
2825
|
+
publish_config.video_profile_type = 1;
|
|
2801
2826
|
publish_config.sid = document.getElementById('video20').name;
|
|
2802
2827
|
this.test_controller.ChangeMediaStream(publish_config);
|
|
2803
2828
|
} else {
|
|
2804
2829
|
publish_config.media_type = 1
|
|
2805
2830
|
publish_config.publish_device = 2
|
|
2806
2831
|
publish_config.need_volume_analyser = true
|
|
2807
|
-
publish_config.video_profile_type =
|
|
2832
|
+
publish_config.video_profile_type = 1
|
|
2808
2833
|
publish_config.publish_video_id = 'video20'
|
|
2809
2834
|
publish_config.publish_streamId_id = 'subscribe_streamId20'
|
|
2810
2835
|
publish_config.publish_tag = 'projectionWhiteboard'
|
|
2811
2836
|
this.test_controller.Publish(publish_config)
|
|
2812
2837
|
}
|
|
2813
2838
|
this.state.isSharedScreen = true
|
|
2839
|
+
this.state.isScreenSwitching = false
|
|
2814
2840
|
this.setState({
|
|
2815
2841
|
screenName: '取消共享',
|
|
2816
2842
|
isPDF: false
|
|
@@ -3218,9 +3244,16 @@ class Video extends Component {
|
|
|
3218
3244
|
}
|
|
3219
3245
|
}
|
|
3220
3246
|
handleOkSign = () => {
|
|
3221
|
-
this.
|
|
3222
|
-
|
|
3247
|
+
this.setState({
|
|
3248
|
+
isModalVisibleSign: false,
|
|
3223
3249
|
})
|
|
3250
|
+
console.log(this.signCanvas.current.canvas.drawing.toDataURL('image/png'))
|
|
3251
|
+
this.props.imgCallback(
|
|
3252
|
+
this.signCanvas.current.canvas.drawing.toDataURL('image/png').replace(/data.+?;base64,/, "")
|
|
3253
|
+
)
|
|
3254
|
+
// this.counterSign({
|
|
3255
|
+
// file: this.signCanvas.current.canvas.drawing.toDataURL('image/png')
|
|
3256
|
+
// })
|
|
3224
3257
|
}
|
|
3225
3258
|
switchExternal = () => {
|
|
3226
3259
|
if (!this.state.isWhiteboard) {
|
|
@@ -3869,6 +3902,7 @@ class Video extends Component {
|
|
|
3869
3902
|
ocrClick={this.ocrClick}
|
|
3870
3903
|
switchExternal={this.switchExternal}
|
|
3871
3904
|
inspection={this.inspection}
|
|
3905
|
+
screenSwitching={this.screenSwitching}
|
|
3872
3906
|
></Foot>
|
|
3873
3907
|
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
3874
3908
|
onCancel={this.handleCancel}>
|
|
@@ -3939,7 +3973,7 @@ class Video extends Component {
|
|
|
3939
3973
|
}
|
|
3940
3974
|
|
|
3941
3975
|
</Modal>
|
|
3942
|
-
<Modal title="签字白板" closable={false} centered={true} visible={this.state.isModalVisibleSign} footer={
|
|
3976
|
+
<Modal title="签字白板" width={600} destroyOnClose={true} closable={false} centered={true} visible={this.state.isModalVisibleSign} footer={
|
|
3943
3977
|
[
|
|
3944
3978
|
<div key='okSign'>
|
|
3945
3979
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkSign}>确定</Button>
|
|
@@ -4010,6 +4044,7 @@ sessionId: "Fwua8kGB6",
|
|
|
4010
4044
|
title: '--',
|
|
4011
4045
|
host: '--',
|
|
4012
4046
|
customers: ['--']
|
|
4013
|
-
}
|
|
4047
|
+
},
|
|
4048
|
+
isTranscribing: false,
|
|
4014
4049
|
}
|
|
4015
4050
|
export default Video
|