react_hsbc_teller 1.6.0 → 1.6.3
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/config/webpack.config.js +1 -1
- package/config/webpack.dev.js +1 -1
- package/config/webpack.prod.js +1 -1
- package/lib/57be580f59e8862a94d62c486df4e83d.mp3 +0 -0
- package/lib/5a8892b3bd09dc784456b3c06de351d6.mp3 +0 -0
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/api/api.js +19 -0
- package/packages/assets/img/meiyan.png +0 -0
- package/packages/assets/mp3/joinmeeting.mp3 +0 -0
- package/packages/assets/mp3/leftmeeting.mp3 +0 -0
- package/packages/pages/foot/foot.jsx +12 -1
- package/packages/pages/video/video.jsx +235 -45
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -2,6 +2,25 @@ import Server from './server';
|
|
|
2
2
|
|
|
3
3
|
class API extends Server{
|
|
4
4
|
|
|
5
|
+
async updateMeetingInfo(params = {}){
|
|
6
|
+
// return this.axios('get', '/lang/select/2', params);
|
|
7
|
+
try{
|
|
8
|
+
let result = await this.axios('post', '/hsbc/updateMeetingInfo', params);
|
|
9
|
+
if(result && (result.data instanceof Object) && result.code === 200){
|
|
10
|
+
return result||[];
|
|
11
|
+
}else{
|
|
12
|
+
let err = {
|
|
13
|
+
tip: '服务异常',
|
|
14
|
+
response: result,
|
|
15
|
+
data: params,
|
|
16
|
+
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
17
|
+
}
|
|
18
|
+
throw err;
|
|
19
|
+
}
|
|
20
|
+
}catch(err){
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
5
24
|
async rateAll(params = {}){
|
|
6
25
|
// return this.axios('get', '/lang/select/2', params);
|
|
7
26
|
try{
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -50,8 +50,11 @@ export default class foot extends Component {
|
|
|
50
50
|
switchExternal=()=>{
|
|
51
51
|
this.props.switchExternal()
|
|
52
52
|
}
|
|
53
|
+
beautyClick=()=>{
|
|
54
|
+
this.props.beautyClick()
|
|
55
|
+
}
|
|
53
56
|
render() {
|
|
54
|
-
const {clickedOcr,clickedFacial,img,isWhiteboard,cameraImg,isTranscribing ,screenName,suspendName,customerList,menus,voiceName} = this.props
|
|
57
|
+
const {clickedOcr,clickedFacial,img,isWhiteboard,cameraImg,isTranscribing ,screenName,suspendName,customerList,menus,voiceName,beautyName} = this.props
|
|
55
58
|
const content = (
|
|
56
59
|
<div>
|
|
57
60
|
{customerList.map((item,index)=>{
|
|
@@ -149,6 +152,14 @@ export default class foot extends Component {
|
|
|
149
152
|
|
|
150
153
|
})
|
|
151
154
|
}
|
|
155
|
+
{
|
|
156
|
+
<div className="one" onClick={this.beautyClick.bind(this)}>
|
|
157
|
+
<img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
|
|
158
|
+
<div className="text">
|
|
159
|
+
{beautyName}
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
}
|
|
152
163
|
</div>
|
|
153
164
|
);
|
|
154
165
|
return (
|
|
@@ -11,6 +11,8 @@ import voiceImgOpen from '../../assets/img/icon_Mute.png'
|
|
|
11
11
|
import voiceImgCloe from '../../assets/img/icon_MuteOne.png'
|
|
12
12
|
import cameraImgOpen from '../../assets/img/icon_camera.png'
|
|
13
13
|
import cameraImgCloe from '../../assets/img/icon_cameraOne.png'
|
|
14
|
+
import autod from '../../assets/mp3/joinmeeting.mp3'
|
|
15
|
+
import leftMetting from '../../assets/mp3/leftmeeting.mp3'
|
|
14
16
|
import errorPng from '../../assets/img/tooltips2_fail.png'
|
|
15
17
|
import { callNimIM } from '../../utils/cell.js'
|
|
16
18
|
import Modal from "antd/lib/modal";
|
|
@@ -37,7 +39,29 @@ let streamShare
|
|
|
37
39
|
let muteJson = new Map()
|
|
38
40
|
let dateTime = 0
|
|
39
41
|
let messageValue = ''
|
|
42
|
+
let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
|
|
40
43
|
let rateList = []
|
|
44
|
+
let beautyDiv = {};
|
|
45
|
+
function clearStreamRemain() {
|
|
46
|
+
if (!(beautyDiv.beauty_canvas == null || beautyDiv.beauty_canvas == undefined)) {
|
|
47
|
+
beautyDiv.beauty_canvas = null;
|
|
48
|
+
}
|
|
49
|
+
if (!(beautyDiv.beauty_player == null || beautyDiv.beauty_player == undefined)) {
|
|
50
|
+
beautyDiv.beauty_player.destroy();
|
|
51
|
+
beautyDiv.beauty_player = null;
|
|
52
|
+
}
|
|
53
|
+
if (!(beautyDiv.beauty_div == null || beautyDiv.beauty_div == undefined)) {
|
|
54
|
+
document.body.removeChild(beautyDiv.beauty_div);
|
|
55
|
+
beautyDiv.beauty_div = null;
|
|
56
|
+
}
|
|
57
|
+
beautyDiv = {};
|
|
58
|
+
};
|
|
59
|
+
function startBeauty(stream) {
|
|
60
|
+
let newStream = stream;
|
|
61
|
+
beautyDiv = meetingBeautifyStream(newStream, beautyNum);
|
|
62
|
+
newStream = beautyDiv.stream;
|
|
63
|
+
return newStream
|
|
64
|
+
}
|
|
41
65
|
message.config({
|
|
42
66
|
getContainer: ()=>document.getElementById('allHSBC')
|
|
43
67
|
})
|
|
@@ -48,6 +72,7 @@ class Video extends Component {
|
|
|
48
72
|
}
|
|
49
73
|
cancel = axios.CancelToken.source()
|
|
50
74
|
state = {
|
|
75
|
+
beautyName: '开启美颜',
|
|
51
76
|
signNoClick: false,
|
|
52
77
|
listVideoPicture: [],
|
|
53
78
|
isScreenSwitching: false,
|
|
@@ -562,6 +587,28 @@ class Video extends Component {
|
|
|
562
587
|
})
|
|
563
588
|
}
|
|
564
589
|
};
|
|
590
|
+
// contrastFaceVerify=()=>{
|
|
591
|
+
// axios({
|
|
592
|
+
// method: 'post',
|
|
593
|
+
// url: 'http://182.92.184.31:8868/verify/face',
|
|
594
|
+
// data: { // 这⾥data中的参数为requestBody参数,服务端需要使⽤@RequestBody注解进⾏获取
|
|
595
|
+
// "username":"王明珍",
|
|
596
|
+
// "num":"410425199510201037",
|
|
597
|
+
// "fileBase64":this.state.facialImg.replace(/^data:image\/\w+;base64,/,"")
|
|
598
|
+
// }
|
|
599
|
+
// }).then((response) =>{
|
|
600
|
+
// console.log(response.data);
|
|
601
|
+
// if(response.data.code == 200){
|
|
602
|
+
// this.messageClick('人脸识别成功','success')
|
|
603
|
+
// this.setState({
|
|
604
|
+
// isModalVisibleFacial: false
|
|
605
|
+
// })
|
|
606
|
+
// } else {
|
|
607
|
+
// this.messageClick('人脸识别失败','error')
|
|
608
|
+
// }
|
|
609
|
+
// }).catch(function (error) {
|
|
610
|
+
// })
|
|
611
|
+
// }
|
|
565
612
|
contrastFaceVerify = async () => {
|
|
566
613
|
try {
|
|
567
614
|
let result = await API.contrastFaceVerify({
|
|
@@ -628,10 +675,10 @@ class Video extends Component {
|
|
|
628
675
|
list.push({
|
|
629
676
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
|
|
630
677
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
|
|
631
|
-
name: this.state.videoOneName + '--OCR',
|
|
678
|
+
name: this.state.videoOneName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
632
679
|
tourist: false
|
|
633
680
|
})
|
|
634
|
-
if(this.state.videoOneName.indexOf("客户") == -1) {
|
|
681
|
+
if(this.state.videoOneName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
635
682
|
list.push({
|
|
636
683
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
|
|
637
684
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
|
|
@@ -646,10 +693,10 @@ class Video extends Component {
|
|
|
646
693
|
list.push({
|
|
647
694
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
|
|
648
695
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
|
|
649
|
-
name: this.state.videoTwoName + '--OCR',
|
|
696
|
+
name: this.state.videoTwoName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
650
697
|
tourist: false
|
|
651
698
|
})
|
|
652
|
-
if(this.state.videoTwoName.indexOf("客户") == -1) {
|
|
699
|
+
if(this.state.videoTwoName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
653
700
|
list.push({
|
|
654
701
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
|
|
655
702
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
|
|
@@ -664,10 +711,10 @@ class Video extends Component {
|
|
|
664
711
|
list.push({
|
|
665
712
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
|
|
666
713
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
|
|
667
|
-
name: this.state.videoThreeName + '--OCR',
|
|
714
|
+
name: this.state.videoThreeName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
668
715
|
tourist: false
|
|
669
716
|
})
|
|
670
|
-
if(this.state.videoThreeName.indexOf("客户") == -1) {
|
|
717
|
+
if(this.state.videoThreeName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
671
718
|
list.push({
|
|
672
719
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
|
|
673
720
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
|
|
@@ -682,10 +729,10 @@ class Video extends Component {
|
|
|
682
729
|
list.push({
|
|
683
730
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
|
|
684
731
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
|
|
685
|
-
name: this.state.videoFourName + '--OCR',
|
|
732
|
+
name: this.state.videoFourName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
686
733
|
tourist: false
|
|
687
734
|
})
|
|
688
|
-
if(this.state.videoFourName.indexOf("客户") == -1) {
|
|
735
|
+
if(this.state.videoFourName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
689
736
|
list.push({
|
|
690
737
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
|
|
691
738
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
|
|
@@ -700,10 +747,10 @@ class Video extends Component {
|
|
|
700
747
|
list.push({
|
|
701
748
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
|
|
702
749
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
|
|
703
|
-
name: this.state.videoFiveName + '--OCR',
|
|
750
|
+
name: this.state.videoFiveName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
704
751
|
tourist: false
|
|
705
752
|
})
|
|
706
|
-
if(this.state.videoFiveName.indexOf("客户") == -1) {
|
|
753
|
+
if(this.state.videoFiveName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
707
754
|
list.push({
|
|
708
755
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
|
|
709
756
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
|
|
@@ -717,10 +764,10 @@ class Video extends Component {
|
|
|
717
764
|
list.push({
|
|
718
765
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
|
|
719
766
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
|
|
720
|
-
name: this.state.videoSixName + '--OCR',
|
|
767
|
+
name: this.state.videoSixName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
721
768
|
tourist: false
|
|
722
769
|
})
|
|
723
|
-
if(this.state.videoSixName.indexOf("客户") == -1) {
|
|
770
|
+
if(this.state.videoSixName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
724
771
|
list.push({
|
|
725
772
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
|
|
726
773
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
|
|
@@ -733,10 +780,10 @@ class Video extends Component {
|
|
|
733
780
|
list.push({
|
|
734
781
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).feedId,
|
|
735
782
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid,
|
|
736
|
-
name: this.state.videoSevenName + '--OCR',
|
|
783
|
+
name: this.state.videoSevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
737
784
|
tourist: false
|
|
738
785
|
})
|
|
739
|
-
if(this.state.videoSevenName.indexOf("客户") == -1) {
|
|
786
|
+
if(this.state.videoSevenName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
740
787
|
list.push({
|
|
741
788
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).feedId,
|
|
742
789
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid,
|
|
@@ -749,10 +796,10 @@ class Video extends Component {
|
|
|
749
796
|
list.push({
|
|
750
797
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).feedId,
|
|
751
798
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid,
|
|
752
|
-
name: this.state.videoEightName + '--OCR',
|
|
799
|
+
name: this.state.videoEightName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
753
800
|
tourist: false
|
|
754
801
|
})
|
|
755
|
-
if(this.state.videoEightName.indexOf("客户") == -1) {
|
|
802
|
+
if(this.state.videoEightName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
756
803
|
list.push({
|
|
757
804
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).feedId,
|
|
758
805
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid,
|
|
@@ -765,10 +812,10 @@ class Video extends Component {
|
|
|
765
812
|
list.push({
|
|
766
813
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).feedId,
|
|
767
814
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid,
|
|
768
|
-
name: this.state.videoNineName + '--OCR',
|
|
815
|
+
name: this.state.videoNineName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
769
816
|
tourist: false
|
|
770
817
|
})
|
|
771
|
-
if(this.state.videoNineName.indexOf("客户") == -1) {
|
|
818
|
+
if(this.state.videoNineName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
772
819
|
list.push({
|
|
773
820
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).feedId,
|
|
774
821
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid,
|
|
@@ -781,10 +828,10 @@ class Video extends Component {
|
|
|
781
828
|
list.push({
|
|
782
829
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).feedId,
|
|
783
830
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid,
|
|
784
|
-
name: this.state.videoTenName + '--OCR',
|
|
831
|
+
name: this.state.videoTenName +(this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
785
832
|
tourist: false
|
|
786
833
|
})
|
|
787
|
-
if(this.state.videoTenName.indexOf("客户") == -1) {
|
|
834
|
+
if(this.state.videoTenName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
788
835
|
list.push({
|
|
789
836
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).feedId,
|
|
790
837
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid,
|
|
@@ -797,10 +844,10 @@ class Video extends Component {
|
|
|
797
844
|
list.push({
|
|
798
845
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).feedId,
|
|
799
846
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid,
|
|
800
|
-
name: this.state.videoElevenName + '--OCR',
|
|
847
|
+
name: this.state.videoElevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
801
848
|
tourist: false
|
|
802
849
|
})
|
|
803
|
-
if(this.state.videoElevenName.indexOf("客户") == -1) {
|
|
850
|
+
if(this.state.videoElevenName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
804
851
|
list.push({
|
|
805
852
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).feedId,
|
|
806
853
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid,
|
|
@@ -813,10 +860,10 @@ class Video extends Component {
|
|
|
813
860
|
list.push({
|
|
814
861
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).feedId,
|
|
815
862
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid,
|
|
816
|
-
name: this.state.videoTwelveName + '--OCR',
|
|
863
|
+
name: this.state.videoTwelveName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
817
864
|
tourist: false
|
|
818
865
|
})
|
|
819
|
-
if(this.state.videoTwelveName.indexOf("客户") == -1) {
|
|
866
|
+
if(this.state.videoTwelveName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
820
867
|
list.push({
|
|
821
868
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).feedId,
|
|
822
869
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid,
|
|
@@ -1982,6 +2029,45 @@ class Video extends Component {
|
|
|
1982
2029
|
this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
|
|
1983
2030
|
console.log('发送失败',msgId,code, msg)
|
|
1984
2031
|
}
|
|
2032
|
+
this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
2033
|
+
console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
2034
|
+
if (stream_type == "subscribe") {
|
|
2035
|
+
return stream
|
|
2036
|
+
}
|
|
2037
|
+
if (media_type == 2 || media_type == 4) {
|
|
2038
|
+
return stream
|
|
2039
|
+
}
|
|
2040
|
+
// if (publish_device != 1) {
|
|
2041
|
+
// return stream
|
|
2042
|
+
// }
|
|
2043
|
+
if(publish_tag == 'tag1') {
|
|
2044
|
+
let newStream = stream;
|
|
2045
|
+
let beauty_strength = beautyNum;
|
|
2046
|
+
if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
|
|
2047
|
+
newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
|
|
2048
|
+
// 清理原始流
|
|
2049
|
+
newStream.oninactive = function () {
|
|
2050
|
+
clearOriginStream(stream);
|
|
2051
|
+
};
|
|
2052
|
+
newStream.getVideoTracks()[0].onended = function () {
|
|
2053
|
+
clearOriginStream(stream);
|
|
2054
|
+
};
|
|
2055
|
+
function clearOriginStream(stream) {
|
|
2056
|
+
stream.getTracks().forEach((track) => {
|
|
2057
|
+
track.stop();
|
|
2058
|
+
});
|
|
2059
|
+
stream = null;
|
|
2060
|
+
}
|
|
2061
|
+
};
|
|
2062
|
+
if (stream.getAudioTracks()[0] && newStream.addTrack) {
|
|
2063
|
+
newStream.addTrack(stream.getAudioTracks()[0])
|
|
2064
|
+
}
|
|
2065
|
+
return newStream
|
|
2066
|
+
} else {
|
|
2067
|
+
return stream
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
}
|
|
1985
2071
|
// 发布媒体流成功
|
|
1986
2072
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
1987
2073
|
console.log('发布媒体流成功', sid)
|
|
@@ -2006,7 +2092,9 @@ class Video extends Component {
|
|
|
2006
2092
|
|
|
2007
2093
|
loading: false,
|
|
2008
2094
|
});
|
|
2095
|
+
|
|
2009
2096
|
this.enterRoom()
|
|
2097
|
+
this.updateMeetingInfo()
|
|
2010
2098
|
this.timer = setInterval(
|
|
2011
2099
|
() => {
|
|
2012
2100
|
if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0.1) {
|
|
@@ -2403,29 +2491,14 @@ class Video extends Component {
|
|
|
2403
2491
|
this.test_controller.OnNewJoinerIn = (participant) => {
|
|
2404
2492
|
console.log('新加⼊房间者', participant);
|
|
2405
2493
|
this.state.isCustomer= true
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2494
|
+
let src = autod
|
|
2495
|
+
let audio = new Audio(src)
|
|
2496
|
+
audio.play()
|
|
2409
2497
|
};
|
|
2410
2498
|
// 推送“有新发布”给与会者
|
|
2411
2499
|
this.test_controller.OnNewPublish = (feed) => {
|
|
2412
2500
|
console.log('有新发布者', feed);
|
|
2413
2501
|
console.log(new Date())
|
|
2414
|
-
callNimIM('sendCustomCmdMsg', {
|
|
2415
|
-
customId: this.state.imRoomId,
|
|
2416
|
-
content: JSON.stringify({
|
|
2417
|
-
'typeId': 1014,
|
|
2418
|
-
'sessionId': this.state.sessionId,
|
|
2419
|
-
'meetingInfo': {
|
|
2420
|
-
'title': this.props.meetingInfo.title,
|
|
2421
|
-
'host': this.props.meetingInfo.host,
|
|
2422
|
-
'customers': this.props.meetingInfo.customers,
|
|
2423
|
-
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
})
|
|
2427
|
-
}, function (code, message, data) {
|
|
2428
|
-
})
|
|
2429
2502
|
callNimIM('sendCustomCmdMsg', {
|
|
2430
2503
|
customId: this.state.imRoomId,
|
|
2431
2504
|
content: JSON.stringify({
|
|
@@ -2439,6 +2512,21 @@ class Video extends Component {
|
|
|
2439
2512
|
}, function (code, message, data) {
|
|
2440
2513
|
console.log(data)
|
|
2441
2514
|
})
|
|
2515
|
+
callNimIM('sendCustomCmdMsg', {
|
|
2516
|
+
customId: this.state.imRoomId,
|
|
2517
|
+
content: JSON.stringify({
|
|
2518
|
+
'typeId': 1014,
|
|
2519
|
+
'sessionId': this.state.sessionId,
|
|
2520
|
+
'meetingInfo': {
|
|
2521
|
+
'title': this.props.meetingInfo.title,
|
|
2522
|
+
'host': this.props.meetingInfo.host,
|
|
2523
|
+
'customers': this.props.meetingInfo.customers,
|
|
2524
|
+
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
})
|
|
2528
|
+
}, function (code, message, data) {
|
|
2529
|
+
})
|
|
2442
2530
|
this.sendNotification()
|
|
2443
2531
|
let array = this.state.roomCustomerList;
|
|
2444
2532
|
let newArray = [...array];
|
|
@@ -2619,7 +2707,7 @@ class Video extends Component {
|
|
|
2619
2707
|
// 取消发布成功
|
|
2620
2708
|
this.test_controller.OnUnPublishSucc = (sid) => {
|
|
2621
2709
|
console.log('取消发布成功', sid, document.getElementById('publish_video1').name)
|
|
2622
|
-
if (sid != document.getElementById('publish_video1').name) {
|
|
2710
|
+
if (document.getElementById('publish_video1').name && sid != document.getElementById('publish_video1').name) {
|
|
2623
2711
|
callNimIM('sendCustomCmdMsg', {
|
|
2624
2712
|
customId: this.state.imRoomId,
|
|
2625
2713
|
content: JSON.stringify({
|
|
@@ -2640,6 +2728,9 @@ class Video extends Component {
|
|
|
2640
2728
|
// }
|
|
2641
2729
|
|
|
2642
2730
|
}
|
|
2731
|
+
if(sid == document.getElementById('publish_video1').name || !document.getElementById('publish_video1').name) {
|
|
2732
|
+
clearStreamRemain()
|
|
2733
|
+
}
|
|
2643
2734
|
};
|
|
2644
2735
|
// 取消订阅媒体流成功
|
|
2645
2736
|
this.test_controller.OnUnSubscribeSucc = (sid) => {
|
|
@@ -2787,6 +2878,9 @@ class Video extends Component {
|
|
|
2787
2878
|
exitType
|
|
2788
2879
|
) => {
|
|
2789
2880
|
console.log('退出房间者', participant, exitType)
|
|
2881
|
+
let src = leftMetting
|
|
2882
|
+
let audio = new Audio(src)
|
|
2883
|
+
audio.play()
|
|
2790
2884
|
this.appGetUsernameClick(participant).then((res)=>{
|
|
2791
2885
|
console.log('退出房间者',res)
|
|
2792
2886
|
let data = res? res.username ? res.username : '客户' : '客户'
|
|
@@ -3170,6 +3264,27 @@ userType:'1'
|
|
|
3170
3264
|
}
|
|
3171
3265
|
}
|
|
3172
3266
|
}
|
|
3267
|
+
// 保存mettingInfo
|
|
3268
|
+
updateMeetingInfo= async()=>{
|
|
3269
|
+
let customers
|
|
3270
|
+
this.props.meetingInfo.customers.map((item, index) => {
|
|
3271
|
+
customers = customers ? customers + ',' + item : item
|
|
3272
|
+
})
|
|
3273
|
+
try{
|
|
3274
|
+
let result = await API.updateMeetingInfo({
|
|
3275
|
+
title:this.props.meetingInfo.title,
|
|
3276
|
+
host:this.props.meetingInfo.host,
|
|
3277
|
+
customers:customers,
|
|
3278
|
+
otherAttendees: this.props.meetingInfo.otherAttendees ? this.props.meetingInfo.otherAttendees : '',
|
|
3279
|
+
sessionId:this.state.sessionId
|
|
3280
|
+
})
|
|
3281
|
+
} catch (err) {
|
|
3282
|
+
console.error(err);
|
|
3283
|
+
if(err.status == 502 || err.status== 404) {
|
|
3284
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3173
3288
|
enterRoom = async () =>{
|
|
3174
3289
|
try {
|
|
3175
3290
|
let result = await API.enterRoom({
|
|
@@ -3180,6 +3295,21 @@ userType:'1'
|
|
|
3180
3295
|
});
|
|
3181
3296
|
console.log(result);
|
|
3182
3297
|
this.appGetUsername(document.getElementById('publish_video1').name)
|
|
3298
|
+
callNimIM('sendCustomCmdMsg', {
|
|
3299
|
+
customId: this.state.imRoomId,
|
|
3300
|
+
content: JSON.stringify({
|
|
3301
|
+
'typeId': 1014,
|
|
3302
|
+
'sessionId': this.state.sessionId,
|
|
3303
|
+
'meetingInfo': {
|
|
3304
|
+
'title': this.props.meetingInfo.title,
|
|
3305
|
+
'host': this.props.meetingInfo.host,
|
|
3306
|
+
'customers': this.props.meetingInfo.customers,
|
|
3307
|
+
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
})
|
|
3311
|
+
}, function (code, message, data) {
|
|
3312
|
+
})
|
|
3183
3313
|
} catch (err) {
|
|
3184
3314
|
console.error(err);
|
|
3185
3315
|
if(err.status == 502 || err.status== 404) {
|
|
@@ -3193,6 +3323,8 @@ userType:'1'
|
|
|
3193
3323
|
this.finishSessionClick()
|
|
3194
3324
|
}
|
|
3195
3325
|
if (this.test_controller&&this.state.sessionType) {
|
|
3326
|
+
clearStreamRemain()
|
|
3327
|
+
beautyNum = 0
|
|
3196
3328
|
this.test_controller.LeaveRoom()
|
|
3197
3329
|
this.test_controller.Disconnect()
|
|
3198
3330
|
}
|
|
@@ -3695,7 +3827,17 @@ userType:'1'
|
|
|
3695
3827
|
type: 1
|
|
3696
3828
|
});
|
|
3697
3829
|
if (result.code == 200) {
|
|
3698
|
-
this.messageClick('
|
|
3830
|
+
this.messageClick('姓名:' + result.data.idCardName + ',身份证号:' + result.data.idCardNumber,'success')
|
|
3831
|
+
// this.messageClick('识别成功','success')
|
|
3832
|
+
callNimIM('sendCustomCmdMsg', {
|
|
3833
|
+
customId: this.state.imRoomId,
|
|
3834
|
+
content: JSON.stringify({
|
|
3835
|
+
'typeId': 1020,
|
|
3836
|
+
'sessionId': this.state.sessionId,
|
|
3837
|
+
'cameraState': 1, // 1--打开前置 2--打开后置
|
|
3838
|
+
"userId": this.state.faceCustomerUid
|
|
3839
|
+
})
|
|
3840
|
+
});
|
|
3699
3841
|
this.setState({
|
|
3700
3842
|
isModalVisibleFacial: false
|
|
3701
3843
|
})
|
|
@@ -3722,6 +3864,15 @@ userType:'1'
|
|
|
3722
3864
|
|
|
3723
3865
|
};
|
|
3724
3866
|
handleCancelFacial = () => {
|
|
3867
|
+
callNimIM('sendCustomCmdMsg', {
|
|
3868
|
+
customId: this.state.imRoomId,
|
|
3869
|
+
content: JSON.stringify({
|
|
3870
|
+
'typeId': 1020,
|
|
3871
|
+
'sessionId': this.state.sessionId,
|
|
3872
|
+
'cameraState': 1, // 1--打开前置 2--打开后置
|
|
3873
|
+
"userId": this.state.faceCustomerUid
|
|
3874
|
+
})
|
|
3875
|
+
});
|
|
3725
3876
|
this.setState({
|
|
3726
3877
|
isModalVisibleFacial: false
|
|
3727
3878
|
})
|
|
@@ -3803,6 +3954,18 @@ userType:'1'
|
|
|
3803
3954
|
if(item.tourist) {
|
|
3804
3955
|
this.retrieveCustomerInfoByActivityId(item.customId)
|
|
3805
3956
|
} else {
|
|
3957
|
+
if(this.state.faceCustomerType == 2) {
|
|
3958
|
+
// ocr
|
|
3959
|
+
callNimIM('sendCustomCmdMsg', {
|
|
3960
|
+
customId: this.state.imRoomId,
|
|
3961
|
+
content: JSON.stringify({
|
|
3962
|
+
'typeId': 1020,
|
|
3963
|
+
'sessionId': this.state.sessionId,
|
|
3964
|
+
'cameraState': 2, // 1--打开前置 2--打开后置
|
|
3965
|
+
"userId": item.customId
|
|
3966
|
+
})
|
|
3967
|
+
});
|
|
3968
|
+
}
|
|
3806
3969
|
var sid
|
|
3807
3970
|
if (item.feedId == document.getElementById("feedId1").innerText) {
|
|
3808
3971
|
sid = document.getElementById('video1').name;
|
|
@@ -3835,12 +3998,21 @@ userType:'1'
|
|
|
3835
3998
|
this.setState({
|
|
3836
3999
|
clickedFacial: false,
|
|
3837
4000
|
clickedOcr: false,
|
|
3838
|
-
|
|
3839
4001
|
isModalVisibleFacial: true,
|
|
3840
4002
|
facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
|
|
3841
4003
|
})
|
|
4004
|
+
setTimeout(() => {
|
|
4005
|
+
this.setState({
|
|
4006
|
+
facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
|
|
4007
|
+
})
|
|
4008
|
+
},1000)
|
|
3842
4009
|
}
|
|
3843
4010
|
}
|
|
4011
|
+
sgsinImage=()=>{
|
|
4012
|
+
this.setState({
|
|
4013
|
+
facialImg: this.test_controller.TakePicture(1, undefined, undefined, this.state.customOcrSid, 'png')
|
|
4014
|
+
})
|
|
4015
|
+
}
|
|
3844
4016
|
handleChangeOcr =(val)=> {
|
|
3845
4017
|
console.log(val)
|
|
3846
4018
|
this.setState({
|
|
@@ -4266,6 +4438,21 @@ userType:'1'
|
|
|
4266
4438
|
microphoneValue: event.target.value
|
|
4267
4439
|
})
|
|
4268
4440
|
}
|
|
4441
|
+
beautyClick = () =>{
|
|
4442
|
+
const publish_config = {}
|
|
4443
|
+
publish_config.sid = document.getElementById('publish_video1').name
|
|
4444
|
+
publish_config.media_type = 1
|
|
4445
|
+
publish_config.publish_device = 1
|
|
4446
|
+
publish_config.videoSource = this.state.cameraValue
|
|
4447
|
+
publish_config.audioSource = this.state.microphoneValue
|
|
4448
|
+
publish_config.video_profile_type=100
|
|
4449
|
+
publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
|
|
4450
|
+
this.test_controller.ChangeMediaStream(publish_config)
|
|
4451
|
+
beautyNum = beautyNum == 0 ? 1 : 0
|
|
4452
|
+
this.setState({
|
|
4453
|
+
beautyName: beautyNum == 0 ? '开启美颜' : '关闭美颜'
|
|
4454
|
+
})
|
|
4455
|
+
}
|
|
4269
4456
|
componentDidMount() {
|
|
4270
4457
|
var box=document.getElementById("whiteboardDIV");
|
|
4271
4458
|
if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
|
|
@@ -5019,6 +5206,7 @@ userType:'1'
|
|
|
5019
5206
|
</div>
|
|
5020
5207
|
</div>
|
|
5021
5208
|
<Foot
|
|
5209
|
+
beautyName={this.state.beautyName}
|
|
5022
5210
|
voiceName={this.state.voiceName}
|
|
5023
5211
|
img={this.state.voiceImg}
|
|
5024
5212
|
screenName={this.state.screenName}
|
|
@@ -5044,6 +5232,7 @@ userType:'1'
|
|
|
5044
5232
|
ocrClick={this.ocrClick}
|
|
5045
5233
|
switchExternal={this.switchExternal}
|
|
5046
5234
|
inspection={this.inspection}
|
|
5235
|
+
beautyClick={this.beautyClick}
|
|
5047
5236
|
></Foot>
|
|
5048
5237
|
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
5049
5238
|
onCancel={this.handleCancel}>
|
|
@@ -5065,6 +5254,7 @@ userType:'1'
|
|
|
5065
5254
|
<Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
|
|
5066
5255
|
<div key='facial'>
|
|
5067
5256
|
<Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
|
|
5257
|
+
<Button className="modelButtonCancel" onClick={this.sgsinImage}>重新截图</Button>
|
|
5068
5258
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
|
|
5069
5259
|
</div>
|
|
5070
5260
|
]}>
|