react_hsbc_teller 0.7.8 → 0.8.2
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.
|
@@ -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,7 +41,8 @@ class Video extends Component {
|
|
|
37
41
|
cancel = axios.CancelToken.source()
|
|
38
42
|
signCanvas = React.createRef();
|
|
39
43
|
state = {
|
|
40
|
-
|
|
44
|
+
isJoinRoom: false,
|
|
45
|
+
sessionType: false,
|
|
41
46
|
isWhiteboard: false,
|
|
42
47
|
isSelect: '',
|
|
43
48
|
loading: false,
|
|
@@ -72,10 +77,10 @@ class Video extends Component {
|
|
|
72
77
|
workSpaceId: '',
|
|
73
78
|
bizName: '',
|
|
74
79
|
appId: '',
|
|
75
|
-
channelId:
|
|
76
|
-
rtoken:
|
|
77
|
-
sessionId:
|
|
78
|
-
imRoomId:
|
|
80
|
+
channelId: '',
|
|
81
|
+
rtoken: '',
|
|
82
|
+
sessionId: '',
|
|
83
|
+
imRoomId: '',
|
|
79
84
|
isPictureInPicture: false,
|
|
80
85
|
clickedFacial: false,
|
|
81
86
|
clickedOcr: false,
|
|
@@ -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, '连接服务器失败',-11)
|
|
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, '连接服务器失败',-11)
|
|
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, '连接服务器失败',-11)
|
|
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, '连接服务器失败',-11)
|
|
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
|
|
|
@@ -575,49 +612,56 @@ class Video extends Component {
|
|
|
575
612
|
list.push({
|
|
576
613
|
name: 'video1',
|
|
577
614
|
title: this.state.videoOneName,
|
|
578
|
-
voice: 'voiceVideoOne'
|
|
615
|
+
voice: 'voiceVideoOne',
|
|
616
|
+
noVideo: this.state.noVideoOne
|
|
579
617
|
})
|
|
580
618
|
}
|
|
581
619
|
if (document.getElementById('publish_video1').name) {
|
|
582
620
|
list.push({
|
|
583
621
|
name: 'publish_video1',
|
|
584
622
|
title: this.props.meetingInfo.host ? this.props.meetingInfo.host : '坐席',
|
|
585
|
-
voice: 'voiceStatue'
|
|
623
|
+
voice: 'voiceStatue',
|
|
624
|
+
noVideo: false
|
|
586
625
|
})
|
|
587
626
|
}
|
|
588
627
|
if (document.getElementById('video2').name) {
|
|
589
628
|
list.push({
|
|
590
629
|
name: 'video2',
|
|
591
630
|
title: this.state.videoTwoName,
|
|
592
|
-
voice: 'voiceVideoTwo'
|
|
631
|
+
voice: 'voiceVideoTwo',
|
|
632
|
+
noVideo: this.state.noVideoTwo
|
|
593
633
|
})
|
|
594
634
|
}
|
|
595
635
|
if (document.getElementById('video3').name) {
|
|
596
636
|
list.push({
|
|
597
637
|
name: 'video3',
|
|
598
638
|
title: this.state.videoThreeName,
|
|
599
|
-
voice: 'voiceVideoThree'
|
|
639
|
+
voice: 'voiceVideoThree',
|
|
640
|
+
noVideo: this.state.noVideoThree
|
|
600
641
|
})
|
|
601
642
|
}
|
|
602
643
|
if (document.getElementById('video4').name) {
|
|
603
644
|
list.push({
|
|
604
645
|
name: 'video4',
|
|
605
646
|
title: this.state.videoFourName,
|
|
606
|
-
voice: 'voiceVideoFour'
|
|
647
|
+
voice: 'voiceVideoFour',
|
|
648
|
+
noVideo: this.state.noVideoFour
|
|
607
649
|
})
|
|
608
650
|
}
|
|
609
651
|
if (document.getElementById('video5').name) {
|
|
610
652
|
list.push({
|
|
611
653
|
name: 'video5',
|
|
612
654
|
title: this.state.videoFiveName,
|
|
613
|
-
voice: 'voiceVideoFive'
|
|
655
|
+
voice: 'voiceVideoFive',
|
|
656
|
+
noVideo: this.state.noVideoFive
|
|
614
657
|
})
|
|
615
658
|
}
|
|
616
659
|
if (document.getElementById('video6').name) {
|
|
617
660
|
list.push({
|
|
618
661
|
name: 'video6',
|
|
619
662
|
title: this.state.videoSixName,
|
|
620
|
-
voice: 'voiceVideoSix'
|
|
663
|
+
voice: 'voiceVideoSix',
|
|
664
|
+
noVideo: this.state.noVideoSix
|
|
621
665
|
})
|
|
622
666
|
}
|
|
623
667
|
|
|
@@ -625,42 +669,48 @@ class Video extends Component {
|
|
|
625
669
|
list.push({
|
|
626
670
|
name: 'video7',
|
|
627
671
|
title: this.state.videoSevenName,
|
|
628
|
-
voice: 'voiceVideoSeven'
|
|
672
|
+
voice: 'voiceVideoSeven',
|
|
673
|
+
noVideo: this.state.noVideoSeven
|
|
629
674
|
})
|
|
630
675
|
}
|
|
631
676
|
if (document.getElementById('video8').name) {
|
|
632
677
|
list.push({
|
|
633
678
|
name: 'video8',
|
|
634
679
|
title: this.state.videoEightName,
|
|
635
|
-
voice: 'voiceVideoEight'
|
|
680
|
+
voice: 'voiceVideoEight',
|
|
681
|
+
noVideo: this.state.noVideoEight
|
|
636
682
|
})
|
|
637
683
|
}
|
|
638
684
|
if (document.getElementById('video9').name) {
|
|
639
685
|
list.push({
|
|
640
686
|
name: 'video9',
|
|
641
687
|
title: this.state.videoNineName,
|
|
642
|
-
voice: 'voiceVideoNine'
|
|
688
|
+
voice: 'voiceVideoNine',
|
|
689
|
+
noVideo: this.state.noVideoNine
|
|
643
690
|
})
|
|
644
691
|
}
|
|
645
692
|
if (document.getElementById('video10').name) {
|
|
646
693
|
list.push({
|
|
647
694
|
name: 'video10',
|
|
648
695
|
title: this.state.videoTenName,
|
|
649
|
-
voice: 'voiceVideoTen'
|
|
696
|
+
voice: 'voiceVideoTen',
|
|
697
|
+
noVideo: this.state.noVideoTen
|
|
650
698
|
})
|
|
651
699
|
}
|
|
652
700
|
if (document.getElementById('video11').name) {
|
|
653
701
|
list.push({
|
|
654
702
|
name: 'video11',
|
|
655
703
|
title: this.state.videoElevenName,
|
|
656
|
-
voice: 'voiceVideoEleven'
|
|
704
|
+
voice: 'voiceVideoEleven',
|
|
705
|
+
noVideo: this.state.noVideoEleven
|
|
657
706
|
})
|
|
658
707
|
}
|
|
659
708
|
if (document.getElementById('video12').name) {
|
|
660
709
|
list.push({
|
|
661
710
|
name: 'video12',
|
|
662
711
|
title: this.state.videoTwelveName,
|
|
663
|
-
voice: 'voiceVideoTwelve'
|
|
712
|
+
voice: 'voiceVideoTwelve',
|
|
713
|
+
noVideo: this.state.noVideoTwelve
|
|
664
714
|
})
|
|
665
715
|
}
|
|
666
716
|
console.log(list)
|
|
@@ -686,8 +736,13 @@ class Video extends Component {
|
|
|
686
736
|
} else {
|
|
687
737
|
newVideoHeight = videoHeight * 640 / videoWidth;
|
|
688
738
|
}
|
|
739
|
+
if(list[i].noVideo){
|
|
740
|
+
cobj.fillStyle = '#333';
|
|
741
|
+
cobj.fillRect((640 - newVideoWidth) / 2, 360 * i, newVideoWidth, newVideoHeight)
|
|
742
|
+
} else {
|
|
743
|
+
cobj.drawImage(videoDiv, (640 - newVideoWidth) / 2, 360 * i, 640, 360);
|
|
689
744
|
|
|
690
|
-
|
|
745
|
+
}
|
|
691
746
|
cobj.beginPath();
|
|
692
747
|
cobj.strokeStyle = this.props.titleColor;
|
|
693
748
|
cobj.fillStyle = this.props.titleBackground;
|
|
@@ -833,6 +888,9 @@ class Video extends Component {
|
|
|
833
888
|
});
|
|
834
889
|
}
|
|
835
890
|
roomCallBack = (type, manege,code) => {
|
|
891
|
+
this.setState({
|
|
892
|
+
loading: false,
|
|
893
|
+
})
|
|
836
894
|
if (this.state.sessionId) {
|
|
837
895
|
this.props.joinRoomCallback({
|
|
838
896
|
type: type,
|
|
@@ -894,6 +952,158 @@ class Video extends Component {
|
|
|
894
952
|
// this.endSession('customerHangUp')
|
|
895
953
|
// }
|
|
896
954
|
// }
|
|
955
|
+
else if (Mival.typeId == 3002) {
|
|
956
|
+
if (Mival.data.sessionId == this.state.sessionId) {
|
|
957
|
+
if (Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
|
|
958
|
+
this.setState({
|
|
959
|
+
noVideoOne: true
|
|
960
|
+
})
|
|
961
|
+
}
|
|
962
|
+
if (Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
|
|
963
|
+
|
|
964
|
+
this.setState({
|
|
965
|
+
noVideoTwo: true
|
|
966
|
+
})
|
|
967
|
+
}
|
|
968
|
+
if (Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
|
|
969
|
+
this.setState({
|
|
970
|
+
noVideoThree: true
|
|
971
|
+
})
|
|
972
|
+
|
|
973
|
+
}
|
|
974
|
+
if (Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
|
|
975
|
+
|
|
976
|
+
this.setState({
|
|
977
|
+
noVideoFour: true
|
|
978
|
+
})
|
|
979
|
+
}
|
|
980
|
+
if (Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
|
|
981
|
+
this.setState({
|
|
982
|
+
noVideoFive: true
|
|
983
|
+
})
|
|
984
|
+
|
|
985
|
+
}
|
|
986
|
+
if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
987
|
+
|
|
988
|
+
this.setState({
|
|
989
|
+
noVideoSix: true
|
|
990
|
+
})
|
|
991
|
+
}
|
|
992
|
+
if (Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
|
|
993
|
+
|
|
994
|
+
this.setState({
|
|
995
|
+
noVideoSeven: true
|
|
996
|
+
})
|
|
997
|
+
}
|
|
998
|
+
if (Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
|
|
999
|
+
this.setState({
|
|
1000
|
+
noVideoEight: true
|
|
1001
|
+
})
|
|
1002
|
+
|
|
1003
|
+
}
|
|
1004
|
+
if (Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
|
|
1005
|
+
|
|
1006
|
+
this.setState({
|
|
1007
|
+
noVideoNine: true
|
|
1008
|
+
})
|
|
1009
|
+
}
|
|
1010
|
+
if (Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
|
|
1011
|
+
this.setState({
|
|
1012
|
+
noVideoTen: true
|
|
1013
|
+
})
|
|
1014
|
+
|
|
1015
|
+
}
|
|
1016
|
+
if (Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
|
|
1017
|
+
|
|
1018
|
+
this.setState({
|
|
1019
|
+
noVideoEleven: true
|
|
1020
|
+
})
|
|
1021
|
+
}
|
|
1022
|
+
if (Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
|
|
1023
|
+
|
|
1024
|
+
this.setState({
|
|
1025
|
+
noVideoTwelve: true
|
|
1026
|
+
})
|
|
1027
|
+
}
|
|
1028
|
+
this.pictureInPicture('Refresh')
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
else if (Mival.typeId == 3003) {
|
|
1032
|
+
if (Mival.data.sessionId == this.state.sessionId) {
|
|
1033
|
+
if (Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
|
|
1034
|
+
this.setState({
|
|
1035
|
+
noVideoOne: false
|
|
1036
|
+
})
|
|
1037
|
+
}
|
|
1038
|
+
if (Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
|
|
1039
|
+
|
|
1040
|
+
this.setState({
|
|
1041
|
+
noVideoTwo: false
|
|
1042
|
+
})
|
|
1043
|
+
}
|
|
1044
|
+
if (Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
|
|
1045
|
+
this.setState({
|
|
1046
|
+
noVideoThree: false
|
|
1047
|
+
})
|
|
1048
|
+
|
|
1049
|
+
}
|
|
1050
|
+
if (Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
|
|
1051
|
+
|
|
1052
|
+
this.setState({
|
|
1053
|
+
noVideoFour: false
|
|
1054
|
+
})
|
|
1055
|
+
}
|
|
1056
|
+
if (Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
|
|
1057
|
+
this.setState({
|
|
1058
|
+
noVideoFive: false
|
|
1059
|
+
})
|
|
1060
|
+
|
|
1061
|
+
}
|
|
1062
|
+
if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
1063
|
+
|
|
1064
|
+
this.setState({
|
|
1065
|
+
noVideoSix: false
|
|
1066
|
+
})
|
|
1067
|
+
}
|
|
1068
|
+
if (Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
|
|
1069
|
+
|
|
1070
|
+
this.setState({
|
|
1071
|
+
noVideoSeven: false
|
|
1072
|
+
})
|
|
1073
|
+
}
|
|
1074
|
+
if (Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
|
|
1075
|
+
this.setState({
|
|
1076
|
+
noVideoEight: false
|
|
1077
|
+
})
|
|
1078
|
+
|
|
1079
|
+
}
|
|
1080
|
+
if (Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
|
|
1081
|
+
|
|
1082
|
+
this.setState({
|
|
1083
|
+
noVideoNine: false
|
|
1084
|
+
})
|
|
1085
|
+
}
|
|
1086
|
+
if (Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
|
|
1087
|
+
this.setState({
|
|
1088
|
+
noVideoTen: false
|
|
1089
|
+
})
|
|
1090
|
+
|
|
1091
|
+
}
|
|
1092
|
+
if (Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
|
|
1093
|
+
|
|
1094
|
+
this.setState({
|
|
1095
|
+
noVideoEleven: false
|
|
1096
|
+
})
|
|
1097
|
+
}
|
|
1098
|
+
if (Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
|
|
1099
|
+
|
|
1100
|
+
this.setState({
|
|
1101
|
+
noVideoTwelve: false
|
|
1102
|
+
})
|
|
1103
|
+
}
|
|
1104
|
+
this.pictureInPicture('Refresh')
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
897
1107
|
else if (Mival.typeId == 1215) {
|
|
898
1108
|
// 一炒多的图片
|
|
899
1109
|
if (Mival.sessionId == this.state.sessionId) {
|
|
@@ -1140,7 +1350,7 @@ class Video extends Component {
|
|
|
1140
1350
|
console.log('deviceId' + devicesInfo[i].deviceId);
|
|
1141
1351
|
|
|
1142
1352
|
b.actionid = devicesInfo[i].deviceId;
|
|
1143
|
-
b.groupId = devicesInfo[i].groupId;
|
|
1353
|
+
b.groupId = devicesInfo[i].groupId || 'empty';
|
|
1144
1354
|
if (
|
|
1145
1355
|
devicesInfo[i].label === '' ||
|
|
1146
1356
|
devicesInfo[i].label === undefined ||
|
|
@@ -1154,7 +1364,7 @@ class Video extends Component {
|
|
|
1154
1364
|
} else if (devicesInfo[i].kind === 'audioinput') {
|
|
1155
1365
|
// 麦克风
|
|
1156
1366
|
b.actionid = devicesInfo[i].deviceId;
|
|
1157
|
-
b.groupId = devicesInfo[i].groupId;
|
|
1367
|
+
b.groupId = devicesInfo[i].groupId || 'empty';
|
|
1158
1368
|
if (
|
|
1159
1369
|
devicesInfo[i].label === '' ||
|
|
1160
1370
|
devicesInfo[i].label === undefined ||
|
|
@@ -1168,7 +1378,7 @@ class Video extends Component {
|
|
|
1168
1378
|
} else if (devicesInfo[i].kind === 'audiooutput') {
|
|
1169
1379
|
// 喇叭
|
|
1170
1380
|
b.actionid = devicesInfo[i].deviceId;
|
|
1171
|
-
b.groupId = devicesInfo[i].groupId;
|
|
1381
|
+
b.groupId = devicesInfo[i].groupId || 'empty';
|
|
1172
1382
|
if (
|
|
1173
1383
|
devicesInfo[i].label === '' ||
|
|
1174
1384
|
devicesInfo[i].label === undefined ||
|
|
@@ -1205,12 +1415,13 @@ class Video extends Component {
|
|
|
1205
1415
|
arr2[obj2[i].groupId] = true;
|
|
1206
1416
|
}
|
|
1207
1417
|
}
|
|
1418
|
+
console.log(objList, objList1, objList2 )
|
|
1208
1419
|
this.setState({
|
|
1209
1420
|
cameraList: objList,
|
|
1210
1421
|
microphoneList: objList1,
|
|
1211
|
-
speakerList: [objList2[0]]
|
|
1422
|
+
speakerList: [objList2.length>0? objList2[0]: []]
|
|
1212
1423
|
})
|
|
1213
|
-
if (!this.state.appId && this.state.sessionType) {
|
|
1424
|
+
if (!this.state.appId && !this.state.sessionType) {
|
|
1214
1425
|
this.mpaasSig(data);
|
|
1215
1426
|
this.setState({
|
|
1216
1427
|
cameraValue: obj[0].actionid,
|
|
@@ -1311,13 +1522,17 @@ class Video extends Component {
|
|
|
1311
1522
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
1312
1523
|
console.log('加入房间失败', err_code, err_msg)
|
|
1313
1524
|
this.setState({
|
|
1314
|
-
sessionType: false
|
|
1525
|
+
sessionType: false,
|
|
1526
|
+
isJoinRoom: true
|
|
1315
1527
|
})
|
|
1316
1528
|
this.roomCallBack(2, '加入失败',-5)
|
|
1317
1529
|
};
|
|
1318
1530
|
// 发布媒体流成功
|
|
1319
1531
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
1320
1532
|
console.log('发布媒体流成功', sid)
|
|
1533
|
+
this.setState({
|
|
1534
|
+
sessionType: true
|
|
1535
|
+
})
|
|
1321
1536
|
if (sid == document.getElementById('video20').name) {
|
|
1322
1537
|
callNimIM('sendCustomCmdMsg', {
|
|
1323
1538
|
customId: this.state.imRoomId,
|
|
@@ -1781,12 +1996,14 @@ class Video extends Component {
|
|
|
1781
1996
|
this.setState({
|
|
1782
1997
|
publishDevic: 1,
|
|
1783
1998
|
isSharedScreen: false,
|
|
1784
|
-
screenName: '投屏'
|
|
1999
|
+
screenName: '投屏',
|
|
2000
|
+
sessionType: false
|
|
1785
2001
|
});
|
|
1786
2002
|
this.tabTitlesClick('RMScreen', 'delect')
|
|
1787
2003
|
if (this.state.isPictureInPicture) {
|
|
1788
2004
|
document.exitPictureInPicture()
|
|
1789
2005
|
}
|
|
2006
|
+
|
|
1790
2007
|
}
|
|
1791
2008
|
};
|
|
1792
2009
|
// 取消订阅媒体流成功
|
|
@@ -1902,7 +2119,10 @@ class Video extends Component {
|
|
|
1902
2119
|
// 退出房间回调
|
|
1903
2120
|
this.test_controller.OnLeaveRoom = (leaveType) => {
|
|
1904
2121
|
console.log('退出房间回调', leaveType);
|
|
1905
|
-
this.
|
|
2122
|
+
if(!this.state.isJoinRoom) {
|
|
2123
|
+
this.finishSession()
|
|
2124
|
+
}
|
|
2125
|
+
|
|
1906
2126
|
};
|
|
1907
2127
|
// 推送“退出房间者”给与会者
|
|
1908
2128
|
this.test_controller.OnParticipantLeaveRoom = (
|
|
@@ -2223,6 +2443,9 @@ class Video extends Component {
|
|
|
2223
2443
|
|
|
2224
2444
|
} catch (err) {
|
|
2225
2445
|
console.error(err);
|
|
2446
|
+
if(err.status == 502 || err.status== 404) {
|
|
2447
|
+
this.roomCallBack(2, '连接服务器失败',-11)
|
|
2448
|
+
}
|
|
2226
2449
|
}
|
|
2227
2450
|
};
|
|
2228
2451
|
finishSession = async () => {
|
|
@@ -2235,6 +2458,9 @@ class Video extends Component {
|
|
|
2235
2458
|
tellerId: this.props.tellerAccount
|
|
2236
2459
|
});
|
|
2237
2460
|
} catch (err) {
|
|
2461
|
+
if(err.status == 502 || err.status== 404) {
|
|
2462
|
+
this.roomCallBack(2, '连接服务器失败',-11)
|
|
2463
|
+
}
|
|
2238
2464
|
}
|
|
2239
2465
|
}
|
|
2240
2466
|
this.setState({
|
|
@@ -2243,7 +2469,7 @@ class Video extends Component {
|
|
|
2243
2469
|
isPictureInPicture: false,
|
|
2244
2470
|
imStatus: false,
|
|
2245
2471
|
imJoinRoom: false,
|
|
2246
|
-
sessionType:
|
|
2472
|
+
sessionType: false
|
|
2247
2473
|
});
|
|
2248
2474
|
this.props.onLeaveRoom({
|
|
2249
2475
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
@@ -2259,10 +2485,6 @@ class Video extends Component {
|
|
|
2259
2485
|
if (result.code == 200 && result.data.roomStatus == 1) {
|
|
2260
2486
|
this.addToScript()
|
|
2261
2487
|
} else {
|
|
2262
|
-
this.props.sessionId = ''
|
|
2263
|
-
this.props.roomId = ''
|
|
2264
|
-
this.props.mtoken = ''
|
|
2265
|
-
this.props.imRoomId = ''
|
|
2266
2488
|
this.setState({
|
|
2267
2489
|
channelId: '',
|
|
2268
2490
|
rtoken: '',
|
|
@@ -2280,10 +2502,6 @@ class Video extends Component {
|
|
|
2280
2502
|
// })
|
|
2281
2503
|
}
|
|
2282
2504
|
} catch (err) {
|
|
2283
|
-
this.props.sessionId = ''
|
|
2284
|
-
this.props.roomId = ''
|
|
2285
|
-
this.props.mtoken = ''
|
|
2286
|
-
this.props.imRoomId = ''
|
|
2287
2505
|
this.setState({
|
|
2288
2506
|
channelId: '',
|
|
2289
2507
|
rtoken: '',
|
|
@@ -2311,7 +2529,7 @@ class Video extends Component {
|
|
|
2311
2529
|
this.setState({
|
|
2312
2530
|
sessionType: false
|
|
2313
2531
|
})
|
|
2314
|
-
this.roomCallBack(2, '
|
|
2532
|
+
this.roomCallBack(2, '加载资源失败',-10)
|
|
2315
2533
|
|
|
2316
2534
|
|
|
2317
2535
|
})
|
|
@@ -2361,9 +2579,6 @@ class Video extends Component {
|
|
|
2361
2579
|
script.onload = () => {
|
|
2362
2580
|
that.test_controller = new McuController();
|
|
2363
2581
|
that.mountClick()
|
|
2364
|
-
that.setState({
|
|
2365
|
-
loading: false,
|
|
2366
|
-
})
|
|
2367
2582
|
}
|
|
2368
2583
|
}
|
|
2369
2584
|
} else {
|
|
@@ -2733,7 +2948,9 @@ class Video extends Component {
|
|
|
2733
2948
|
this.messageClick('发送失败','error')
|
|
2734
2949
|
}
|
|
2735
2950
|
} catch (err) {
|
|
2736
|
-
|
|
2951
|
+
if(err.status == 502 || err.status== 404) {
|
|
2952
|
+
this.roomCallBack(2, '连接服务器失败',-11)
|
|
2953
|
+
}
|
|
2737
2954
|
}
|
|
2738
2955
|
}
|
|
2739
2956
|
handleCancelInvitation = () => {
|
|
@@ -2835,7 +3052,7 @@ class Video extends Component {
|
|
|
2835
3052
|
console.log(result)
|
|
2836
3053
|
let data
|
|
2837
3054
|
if (result.code == 200) {
|
|
2838
|
-
data = result.data.
|
|
3055
|
+
data = result.data.username ? result.data.username : ''
|
|
2839
3056
|
} else {
|
|
2840
3057
|
this.messageClick('查询失败','error')
|
|
2841
3058
|
}
|
|
@@ -2893,7 +3110,9 @@ class Video extends Component {
|
|
|
2893
3110
|
}
|
|
2894
3111
|
this.pictureInPicture('Refresh')
|
|
2895
3112
|
} catch (err) {
|
|
2896
|
-
|
|
3113
|
+
if(err.status == 502 || err.status== 404) {
|
|
3114
|
+
this.roomCallBack(2, '连接服务器失败',-11)
|
|
3115
|
+
}
|
|
2897
3116
|
}
|
|
2898
3117
|
}
|
|
2899
3118
|
linkClick=()=>{
|
|
@@ -2948,7 +3167,9 @@ class Video extends Component {
|
|
|
2948
3167
|
this.messageClick('签字失败','error')
|
|
2949
3168
|
}
|
|
2950
3169
|
} catch (err) {
|
|
2951
|
-
|
|
3170
|
+
if(err.status == 502 || err.status== 404) {
|
|
3171
|
+
this.roomCallBack(2, '连接服务器失败',-11)
|
|
3172
|
+
}
|
|
2952
3173
|
}
|
|
2953
3174
|
}
|
|
2954
3175
|
handleOkSign = () => {
|
|
@@ -3137,7 +3358,7 @@ class Video extends Component {
|
|
|
3137
3358
|
margin: 'auto'
|
|
3138
3359
|
};
|
|
3139
3360
|
return (
|
|
3140
|
-
<div className="all">
|
|
3361
|
+
<div className="all" id="allHSBC">
|
|
3141
3362
|
<Spin spinning={this.state.loading} tip="视频初始化中...">
|
|
3142
3363
|
<Header></Header>
|
|
3143
3364
|
<div className="health">
|
|
@@ -3247,7 +3468,7 @@ class Video extends Component {
|
|
|
3247
3468
|
id="video1"
|
|
3248
3469
|
autoPlay
|
|
3249
3470
|
muted={true}
|
|
3250
|
-
className=
|
|
3471
|
+
className={`video1 ${this.state.noVideoOne ? 'isNoVideo' : ''}`}
|
|
3251
3472
|
/>
|
|
3252
3473
|
<audio id="audio1" autoPlay />
|
|
3253
3474
|
<label style={{ display: 'none' }} id="feedId1" type="text" />
|
|
@@ -3275,7 +3496,7 @@ class Video extends Component {
|
|
|
3275
3496
|
id="video2"
|
|
3276
3497
|
autoPlay
|
|
3277
3498
|
muted={true}
|
|
3278
|
-
className=
|
|
3499
|
+
className={`video ${this.state.noVideoTwo ? 'isNoVideo' : ''}`}
|
|
3279
3500
|
/>
|
|
3280
3501
|
<audio id="audio2" autoPlay />
|
|
3281
3502
|
<label style={{ display: 'none' }} id="feedId2" type="text" />
|
|
@@ -3301,7 +3522,7 @@ class Video extends Component {
|
|
|
3301
3522
|
id="video3"
|
|
3302
3523
|
autoPlay
|
|
3303
3524
|
muted={true}
|
|
3304
|
-
className=
|
|
3525
|
+
className={`video ${this.state.noVideoThree ? 'isNoVideo' : ''}`}
|
|
3305
3526
|
/>
|
|
3306
3527
|
<audio id="audio3" autoPlay />
|
|
3307
3528
|
<label style={{ display: 'none' }} id="feedId3" type="text" />
|
|
@@ -3326,7 +3547,7 @@ class Video extends Component {
|
|
|
3326
3547
|
id="video4"
|
|
3327
3548
|
autoPlay
|
|
3328
3549
|
muted={true}
|
|
3329
|
-
className=
|
|
3550
|
+
className={`video ${this.state.noVideoFour ? 'isNoVideo' : ''}`}
|
|
3330
3551
|
/>
|
|
3331
3552
|
<audio id="audio4" autoPlay />
|
|
3332
3553
|
<label style={{ display: 'none' }} id="feedId4" type="text" />
|
|
@@ -3352,7 +3573,7 @@ class Video extends Component {
|
|
|
3352
3573
|
id="video5"
|
|
3353
3574
|
autoPlay
|
|
3354
3575
|
muted={true}
|
|
3355
|
-
className=
|
|
3576
|
+
className={`video ${this.state.noVideoFive ? 'isNoVideo' : ''}`}
|
|
3356
3577
|
/>
|
|
3357
3578
|
<audio id="audio5" autoPlay />
|
|
3358
3579
|
<label style={{ display: 'none' }} id="feedId5" type="text" />
|
|
@@ -3377,7 +3598,7 @@ class Video extends Component {
|
|
|
3377
3598
|
id="video6"
|
|
3378
3599
|
autoPlay
|
|
3379
3600
|
muted={true}
|
|
3380
|
-
className=
|
|
3601
|
+
className={`video ${this.state.noVideoSix ? 'isNoVideo' : ''}`}
|
|
3381
3602
|
/>
|
|
3382
3603
|
<audio id="audio6" autoPlay />
|
|
3383
3604
|
<label style={{ display: 'none' }} id="feedId6" type="text" />
|
|
@@ -3414,7 +3635,7 @@ class Video extends Component {
|
|
|
3414
3635
|
id="video7"
|
|
3415
3636
|
autoPlay
|
|
3416
3637
|
muted={true}
|
|
3417
|
-
className=
|
|
3638
|
+
className={`video ${this.state.noVideoSeven ? 'isNoVideo' : ''}`}
|
|
3418
3639
|
/>
|
|
3419
3640
|
<audio id="audio7" autoPlay />
|
|
3420
3641
|
<label style={{ display: 'none' }} id="feedId7" type="text" />
|
|
@@ -3442,7 +3663,7 @@ class Video extends Component {
|
|
|
3442
3663
|
id="video8"
|
|
3443
3664
|
autoPlay
|
|
3444
3665
|
muted={true}
|
|
3445
|
-
className=
|
|
3666
|
+
className={`video ${this.state.noVideoEight ? 'isNoVideo' : ''}`}
|
|
3446
3667
|
/>
|
|
3447
3668
|
<audio id="audio8" autoPlay />
|
|
3448
3669
|
<label style={{ display: 'none' }} id="feedId8" type="text" />
|
|
@@ -3467,7 +3688,7 @@ class Video extends Component {
|
|
|
3467
3688
|
id="video9"
|
|
3468
3689
|
autoPlay
|
|
3469
3690
|
muted={true}
|
|
3470
|
-
className=
|
|
3691
|
+
className={`video ${this.state.noVideoNine ? 'isNoVideo' : ''}`}
|
|
3471
3692
|
/>
|
|
3472
3693
|
<audio id="audio9" autoPlay />
|
|
3473
3694
|
<label style={{ display: 'none' }} id="feedId9" type="text" />
|
|
@@ -3494,7 +3715,7 @@ class Video extends Component {
|
|
|
3494
3715
|
id="video10"
|
|
3495
3716
|
autoPlay
|
|
3496
3717
|
muted={true}
|
|
3497
|
-
className=
|
|
3718
|
+
className={`video ${this.state.noVideoTen ? 'isNoVideo' : ''}`}
|
|
3498
3719
|
/>
|
|
3499
3720
|
<audio id="audio10" autoPlay />
|
|
3500
3721
|
<label style={{ display: 'none' }} id="feedId10" type="text" />
|
|
@@ -3519,7 +3740,7 @@ class Video extends Component {
|
|
|
3519
3740
|
id="video11"
|
|
3520
3741
|
autoPlay
|
|
3521
3742
|
muted={true}
|
|
3522
|
-
className=
|
|
3743
|
+
className={`video ${this.state.noVideoEleven ? 'isNoVideo' : ''}`}
|
|
3523
3744
|
/>
|
|
3524
3745
|
<audio id="audio11" autoPlay />
|
|
3525
3746
|
<label style={{ display: 'none' }} id="feedId11" type="text" />
|
|
@@ -3545,7 +3766,7 @@ class Video extends Component {
|
|
|
3545
3766
|
id="video12"
|
|
3546
3767
|
autoPlay
|
|
3547
3768
|
muted={true}
|
|
3548
|
-
className=
|
|
3769
|
+
className={`video ${this.state.noVideoTwelve ? 'isNoVideo' : ''}`}
|
|
3549
3770
|
/>
|
|
3550
3771
|
<audio id="audio12" autoPlay />
|
|
3551
3772
|
<label style={{ display: 'none' }} id="feedId12" type="text" />
|
|
@@ -3636,7 +3857,7 @@ class Video extends Component {
|
|
|
3636
3857
|
<div key='invitation'>
|
|
3637
3858
|
<Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>
|
|
3638
3859
|
{
|
|
3639
|
-
this.state.employeeName &&<Button className='
|
|
3860
|
+
this.state.employeeName &&<Button className='modelButtonOkInvitation'type="primary" danger onClick={this.handleOkInvitation}>邮件发送会议邀请</Button>
|
|
3640
3861
|
}
|
|
3641
3862
|
{
|
|
3642
3863
|
!this.state.employeeName &&<Button className='modelButtonCancelOne' type="primary" danger >邮件发送会议邀请</Button>
|
|
@@ -3697,8 +3918,14 @@ class Video extends Component {
|
|
|
3697
3918
|
{camera}
|
|
3698
3919
|
<div>麦克风设备:</div>
|
|
3699
3920
|
{microphone}
|
|
3700
|
-
|
|
3921
|
+
{
|
|
3922
|
+
this.state.speakerList.length > 0 &&
|
|
3923
|
+
<span>
|
|
3924
|
+
<div>扬声器设备:</div>
|
|
3701
3925
|
{speaker}
|
|
3926
|
+
</span>
|
|
3927
|
+
}
|
|
3928
|
+
|
|
3702
3929
|
</div>
|
|
3703
3930
|
</Modal>
|
|
3704
3931
|
<video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"></video>
|