react_hsbc_teller 0.8.0 → 0.8.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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable eqeqeq */
|
|
4
4
|
import React, { Component, useState } from 'react';
|
|
5
5
|
import API from '../../api/api';
|
|
6
|
-
import { initWebSocket, joinRoom } from '../../common/websocket';
|
|
6
|
+
import { initWebSocket, joinRoom, disconnect } from '../../common/websocket';
|
|
7
7
|
import './video.less'
|
|
8
8
|
import Header from '../header/header.jsx'
|
|
9
9
|
import Foot from '../foot/foot.jsx'
|
|
@@ -28,7 +28,11 @@ const LEAVE_TYPE = {
|
|
|
28
28
|
ROOM_DESTROYED: -1, // 房间异常
|
|
29
29
|
}
|
|
30
30
|
let pictureInPictureVideo = ''
|
|
31
|
+
message.config({
|
|
32
|
+
getContainer: ()=>document.getElementById('allHSBC')
|
|
33
|
+
})
|
|
31
34
|
@injectIntl
|
|
35
|
+
|
|
32
36
|
class Video extends Component {
|
|
33
37
|
constructor(props) {
|
|
34
38
|
super(props)
|
|
@@ -37,6 +41,7 @@ class Video extends Component {
|
|
|
37
41
|
cancel = axios.CancelToken.source()
|
|
38
42
|
signCanvas = React.createRef();
|
|
39
43
|
state = {
|
|
44
|
+
isJoinRoom: false,
|
|
40
45
|
sessionType: false,
|
|
41
46
|
isWhiteboard: false,
|
|
42
47
|
isSelect: '',
|
|
@@ -115,7 +120,19 @@ class Video extends Component {
|
|
|
115
120
|
imStatus: false,
|
|
116
121
|
imJoinRoom: false,
|
|
117
122
|
analyserData: new Map(),
|
|
118
|
-
analyserHeight: new Map()
|
|
123
|
+
analyserHeight: new Map(),
|
|
124
|
+
noVideoOne: false,
|
|
125
|
+
noVideoTwo: false,
|
|
126
|
+
noVideoThree: false,
|
|
127
|
+
noVideoFour: false,
|
|
128
|
+
noVideoFive: false,
|
|
129
|
+
noVideoSix: false,
|
|
130
|
+
noVideoSeven: false,
|
|
131
|
+
noVideoEight: false,
|
|
132
|
+
noVideoNine: false,
|
|
133
|
+
noVideoTen: false,
|
|
134
|
+
noVideoEleven: false,
|
|
135
|
+
noVideoTwelve: false,
|
|
119
136
|
};
|
|
120
137
|
// eslint-disable-next-line no-undef
|
|
121
138
|
test_controller = '';
|
|
@@ -142,7 +159,8 @@ class Video extends Component {
|
|
|
142
159
|
console.log(result);
|
|
143
160
|
this.setState({
|
|
144
161
|
imRoomId: result.imRoomId,
|
|
145
|
-
sessionId: result.sessionId
|
|
162
|
+
sessionId: result.sessionId,
|
|
163
|
+
loading: false,
|
|
146
164
|
});
|
|
147
165
|
// eslint-disable-next-line no-undef
|
|
148
166
|
if(this.state.imStatus) {
|
|
@@ -165,15 +183,21 @@ class Video extends Component {
|
|
|
165
183
|
})
|
|
166
184
|
} catch (err) {
|
|
167
185
|
console.error(err);
|
|
186
|
+
|
|
168
187
|
this.setState({
|
|
169
188
|
sessionType: false
|
|
170
189
|
})
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
190
|
+
if(err.status == 502 || err.status== 404) {
|
|
191
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
192
|
+
} else {
|
|
193
|
+
this.props.createRoomCallback({
|
|
194
|
+
type: 2,
|
|
195
|
+
errorManage: '保存房间信息失败',
|
|
196
|
+
errorCode:-9,
|
|
197
|
+
data: {}
|
|
198
|
+
})
|
|
199
|
+
}
|
|
200
|
+
|
|
177
201
|
}
|
|
178
202
|
};
|
|
179
203
|
/**
|
|
@@ -203,7 +227,12 @@ class Video extends Component {
|
|
|
203
227
|
}
|
|
204
228
|
} catch (err) {
|
|
205
229
|
console.error(err);
|
|
206
|
-
|
|
230
|
+
if(err.status == 502 || err.status== 404) {
|
|
231
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
232
|
+
} else {
|
|
233
|
+
this.roomCallBack(2, '签名失败',8)
|
|
234
|
+
}
|
|
235
|
+
|
|
207
236
|
}
|
|
208
237
|
};
|
|
209
238
|
handleEdit = () => {
|
|
@@ -357,6 +386,9 @@ class Video extends Component {
|
|
|
357
386
|
|
|
358
387
|
|
|
359
388
|
} catch (err) {
|
|
389
|
+
if(err.status == 502 || err.status== 404) {
|
|
390
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
391
|
+
}
|
|
360
392
|
console.error(err);
|
|
361
393
|
}
|
|
362
394
|
};
|
|
@@ -376,6 +408,9 @@ class Video extends Component {
|
|
|
376
408
|
|
|
377
409
|
} catch (err) {
|
|
378
410
|
console.error(err);
|
|
411
|
+
if(err.status == 502 || err.status== 404) {
|
|
412
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
413
|
+
}
|
|
379
414
|
}
|
|
380
415
|
};
|
|
381
416
|
dataURLtoFile = (dataURI, type) => {
|
|
@@ -514,13 +549,15 @@ class Video extends Component {
|
|
|
514
549
|
message.error({
|
|
515
550
|
content: value,
|
|
516
551
|
icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
|
|
517
|
-
className: 'errorClassName'
|
|
552
|
+
className: 'errorClassName',
|
|
553
|
+
top: 200
|
|
518
554
|
})
|
|
519
555
|
} else if(valueOne == 'success') {
|
|
520
556
|
message.success({
|
|
521
557
|
content: value,
|
|
522
558
|
icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
|
|
523
|
-
className: 'successClassName'
|
|
559
|
+
className: 'successClassName',
|
|
560
|
+
top: 200
|
|
524
561
|
})
|
|
525
562
|
}
|
|
526
563
|
|
|
@@ -545,11 +582,7 @@ class Video extends Component {
|
|
|
545
582
|
}
|
|
546
583
|
};
|
|
547
584
|
endSessionValue = () => {
|
|
548
|
-
if(this.state.sessionType) {
|
|
549
|
-
this.test_controller.LeaveRoom()
|
|
550
|
-
} else {
|
|
551
585
|
this.finishSession()
|
|
552
|
-
}
|
|
553
586
|
|
|
554
587
|
};
|
|
555
588
|
// 画中画
|
|
@@ -575,49 +608,56 @@ class Video extends Component {
|
|
|
575
608
|
list.push({
|
|
576
609
|
name: 'video1',
|
|
577
610
|
title: this.state.videoOneName,
|
|
578
|
-
voice: 'voiceVideoOne'
|
|
611
|
+
voice: 'voiceVideoOne',
|
|
612
|
+
noVideo: this.state.noVideoOne
|
|
579
613
|
})
|
|
580
614
|
}
|
|
581
615
|
if (document.getElementById('publish_video1').name) {
|
|
582
616
|
list.push({
|
|
583
617
|
name: 'publish_video1',
|
|
584
618
|
title: this.props.meetingInfo.host ? this.props.meetingInfo.host : '坐席',
|
|
585
|
-
voice: 'voiceStatue'
|
|
619
|
+
voice: 'voiceStatue',
|
|
620
|
+
noVideo: false
|
|
586
621
|
})
|
|
587
622
|
}
|
|
588
623
|
if (document.getElementById('video2').name) {
|
|
589
624
|
list.push({
|
|
590
625
|
name: 'video2',
|
|
591
626
|
title: this.state.videoTwoName,
|
|
592
|
-
voice: 'voiceVideoTwo'
|
|
627
|
+
voice: 'voiceVideoTwo',
|
|
628
|
+
noVideo: this.state.noVideoTwo
|
|
593
629
|
})
|
|
594
630
|
}
|
|
595
631
|
if (document.getElementById('video3').name) {
|
|
596
632
|
list.push({
|
|
597
633
|
name: 'video3',
|
|
598
634
|
title: this.state.videoThreeName,
|
|
599
|
-
voice: 'voiceVideoThree'
|
|
635
|
+
voice: 'voiceVideoThree',
|
|
636
|
+
noVideo: this.state.noVideoThree
|
|
600
637
|
})
|
|
601
638
|
}
|
|
602
639
|
if (document.getElementById('video4').name) {
|
|
603
640
|
list.push({
|
|
604
641
|
name: 'video4',
|
|
605
642
|
title: this.state.videoFourName,
|
|
606
|
-
voice: 'voiceVideoFour'
|
|
643
|
+
voice: 'voiceVideoFour',
|
|
644
|
+
noVideo: this.state.noVideoFour
|
|
607
645
|
})
|
|
608
646
|
}
|
|
609
647
|
if (document.getElementById('video5').name) {
|
|
610
648
|
list.push({
|
|
611
649
|
name: 'video5',
|
|
612
650
|
title: this.state.videoFiveName,
|
|
613
|
-
voice: 'voiceVideoFive'
|
|
651
|
+
voice: 'voiceVideoFive',
|
|
652
|
+
noVideo: this.state.noVideoFive
|
|
614
653
|
})
|
|
615
654
|
}
|
|
616
655
|
if (document.getElementById('video6').name) {
|
|
617
656
|
list.push({
|
|
618
657
|
name: 'video6',
|
|
619
658
|
title: this.state.videoSixName,
|
|
620
|
-
voice: 'voiceVideoSix'
|
|
659
|
+
voice: 'voiceVideoSix',
|
|
660
|
+
noVideo: this.state.noVideoSix
|
|
621
661
|
})
|
|
622
662
|
}
|
|
623
663
|
|
|
@@ -625,42 +665,48 @@ class Video extends Component {
|
|
|
625
665
|
list.push({
|
|
626
666
|
name: 'video7',
|
|
627
667
|
title: this.state.videoSevenName,
|
|
628
|
-
voice: 'voiceVideoSeven'
|
|
668
|
+
voice: 'voiceVideoSeven',
|
|
669
|
+
noVideo: this.state.noVideoSeven
|
|
629
670
|
})
|
|
630
671
|
}
|
|
631
672
|
if (document.getElementById('video8').name) {
|
|
632
673
|
list.push({
|
|
633
674
|
name: 'video8',
|
|
634
675
|
title: this.state.videoEightName,
|
|
635
|
-
voice: 'voiceVideoEight'
|
|
676
|
+
voice: 'voiceVideoEight',
|
|
677
|
+
noVideo: this.state.noVideoEight
|
|
636
678
|
})
|
|
637
679
|
}
|
|
638
680
|
if (document.getElementById('video9').name) {
|
|
639
681
|
list.push({
|
|
640
682
|
name: 'video9',
|
|
641
683
|
title: this.state.videoNineName,
|
|
642
|
-
voice: 'voiceVideoNine'
|
|
684
|
+
voice: 'voiceVideoNine',
|
|
685
|
+
noVideo: this.state.noVideoNine
|
|
643
686
|
})
|
|
644
687
|
}
|
|
645
688
|
if (document.getElementById('video10').name) {
|
|
646
689
|
list.push({
|
|
647
690
|
name: 'video10',
|
|
648
691
|
title: this.state.videoTenName,
|
|
649
|
-
voice: 'voiceVideoTen'
|
|
692
|
+
voice: 'voiceVideoTen',
|
|
693
|
+
noVideo: this.state.noVideoTen
|
|
650
694
|
})
|
|
651
695
|
}
|
|
652
696
|
if (document.getElementById('video11').name) {
|
|
653
697
|
list.push({
|
|
654
698
|
name: 'video11',
|
|
655
699
|
title: this.state.videoElevenName,
|
|
656
|
-
voice: 'voiceVideoEleven'
|
|
700
|
+
voice: 'voiceVideoEleven',
|
|
701
|
+
noVideo: this.state.noVideoEleven
|
|
657
702
|
})
|
|
658
703
|
}
|
|
659
704
|
if (document.getElementById('video12').name) {
|
|
660
705
|
list.push({
|
|
661
706
|
name: 'video12',
|
|
662
707
|
title: this.state.videoTwelveName,
|
|
663
|
-
voice: 'voiceVideoTwelve'
|
|
708
|
+
voice: 'voiceVideoTwelve',
|
|
709
|
+
noVideo: this.state.noVideoTwelve
|
|
664
710
|
})
|
|
665
711
|
}
|
|
666
712
|
console.log(list)
|
|
@@ -672,7 +718,7 @@ class Video extends Component {
|
|
|
672
718
|
canvas.height = height;
|
|
673
719
|
|
|
674
720
|
interval = setInterval(() => {
|
|
675
|
-
|
|
721
|
+
cobj.clearRect(0, 0, width, height);
|
|
676
722
|
for (let i = 0; i < list.length; i++) {
|
|
677
723
|
|
|
678
724
|
let videoId = list[i].name;
|
|
@@ -686,8 +732,13 @@ class Video extends Component {
|
|
|
686
732
|
} else {
|
|
687
733
|
newVideoHeight = videoHeight * 640 / videoWidth;
|
|
688
734
|
}
|
|
735
|
+
if(list[i].noVideo){
|
|
736
|
+
cobj.fillStyle = '#333';
|
|
737
|
+
cobj.fillRect((640 - newVideoWidth) / 2, 360 * i, newVideoWidth, newVideoHeight)
|
|
738
|
+
} else {
|
|
739
|
+
cobj.drawImage(videoDiv, (640 - newVideoWidth) / 2, 360 * i, 640, 360);
|
|
689
740
|
|
|
690
|
-
|
|
741
|
+
}
|
|
691
742
|
cobj.beginPath();
|
|
692
743
|
cobj.strokeStyle = this.props.titleColor;
|
|
693
744
|
cobj.fillStyle = this.props.titleBackground;
|
|
@@ -833,8 +884,29 @@ class Video extends Component {
|
|
|
833
884
|
});
|
|
834
885
|
}
|
|
835
886
|
roomCallBack = (type, manege,code) => {
|
|
887
|
+
this.setState({
|
|
888
|
+
loading: false,
|
|
889
|
+
})
|
|
836
890
|
if (this.state.sessionId) {
|
|
837
|
-
|
|
891
|
+
if(code == 'SYS-01' || code == 'SYS-02') {
|
|
892
|
+
this.props.joinRoomCallback({
|
|
893
|
+
type: type,
|
|
894
|
+
errorManage: manege,
|
|
895
|
+
errorCode: code,
|
|
896
|
+
data: {}
|
|
897
|
+
})
|
|
898
|
+
} else {
|
|
899
|
+
this.props.joinRoomCallback({
|
|
900
|
+
type: type,
|
|
901
|
+
errorManage: manege,
|
|
902
|
+
errorCode: 'Join-0' + code,
|
|
903
|
+
data: {}
|
|
904
|
+
})
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
} else {
|
|
908
|
+
if(code == 'SYS-01' || code == 'SYS-02') {
|
|
909
|
+
this.props.createRoomCallback({
|
|
838
910
|
type: type,
|
|
839
911
|
errorManage: manege,
|
|
840
912
|
errorCode: code,
|
|
@@ -844,10 +916,11 @@ class Video extends Component {
|
|
|
844
916
|
this.props.createRoomCallback({
|
|
845
917
|
type: type,
|
|
846
918
|
errorManage: manege,
|
|
847
|
-
errorCode: code,
|
|
919
|
+
errorCode: 'Create-0' + code,
|
|
848
920
|
data: {}
|
|
849
921
|
})
|
|
850
922
|
}
|
|
923
|
+
}
|
|
851
924
|
}
|
|
852
925
|
tabTitlesClick = (value, type) => {
|
|
853
926
|
const { tabTitles } = this.state;
|
|
@@ -894,6 +967,158 @@ class Video extends Component {
|
|
|
894
967
|
// this.endSession('customerHangUp')
|
|
895
968
|
// }
|
|
896
969
|
// }
|
|
970
|
+
else if (Mival.typeId == 3002) {
|
|
971
|
+
if (Mival.data.sessionId == this.state.sessionId) {
|
|
972
|
+
if (Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
|
|
973
|
+
this.setState({
|
|
974
|
+
noVideoOne: true
|
|
975
|
+
})
|
|
976
|
+
}
|
|
977
|
+
if (Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
|
|
978
|
+
|
|
979
|
+
this.setState({
|
|
980
|
+
noVideoTwo: true
|
|
981
|
+
})
|
|
982
|
+
}
|
|
983
|
+
if (Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
|
|
984
|
+
this.setState({
|
|
985
|
+
noVideoThree: true
|
|
986
|
+
})
|
|
987
|
+
|
|
988
|
+
}
|
|
989
|
+
if (Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
|
|
990
|
+
|
|
991
|
+
this.setState({
|
|
992
|
+
noVideoFour: true
|
|
993
|
+
})
|
|
994
|
+
}
|
|
995
|
+
if (Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
|
|
996
|
+
this.setState({
|
|
997
|
+
noVideoFive: true
|
|
998
|
+
})
|
|
999
|
+
|
|
1000
|
+
}
|
|
1001
|
+
if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
1002
|
+
|
|
1003
|
+
this.setState({
|
|
1004
|
+
noVideoSix: true
|
|
1005
|
+
})
|
|
1006
|
+
}
|
|
1007
|
+
if (Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
|
|
1008
|
+
|
|
1009
|
+
this.setState({
|
|
1010
|
+
noVideoSeven: true
|
|
1011
|
+
})
|
|
1012
|
+
}
|
|
1013
|
+
if (Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
|
|
1014
|
+
this.setState({
|
|
1015
|
+
noVideoEight: true
|
|
1016
|
+
})
|
|
1017
|
+
|
|
1018
|
+
}
|
|
1019
|
+
if (Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
|
|
1020
|
+
|
|
1021
|
+
this.setState({
|
|
1022
|
+
noVideoNine: true
|
|
1023
|
+
})
|
|
1024
|
+
}
|
|
1025
|
+
if (Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
|
|
1026
|
+
this.setState({
|
|
1027
|
+
noVideoTen: true
|
|
1028
|
+
})
|
|
1029
|
+
|
|
1030
|
+
}
|
|
1031
|
+
if (Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
|
|
1032
|
+
|
|
1033
|
+
this.setState({
|
|
1034
|
+
noVideoEleven: true
|
|
1035
|
+
})
|
|
1036
|
+
}
|
|
1037
|
+
if (Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
|
|
1038
|
+
|
|
1039
|
+
this.setState({
|
|
1040
|
+
noVideoTwelve: true
|
|
1041
|
+
})
|
|
1042
|
+
}
|
|
1043
|
+
this.pictureInPicture('Refresh')
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
else if (Mival.typeId == 3003) {
|
|
1047
|
+
if (Mival.data.sessionId == this.state.sessionId) {
|
|
1048
|
+
if (Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
|
|
1049
|
+
this.setState({
|
|
1050
|
+
noVideoOne: false
|
|
1051
|
+
})
|
|
1052
|
+
}
|
|
1053
|
+
if (Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
|
|
1054
|
+
|
|
1055
|
+
this.setState({
|
|
1056
|
+
noVideoTwo: false
|
|
1057
|
+
})
|
|
1058
|
+
}
|
|
1059
|
+
if (Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
|
|
1060
|
+
this.setState({
|
|
1061
|
+
noVideoThree: false
|
|
1062
|
+
})
|
|
1063
|
+
|
|
1064
|
+
}
|
|
1065
|
+
if (Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
|
|
1066
|
+
|
|
1067
|
+
this.setState({
|
|
1068
|
+
noVideoFour: false
|
|
1069
|
+
})
|
|
1070
|
+
}
|
|
1071
|
+
if (Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
|
|
1072
|
+
this.setState({
|
|
1073
|
+
noVideoFive: false
|
|
1074
|
+
})
|
|
1075
|
+
|
|
1076
|
+
}
|
|
1077
|
+
if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
1078
|
+
|
|
1079
|
+
this.setState({
|
|
1080
|
+
noVideoSix: false
|
|
1081
|
+
})
|
|
1082
|
+
}
|
|
1083
|
+
if (Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
|
|
1084
|
+
|
|
1085
|
+
this.setState({
|
|
1086
|
+
noVideoSeven: false
|
|
1087
|
+
})
|
|
1088
|
+
}
|
|
1089
|
+
if (Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
|
|
1090
|
+
this.setState({
|
|
1091
|
+
noVideoEight: false
|
|
1092
|
+
})
|
|
1093
|
+
|
|
1094
|
+
}
|
|
1095
|
+
if (Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
|
|
1096
|
+
|
|
1097
|
+
this.setState({
|
|
1098
|
+
noVideoNine: false
|
|
1099
|
+
})
|
|
1100
|
+
}
|
|
1101
|
+
if (Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
|
|
1102
|
+
this.setState({
|
|
1103
|
+
noVideoTen: false
|
|
1104
|
+
})
|
|
1105
|
+
|
|
1106
|
+
}
|
|
1107
|
+
if (Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
|
|
1108
|
+
|
|
1109
|
+
this.setState({
|
|
1110
|
+
noVideoEleven: false
|
|
1111
|
+
})
|
|
1112
|
+
}
|
|
1113
|
+
if (Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
|
|
1114
|
+
|
|
1115
|
+
this.setState({
|
|
1116
|
+
noVideoTwelve: false
|
|
1117
|
+
})
|
|
1118
|
+
}
|
|
1119
|
+
this.pictureInPicture('Refresh')
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
897
1122
|
else if (Mival.typeId == 1215) {
|
|
898
1123
|
// 一炒多的图片
|
|
899
1124
|
if (Mival.sessionId == this.state.sessionId) {
|
|
@@ -1105,7 +1330,7 @@ class Video extends Component {
|
|
|
1105
1330
|
this.setState({
|
|
1106
1331
|
sessionType: false
|
|
1107
1332
|
})
|
|
1108
|
-
this.roomCallBack(2, 'im建立连接失败'
|
|
1333
|
+
this.roomCallBack(2, 'im建立连接失败',7)
|
|
1109
1334
|
} else {
|
|
1110
1335
|
this.setState({
|
|
1111
1336
|
imStatus: msg
|
|
@@ -1209,9 +1434,9 @@ class Video extends Component {
|
|
|
1209
1434
|
this.setState({
|
|
1210
1435
|
cameraList: objList,
|
|
1211
1436
|
microphoneList: objList1,
|
|
1212
|
-
speakerList:
|
|
1437
|
+
speakerList: objList2.length>0? [objList2[0]]: []
|
|
1213
1438
|
})
|
|
1214
|
-
if (!this.state.appId && this.state.sessionType) {
|
|
1439
|
+
if (!this.state.appId && !this.state.sessionType) {
|
|
1215
1440
|
this.mpaasSig(data);
|
|
1216
1441
|
this.setState({
|
|
1217
1442
|
cameraValue: obj[0].actionid,
|
|
@@ -1231,7 +1456,7 @@ class Video extends Component {
|
|
|
1231
1456
|
sessionType: false
|
|
1232
1457
|
})
|
|
1233
1458
|
this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
|
|
1234
|
-
this.roomCallBack(2, '获取设备失败'
|
|
1459
|
+
this.roomCallBack(2, '获取设备失败',1)
|
|
1235
1460
|
};
|
|
1236
1461
|
// 建立连接成功
|
|
1237
1462
|
this.test_controller.OnConnectOK = () => {
|
|
@@ -1243,7 +1468,7 @@ class Video extends Component {
|
|
|
1243
1468
|
this.setState({
|
|
1244
1469
|
sessionType: false
|
|
1245
1470
|
})
|
|
1246
|
-
this.roomCallBack(2, '连接失败'
|
|
1471
|
+
this.roomCallBack(2, '连接失败',2)
|
|
1247
1472
|
};
|
|
1248
1473
|
// 断开连接回调
|
|
1249
1474
|
this.test_controller.OnConnectClose = (code, msg) => {
|
|
@@ -1260,7 +1485,7 @@ class Video extends Component {
|
|
|
1260
1485
|
this.setState({
|
|
1261
1486
|
sessionType: false
|
|
1262
1487
|
})
|
|
1263
|
-
this.roomCallBack(2, '初始化失败'
|
|
1488
|
+
this.roomCallBack(2, '初始化失败',3)
|
|
1264
1489
|
};
|
|
1265
1490
|
// 初始化成功回调
|
|
1266
1491
|
this.test_controller.OnInitRoomConfigOK = () => {
|
|
@@ -1289,7 +1514,7 @@ class Video extends Component {
|
|
|
1289
1514
|
this.setState({
|
|
1290
1515
|
sessionType: false
|
|
1291
1516
|
})
|
|
1292
|
-
this.roomCallBack(2, '创建房间失败'
|
|
1517
|
+
this.roomCallBack(2, '创建房间失败',4)
|
|
1293
1518
|
};
|
|
1294
1519
|
// 初始化⾳视频成功
|
|
1295
1520
|
this.test_controller.OnMediaCallSucc = (sid) => {
|
|
@@ -1311,10 +1536,18 @@ class Video extends Component {
|
|
|
1311
1536
|
// 加入房间失败
|
|
1312
1537
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
1313
1538
|
console.log('加入房间失败', err_code, err_msg)
|
|
1539
|
+
// this.setState({
|
|
1540
|
+
// sessionType: false,
|
|
1541
|
+
// isJoinRoom: true
|
|
1542
|
+
// })
|
|
1543
|
+
// this.roomCallBack(2, '加入失败',-5)
|
|
1314
1544
|
this.setState({
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1545
|
+
channelId: '',
|
|
1546
|
+
rtoken: '',
|
|
1547
|
+
sessionId: '',
|
|
1548
|
+
imRoomId: ''
|
|
1549
|
+
});
|
|
1550
|
+
this.addToScript()
|
|
1318
1551
|
};
|
|
1319
1552
|
// 发布媒体流成功
|
|
1320
1553
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
@@ -1361,7 +1594,7 @@ class Video extends Component {
|
|
|
1361
1594
|
this.setState({
|
|
1362
1595
|
sessionType: false
|
|
1363
1596
|
})
|
|
1364
|
-
this.roomCallBack(2, '发布失败'
|
|
1597
|
+
this.roomCallBack(2, '发布失败',6)
|
|
1365
1598
|
};
|
|
1366
1599
|
// 订阅媒体流成功
|
|
1367
1600
|
this.test_controller.OnSubscribeSucc = (feed, sid) => {
|
|
@@ -1785,12 +2018,14 @@ class Video extends Component {
|
|
|
1785
2018
|
this.setState({
|
|
1786
2019
|
publishDevic: 1,
|
|
1787
2020
|
isSharedScreen: false,
|
|
1788
|
-
screenName: '投屏'
|
|
2021
|
+
screenName: '投屏',
|
|
2022
|
+
sessionType: false
|
|
1789
2023
|
});
|
|
1790
2024
|
this.tabTitlesClick('RMScreen', 'delect')
|
|
1791
2025
|
if (this.state.isPictureInPicture) {
|
|
1792
2026
|
document.exitPictureInPicture()
|
|
1793
2027
|
}
|
|
2028
|
+
|
|
1794
2029
|
}
|
|
1795
2030
|
};
|
|
1796
2031
|
// 取消订阅媒体流成功
|
|
@@ -1906,7 +2141,7 @@ class Video extends Component {
|
|
|
1906
2141
|
// 退出房间回调
|
|
1907
2142
|
this.test_controller.OnLeaveRoom = (leaveType) => {
|
|
1908
2143
|
console.log('退出房间回调', leaveType);
|
|
1909
|
-
|
|
2144
|
+
|
|
1910
2145
|
};
|
|
1911
2146
|
// 推送“退出房间者”给与会者
|
|
1912
2147
|
this.test_controller.OnParticipantLeaveRoom = (
|
|
@@ -2227,6 +2462,9 @@ class Video extends Component {
|
|
|
2227
2462
|
|
|
2228
2463
|
} catch (err) {
|
|
2229
2464
|
console.error(err);
|
|
2465
|
+
if(err.status == 502 || err.status== 404) {
|
|
2466
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
2467
|
+
}
|
|
2230
2468
|
}
|
|
2231
2469
|
};
|
|
2232
2470
|
finishSession = async () => {
|
|
@@ -2239,6 +2477,9 @@ class Video extends Component {
|
|
|
2239
2477
|
tellerId: this.props.tellerAccount
|
|
2240
2478
|
});
|
|
2241
2479
|
} catch (err) {
|
|
2480
|
+
if(err.status == 502 || err.status== 404) {
|
|
2481
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
2482
|
+
}
|
|
2242
2483
|
}
|
|
2243
2484
|
}
|
|
2244
2485
|
this.setState({
|
|
@@ -2247,12 +2488,18 @@ class Video extends Component {
|
|
|
2247
2488
|
isPictureInPicture: false,
|
|
2248
2489
|
imStatus: false,
|
|
2249
2490
|
imJoinRoom: false,
|
|
2250
|
-
sessionType:
|
|
2491
|
+
sessionType: false
|
|
2251
2492
|
});
|
|
2252
2493
|
this.props.onLeaveRoom({
|
|
2253
2494
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
2254
2495
|
errMsg: '坐席退出'
|
|
2255
2496
|
})
|
|
2497
|
+
if(this.state.sessionType) {
|
|
2498
|
+
this.test_controller.LeaveRoom()
|
|
2499
|
+
this.test_controller.Disconnect()
|
|
2500
|
+
disconnect();
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2256
2503
|
|
|
2257
2504
|
}
|
|
2258
2505
|
getRoomStatus = async data => {
|
|
@@ -2301,13 +2548,15 @@ class Video extends Component {
|
|
|
2301
2548
|
this.setState({
|
|
2302
2549
|
loading: true,
|
|
2303
2550
|
})
|
|
2551
|
+
const that = this
|
|
2304
2552
|
axios.get(this.props.resourcePath + "/beauty/beauty.js")
|
|
2305
2553
|
.then(response => this.addToScriptClick()).catch(function (error) {
|
|
2306
2554
|
console.log(error);
|
|
2307
|
-
|
|
2308
|
-
sessionType: false
|
|
2555
|
+
that.setState({
|
|
2556
|
+
sessionType: false,
|
|
2557
|
+
loading: false
|
|
2309
2558
|
})
|
|
2310
|
-
|
|
2559
|
+
that.roomCallBack(2, '加载资源失败','SYS-01')
|
|
2311
2560
|
|
|
2312
2561
|
|
|
2313
2562
|
})
|
|
@@ -2357,9 +2606,6 @@ class Video extends Component {
|
|
|
2357
2606
|
script.onload = () => {
|
|
2358
2607
|
that.test_controller = new McuController();
|
|
2359
2608
|
that.mountClick()
|
|
2360
|
-
that.setState({
|
|
2361
|
-
loading: false,
|
|
2362
|
-
})
|
|
2363
2609
|
}
|
|
2364
2610
|
}
|
|
2365
2611
|
} else {
|
|
@@ -2729,7 +2975,9 @@ class Video extends Component {
|
|
|
2729
2975
|
this.messageClick('发送失败','error')
|
|
2730
2976
|
}
|
|
2731
2977
|
} catch (err) {
|
|
2732
|
-
|
|
2978
|
+
if(err.status == 502 || err.status== 404) {
|
|
2979
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
2980
|
+
}
|
|
2733
2981
|
}
|
|
2734
2982
|
}
|
|
2735
2983
|
handleCancelInvitation = () => {
|
|
@@ -2831,7 +3079,7 @@ class Video extends Component {
|
|
|
2831
3079
|
console.log(result)
|
|
2832
3080
|
let data
|
|
2833
3081
|
if (result.code == 200) {
|
|
2834
|
-
data = result.data.
|
|
3082
|
+
data = result.data.username ? result.data.username : ''
|
|
2835
3083
|
} else {
|
|
2836
3084
|
this.messageClick('查询失败','error')
|
|
2837
3085
|
}
|
|
@@ -2889,7 +3137,9 @@ class Video extends Component {
|
|
|
2889
3137
|
}
|
|
2890
3138
|
this.pictureInPicture('Refresh')
|
|
2891
3139
|
} catch (err) {
|
|
2892
|
-
|
|
3140
|
+
if(err.status == 502 || err.status== 404) {
|
|
3141
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
3142
|
+
}
|
|
2893
3143
|
}
|
|
2894
3144
|
}
|
|
2895
3145
|
linkClick=()=>{
|
|
@@ -2944,7 +3194,9 @@ class Video extends Component {
|
|
|
2944
3194
|
this.messageClick('签字失败','error')
|
|
2945
3195
|
}
|
|
2946
3196
|
} catch (err) {
|
|
2947
|
-
|
|
3197
|
+
if(err.status == 502 || err.status== 404) {
|
|
3198
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
3199
|
+
}
|
|
2948
3200
|
}
|
|
2949
3201
|
}
|
|
2950
3202
|
handleOkSign = () => {
|
|
@@ -3133,7 +3385,7 @@ class Video extends Component {
|
|
|
3133
3385
|
margin: 'auto'
|
|
3134
3386
|
};
|
|
3135
3387
|
return (
|
|
3136
|
-
<div className="all">
|
|
3388
|
+
<div className="all" id="allHSBC">
|
|
3137
3389
|
<Spin spinning={this.state.loading} tip="视频初始化中...">
|
|
3138
3390
|
<Header></Header>
|
|
3139
3391
|
<div className="health">
|
|
@@ -3243,7 +3495,7 @@ class Video extends Component {
|
|
|
3243
3495
|
id="video1"
|
|
3244
3496
|
autoPlay
|
|
3245
3497
|
muted={true}
|
|
3246
|
-
className=
|
|
3498
|
+
className={`video1 ${this.state.noVideoOne ? 'isNoVideo' : ''}`}
|
|
3247
3499
|
/>
|
|
3248
3500
|
<audio id="audio1" autoPlay />
|
|
3249
3501
|
<label style={{ display: 'none' }} id="feedId1" type="text" />
|
|
@@ -3271,7 +3523,7 @@ class Video extends Component {
|
|
|
3271
3523
|
id="video2"
|
|
3272
3524
|
autoPlay
|
|
3273
3525
|
muted={true}
|
|
3274
|
-
className=
|
|
3526
|
+
className={`video ${this.state.noVideoTwo ? 'isNoVideo' : ''}`}
|
|
3275
3527
|
/>
|
|
3276
3528
|
<audio id="audio2" autoPlay />
|
|
3277
3529
|
<label style={{ display: 'none' }} id="feedId2" type="text" />
|
|
@@ -3297,7 +3549,7 @@ class Video extends Component {
|
|
|
3297
3549
|
id="video3"
|
|
3298
3550
|
autoPlay
|
|
3299
3551
|
muted={true}
|
|
3300
|
-
className=
|
|
3552
|
+
className={`video ${this.state.noVideoThree ? 'isNoVideo' : ''}`}
|
|
3301
3553
|
/>
|
|
3302
3554
|
<audio id="audio3" autoPlay />
|
|
3303
3555
|
<label style={{ display: 'none' }} id="feedId3" type="text" />
|
|
@@ -3322,7 +3574,7 @@ class Video extends Component {
|
|
|
3322
3574
|
id="video4"
|
|
3323
3575
|
autoPlay
|
|
3324
3576
|
muted={true}
|
|
3325
|
-
className=
|
|
3577
|
+
className={`video ${this.state.noVideoFour ? 'isNoVideo' : ''}`}
|
|
3326
3578
|
/>
|
|
3327
3579
|
<audio id="audio4" autoPlay />
|
|
3328
3580
|
<label style={{ display: 'none' }} id="feedId4" type="text" />
|
|
@@ -3348,7 +3600,7 @@ class Video extends Component {
|
|
|
3348
3600
|
id="video5"
|
|
3349
3601
|
autoPlay
|
|
3350
3602
|
muted={true}
|
|
3351
|
-
className=
|
|
3603
|
+
className={`video ${this.state.noVideoFive ? 'isNoVideo' : ''}`}
|
|
3352
3604
|
/>
|
|
3353
3605
|
<audio id="audio5" autoPlay />
|
|
3354
3606
|
<label style={{ display: 'none' }} id="feedId5" type="text" />
|
|
@@ -3373,7 +3625,7 @@ class Video extends Component {
|
|
|
3373
3625
|
id="video6"
|
|
3374
3626
|
autoPlay
|
|
3375
3627
|
muted={true}
|
|
3376
|
-
className=
|
|
3628
|
+
className={`video ${this.state.noVideoSix ? 'isNoVideo' : ''}`}
|
|
3377
3629
|
/>
|
|
3378
3630
|
<audio id="audio6" autoPlay />
|
|
3379
3631
|
<label style={{ display: 'none' }} id="feedId6" type="text" />
|
|
@@ -3410,7 +3662,7 @@ class Video extends Component {
|
|
|
3410
3662
|
id="video7"
|
|
3411
3663
|
autoPlay
|
|
3412
3664
|
muted={true}
|
|
3413
|
-
className=
|
|
3665
|
+
className={`video ${this.state.noVideoSeven ? 'isNoVideo' : ''}`}
|
|
3414
3666
|
/>
|
|
3415
3667
|
<audio id="audio7" autoPlay />
|
|
3416
3668
|
<label style={{ display: 'none' }} id="feedId7" type="text" />
|
|
@@ -3438,7 +3690,7 @@ class Video extends Component {
|
|
|
3438
3690
|
id="video8"
|
|
3439
3691
|
autoPlay
|
|
3440
3692
|
muted={true}
|
|
3441
|
-
className=
|
|
3693
|
+
className={`video ${this.state.noVideoEight ? 'isNoVideo' : ''}`}
|
|
3442
3694
|
/>
|
|
3443
3695
|
<audio id="audio8" autoPlay />
|
|
3444
3696
|
<label style={{ display: 'none' }} id="feedId8" type="text" />
|
|
@@ -3463,7 +3715,7 @@ class Video extends Component {
|
|
|
3463
3715
|
id="video9"
|
|
3464
3716
|
autoPlay
|
|
3465
3717
|
muted={true}
|
|
3466
|
-
className=
|
|
3718
|
+
className={`video ${this.state.noVideoNine ? 'isNoVideo' : ''}`}
|
|
3467
3719
|
/>
|
|
3468
3720
|
<audio id="audio9" autoPlay />
|
|
3469
3721
|
<label style={{ display: 'none' }} id="feedId9" type="text" />
|
|
@@ -3490,7 +3742,7 @@ class Video extends Component {
|
|
|
3490
3742
|
id="video10"
|
|
3491
3743
|
autoPlay
|
|
3492
3744
|
muted={true}
|
|
3493
|
-
className=
|
|
3745
|
+
className={`video ${this.state.noVideoTen ? 'isNoVideo' : ''}`}
|
|
3494
3746
|
/>
|
|
3495
3747
|
<audio id="audio10" autoPlay />
|
|
3496
3748
|
<label style={{ display: 'none' }} id="feedId10" type="text" />
|
|
@@ -3515,7 +3767,7 @@ class Video extends Component {
|
|
|
3515
3767
|
id="video11"
|
|
3516
3768
|
autoPlay
|
|
3517
3769
|
muted={true}
|
|
3518
|
-
className=
|
|
3770
|
+
className={`video ${this.state.noVideoEleven ? 'isNoVideo' : ''}`}
|
|
3519
3771
|
/>
|
|
3520
3772
|
<audio id="audio11" autoPlay />
|
|
3521
3773
|
<label style={{ display: 'none' }} id="feedId11" type="text" />
|
|
@@ -3541,7 +3793,7 @@ class Video extends Component {
|
|
|
3541
3793
|
id="video12"
|
|
3542
3794
|
autoPlay
|
|
3543
3795
|
muted={true}
|
|
3544
|
-
className=
|
|
3796
|
+
className={`video ${this.state.noVideoTwelve ? 'isNoVideo' : ''}`}
|
|
3545
3797
|
/>
|
|
3546
3798
|
<audio id="audio12" autoPlay />
|
|
3547
3799
|
<label style={{ display: 'none' }} id="feedId12" type="text" />
|
|
@@ -3632,7 +3884,7 @@ class Video extends Component {
|
|
|
3632
3884
|
<div key='invitation'>
|
|
3633
3885
|
<Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>
|
|
3634
3886
|
{
|
|
3635
|
-
this.state.employeeName &&<Button className='
|
|
3887
|
+
this.state.employeeName &&<Button className='modelButtonOkInvitation'type="primary" danger onClick={this.handleOkInvitation}>邮件发送会议邀请</Button>
|
|
3636
3888
|
}
|
|
3637
3889
|
{
|
|
3638
3890
|
!this.state.employeeName &&<Button className='modelButtonCancelOne' type="primary" danger >邮件发送会议邀请</Button>
|
|
@@ -3693,8 +3945,14 @@ class Video extends Component {
|
|
|
3693
3945
|
{camera}
|
|
3694
3946
|
<div>麦克风设备:</div>
|
|
3695
3947
|
{microphone}
|
|
3696
|
-
|
|
3948
|
+
{
|
|
3949
|
+
this.state.speakerList.length > 0 &&
|
|
3950
|
+
<span>
|
|
3951
|
+
<div>扬声器设备:</div>
|
|
3697
3952
|
{speaker}
|
|
3953
|
+
</span>
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3698
3956
|
</div>
|
|
3699
3957
|
</Modal>
|
|
3700
3958
|
<video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
|