react_hsbc_teller 0.4.7 → 0.4.8

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.
@@ -11,6 +11,7 @@ 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 Background from '../../assets/img/placeholder_bg.png'
14
15
  import { callNimIM } from '../../utils/cell.js'
15
16
  import Modal from "antd/lib/modal";
16
17
  import 'antd/lib/modal/style'
@@ -77,7 +78,7 @@ class Video extends Component {
77
78
  videoFiveName: '',
78
79
  videoSixName: '',
79
80
  videoSevenName: '',
80
- videoEightName:'',
81
+ videoEightName: '',
81
82
  videoTenName: '',
82
83
  videoNineName: '',
83
84
  videoTwelveName: '',
@@ -96,16 +97,21 @@ class Video extends Component {
96
97
  voiceVideoNine: false,
97
98
  voiceVideoTen: false,
98
99
  voiceVideoEleven: false,
99
- voiceVideoTwelve: false
100
+ voiceVideoTwelve: false,
101
+ cameraList: [],
102
+ microphoneList: [],
103
+ isModalVisibleInspection: false,
104
+ cameraValue: '',
105
+ microphoneValue: ''
100
106
  };
101
107
  // eslint-disable-next-line no-undef
102
108
  test_controller = '';
103
-
104
- componentDidMount() {
105
- window.onbeforeunload = () =>{
106
- this.finishSession()
107
- }
108
- };
109
+
110
+ componentDidMount() {
111
+ window.onbeforeunload = () => {
112
+ this.finishSession()
113
+ }
114
+ };
109
115
 
110
116
  /**
111
117
  * 创建房间成功后回调后台
@@ -167,7 +173,7 @@ componentDidMount() {
167
173
  }
168
174
  } catch (err) {
169
175
  console.error(err);
170
- this.roomCallBack(2,'签名失败')
176
+ this.roomCallBack(2, '签名失败')
171
177
  }
172
178
  };
173
179
  handleEdit = () => {
@@ -453,12 +459,12 @@ componentDidMount() {
453
459
  name: this.state.videoTwelveName
454
460
  })
455
461
  }
456
- if(list.length > 0) {
457
- if(val == 'ocr') {
462
+ if (list.length > 0) {
463
+ if (val == 'ocr') {
458
464
  this.setState({
459
465
  clickedOcr: true
460
466
  })
461
- } else if(val == 'facial'){
467
+ } else if (val == 'facial') {
462
468
  this.setState({
463
469
  clickedFacial: true
464
470
  })
@@ -473,21 +479,21 @@ componentDidMount() {
473
479
  // 人脸识别
474
480
  facialRecognition = () => {
475
481
  if (this.isFileSuccuse()) {
476
- this.setState({
477
- faceCustomerType: 1,
478
- titleModal: '人脸识别'
479
- })
480
- this.selectCustomer('facial')
481
- }
482
+ this.setState({
483
+ faceCustomerType: 1,
484
+ titleModal: '人脸识别'
485
+ })
486
+ this.selectCustomer('facial')
487
+ }
482
488
  };
483
489
  ocrClick = () => {
484
490
  if (this.isFileSuccuse()) {
485
- this.setState({
486
- faceCustomerType: 2,
487
- titleModal: 'OCR识别'
488
- })
489
- this.selectCustomer('ocr')
490
- }
491
+ this.setState({
492
+ faceCustomerType: 2,
493
+ titleModal: 'OCR识别'
494
+ })
495
+ this.selectCustomer('ocr')
496
+ }
491
497
  };
492
498
  endSessionValue = () => {
493
499
  this.test_controller.LeaveRoom()
@@ -496,211 +502,211 @@ componentDidMount() {
496
502
  pictureInPicture = () => {
497
503
  let interval
498
504
  if (this.isFileSuccuse()) {
499
- if(this.state.isPictureInPicture){
505
+ if (this.state.isPictureInPicture) {
500
506
  document.exitPictureInPicture()
501
507
  } else {
502
508
  const list = []
503
- if(document.getElementById('video1').name) {
504
- list.push({
505
- name: 'video1',
506
- title: this.state.videoOneName
507
- })
508
- }
509
- if(document.getElementById('publish_video1').name) {
510
- list.push({
511
- name: 'publish_video1',
512
- title: '坐席'
513
- })
514
- }
515
- if(document.getElementById('video2').name) {
516
- list.push({
517
- name: 'video2',
518
- title: this.state.videoTwoName
519
- })
520
- }
521
- if(document.getElementById('video3').name) {
522
- list.push({
523
- name: 'video3',
524
- title: this.state.videoThreeName
525
- })
526
- }
527
- if(document.getElementById('video4').name) {
528
- list.push({
529
- name: 'video4',
530
- title: this.state.videoFourName
531
- })
532
- }
533
- if(document.getElementById('video5').name) {
534
- list.push({
535
- name: 'video5',
536
- title: this.state.videoFiveName
537
- })
538
- }
539
- if(document.getElementById('video6').name) {
540
- list.push({
541
- name: 'video6',
542
- title: this.state.videoSixName
543
- })
544
- }
509
+ if (document.getElementById('video1').name) {
510
+ list.push({
511
+ name: 'video1',
512
+ title: this.state.videoOneName
513
+ })
514
+ }
515
+ if (document.getElementById('publish_video1').name) {
516
+ list.push({
517
+ name: 'publish_video1',
518
+ title: '坐席'
519
+ })
520
+ }
521
+ if (document.getElementById('video2').name) {
522
+ list.push({
523
+ name: 'video2',
524
+ title: this.state.videoTwoName
525
+ })
526
+ }
527
+ if (document.getElementById('video3').name) {
528
+ list.push({
529
+ name: 'video3',
530
+ title: this.state.videoThreeName
531
+ })
532
+ }
533
+ if (document.getElementById('video4').name) {
534
+ list.push({
535
+ name: 'video4',
536
+ title: this.state.videoFourName
537
+ })
538
+ }
539
+ if (document.getElementById('video5').name) {
540
+ list.push({
541
+ name: 'video5',
542
+ title: this.state.videoFiveName
543
+ })
544
+ }
545
+ if (document.getElementById('video6').name) {
546
+ list.push({
547
+ name: 'video6',
548
+ title: this.state.videoSixName
549
+ })
550
+ }
545
551
 
546
- if(document.getElementById('video7').name) {
547
- list.push({
548
- name: 'video7',
549
- title: this.state.videoSevenName
550
- })
551
- }
552
- if(document.getElementById('video8').name) {
553
- list.push({
554
- name: 'video8',
555
- title: this.state.videoEightName
556
- })
557
- }
558
- if(document.getElementById('video9').name) {
559
- list.push({
560
- name: 'video9',
561
- title: this.state.videoNineName
562
- })
563
- }
564
- if(document.getElementById('video10').name) {
565
- list.push({
566
- name: 'video10',
567
- title: this.state.videoTenName
568
- })
569
- }
570
- if(document.getElementById('video11').name) {
571
- list.push({
572
- name: 'video11',
573
- title: this.state.videoElevenName
574
- })
575
- }
576
- if(document.getElementById('video12').name) {
577
- list.push({
578
- name: 'video12',
579
- title: this.state.videoTwelveName
580
- })
581
- }
582
- console.log(list)
583
- const width = 640;
584
- const height = 360 * list.length;
585
- const canvas = document.createElement('canvas');
586
- const cobj = canvas.getContext('2d'); // 获取绘图环境
587
- canvas.width = width;
588
- canvas.height = height;
589
-
590
- interval = setInterval(() => {
591
- cobj.clearRect(0, 0, width, height);
592
- for(let i=0;i<list.length;i++){
593
-
594
- let videoId = list[i].name;
595
- let videoDiv = document.getElementById(videoId);
596
- let videoWidth = videoDiv.videoWidth;
597
- let videoHeight = videoDiv.videoHeight;
598
- let newVideoWidth = 640;
599
- let newVideoHeight = 360;
600
- if (videoHeight * 640 / videoWidth > 360) {
601
- newVideoWidth = videoWidth * 360 / videoHeight;
602
- } else {
603
- newVideoHeight = videoHeight * 640 / videoWidth;
552
+ if (document.getElementById('video7').name) {
553
+ list.push({
554
+ name: 'video7',
555
+ title: this.state.videoSevenName
556
+ })
557
+ }
558
+ if (document.getElementById('video8').name) {
559
+ list.push({
560
+ name: 'video8',
561
+ title: this.state.videoEightName
562
+ })
604
563
  }
605
-
606
- cobj.drawImage(videoDiv, (640 - newVideoWidth)/2, 360 * i, newVideoWidth, newVideoHeight);
607
- cobj.beginPath();
608
- cobj.strokeStyle = this.props.titleColor;
609
- cobj.fillStyle = this.props.titleBackground;
610
- cobj.fillRect(0, 360 * (i + 1) - 60, 300, 60 )
611
- cobj.fill();
612
- cobj.stroke();
613
- cobj.beginPath();
614
- cobj.font = "28px auto";
615
- cobj.textAlign = 'center';
616
- cobj.lineWidth = 1;
617
- cobj.strokeText(list[i].title, 150, 360 * (i + 1) - 20);
618
- cobj.stroke();
619
- //左边框
620
- cobj.beginPath();
621
- cobj.moveTo( 0, 0);
622
- cobj.lineTo( 0, 360 * list.length);
623
- cobj.closePath(); //闭合路径
624
- cobj.lineWidth = 5; //线的边框为10像素
625
- cobj.strokeStyle = '#d9363e';
626
- cobj.stroke(); //绘制定义的图形
627
-
628
- //下边框
629
- cobj.beginPath();
630
- cobj.moveTo( 0, 0);
631
- cobj.lineTo( 640, 0);
632
- cobj.closePath(); //闭合路径
633
- cobj.lineWidth = 5; //线的边框为10像素
634
- cobj.strokeStyle = '#d9363e';
635
- cobj.stroke(); //绘制定义的图形
636
-
637
- //右边框
638
- cobj.beginPath();
639
- cobj.moveTo( 640, 360 * list.length);
640
- cobj.lineTo( 640, 0);
641
- cobj.closePath(); //闭合路径
642
- cobj.lineWidth = 5; //线的边框为10像素
643
- cobj.strokeStyle = '#d9363e';
644
- cobj.stroke(); //绘制定义的图形
645
-
646
-
647
- //上边框
648
- cobj.beginPath();
649
- cobj.moveTo( 0, 360 * list.length);
650
- cobj.lineTo( 640, 360 * list.length);
651
- cobj.closePath(); //闭合路径
652
- cobj.lineWidth = 5; //线的边框为10像素
653
- cobj.strokeStyle = '#d9363e';
654
- cobj.stroke(); //绘制定义的图形
655
-
656
- // let sid = document.getElementById(list[i].name).name
657
- // let stream = this.test_controller.GetMediaInfo(sid).audio_
658
- // let acc = new AudioContext()
659
- // let mic = acc.createMediaStreamSource(stream)
660
- // let analyser = acc.createAnalyser()
661
- // analyser.fftSize = 256
662
- // mic.connect(analyser)
663
- // aou(analyser)
664
- // let microphoneSize = this.props.microphoneSize
665
- // var img = document.getElementById("icon_huatong");
666
- // cobj.drawImage(img, 600, 360 * (i + 1) - 60, microphoneSize, microphoneSize);
667
- // function aou(analyser){
668
- // let dataArray = new Uint8Array(analyser.frequencyBinCount);
669
- // analyser.getByteFrequencyData(dataArray);
670
- // let step = Math.round(dataArray.length / 60); //采样步长
671
- // // 以画布左上角为坐标原点
672
- // let drawArea = {
673
- // x1: 28/50 * microphoneSize + 600, // 波动范围右下角的点坐标
674
- // y1: 25/50 * microphoneSize + 360 * (i + 1) - 60,
675
- // x2: 22/50 * microphoneSize + 600, // 波动范围左上角的点坐标
676
- // y2: 10/50 * microphoneSize + 360 * (i + 1) - 60,
677
- // }
678
-
679
- // for (var j = 0; j < 40; j++) {
680
- // let energy = (dataArray[step * j] / 256.0) * 80;
681
- // cobj.beginPath();
682
- // cobj.fillStyle = "#0AE544";
683
- // const { x1,y1,x2,y2} = drawArea
684
- // let width = x1-x2;
685
- // let height = (energy>20?(energy-20):0) * (y1 - y2 ) / 70
686
- // let startX = x2 // 绘制起始点x
687
- // let startY = y1 - height // 绘制起始点y
688
- // cobj.fillRect(startX, startY, width, height )
689
- // }
690
- // requestAnimationFrame(aou.bind(this, analyser));
691
-
692
- // }
564
+ if (document.getElementById('video9').name) {
565
+ list.push({
566
+ name: 'video9',
567
+ title: this.state.videoNineName
568
+ })
569
+ }
570
+ if (document.getElementById('video10').name) {
571
+ list.push({
572
+ name: 'video10',
573
+ title: this.state.videoTenName
574
+ })
575
+ }
576
+ if (document.getElementById('video11').name) {
577
+ list.push({
578
+ name: 'video11',
579
+ title: this.state.videoElevenName
580
+ })
693
581
  }
694
- }, 100);
695
- const captureStream = canvas.captureStream();
696
- const mix_stream = new MediaStream(captureStream);
697
- pictureInPictureVideo = document.getElementById('mixedvideo');
698
- pictureInPictureVideo.srcObject = mix_stream;
699
- pictureInPictureVideo.onloadedmetadata = () => {
700
- pictureInPictureVideo.requestPictureInPicture();
701
- };
582
+ if (document.getElementById('video12').name) {
583
+ list.push({
584
+ name: 'video12',
585
+ title: this.state.videoTwelveName
586
+ })
587
+ }
588
+ console.log(list)
589
+ const width = 640;
590
+ const height = 360 * list.length;
591
+ const canvas = document.createElement('canvas');
592
+ const cobj = canvas.getContext('2d'); // 获取绘图环境
593
+ canvas.width = width;
594
+ canvas.height = height;
595
+
596
+ interval = setInterval(() => {
597
+ cobj.clearRect(0, 0, width, height);
598
+ for (let i = 0; i < list.length; i++) {
599
+
600
+ let videoId = list[i].name;
601
+ let videoDiv = document.getElementById(videoId);
602
+ let videoWidth = videoDiv.videoWidth;
603
+ let videoHeight = videoDiv.videoHeight;
604
+ let newVideoWidth = 640;
605
+ let newVideoHeight = 360;
606
+ if (videoHeight * 640 / videoWidth > 360) {
607
+ newVideoWidth = videoWidth * 360 / videoHeight;
608
+ } else {
609
+ newVideoHeight = videoHeight * 640 / videoWidth;
610
+ }
611
+
612
+ cobj.drawImage(videoDiv, (640 - newVideoWidth) / 2, 360 * i, newVideoWidth, newVideoHeight);
613
+ cobj.beginPath();
614
+ cobj.strokeStyle = this.props.titleColor;
615
+ cobj.fillStyle = this.props.titleBackground;
616
+ cobj.fillRect(0, 360 * (i + 1) - 60, 300, 60)
617
+ cobj.fill();
618
+ cobj.stroke();
619
+ cobj.beginPath();
620
+ cobj.font = "28px auto";
621
+ cobj.textAlign = 'center';
622
+ cobj.lineWidth = 1;
623
+ cobj.strokeText(list[i].title, 150, 360 * (i + 1) - 20);
624
+ cobj.stroke();
625
+ //左边框
626
+ cobj.beginPath();
627
+ cobj.moveTo(0, 0);
628
+ cobj.lineTo(0, 360 * list.length);
629
+ cobj.closePath(); //闭合路径
630
+ cobj.lineWidth = 5; //线的边框为10像素
631
+ cobj.strokeStyle = '#d9363e';
632
+ cobj.stroke(); //绘制定义的图形
633
+
634
+ //下边框
635
+ cobj.beginPath();
636
+ cobj.moveTo(0, 0);
637
+ cobj.lineTo(640, 0);
638
+ cobj.closePath(); //闭合路径
639
+ cobj.lineWidth = 5; //线的边框为10像素
640
+ cobj.strokeStyle = '#d9363e';
641
+ cobj.stroke(); //绘制定义的图形
642
+
643
+ //右边框
644
+ cobj.beginPath();
645
+ cobj.moveTo(640, 360 * list.length);
646
+ cobj.lineTo(640, 0);
647
+ cobj.closePath(); //闭合路径
648
+ cobj.lineWidth = 5; //线的边框为10像素
649
+ cobj.strokeStyle = '#d9363e';
650
+ cobj.stroke(); //绘制定义的图形
651
+
652
+
653
+ //上边框
654
+ cobj.beginPath();
655
+ cobj.moveTo(0, 360 * list.length);
656
+ cobj.lineTo(640, 360 * list.length);
657
+ cobj.closePath(); //闭合路径
658
+ cobj.lineWidth = 5; //线的边框为10像素
659
+ cobj.strokeStyle = '#d9363e';
660
+ cobj.stroke(); //绘制定义的图形
661
+
662
+ // let sid = document.getElementById(list[i].name).name
663
+ // let stream = this.test_controller.GetMediaInfo(sid).audio_
664
+ // let acc = new AudioContext()
665
+ // let mic = acc.createMediaStreamSource(stream)
666
+ // let analyser = acc.createAnalyser()
667
+ // analyser.fftSize = 256
668
+ // mic.connect(analyser)
669
+ // aou(analyser)
670
+ // let microphoneSize = this.props.microphoneSize
671
+ // var img = document.getElementById("icon_huatong");
672
+ // cobj.drawImage(img, 600, 360 * (i + 1) - 60, microphoneSize, microphoneSize);
673
+ // function aou(analyser){
674
+ // let dataArray = new Uint8Array(analyser.frequencyBinCount);
675
+ // analyser.getByteFrequencyData(dataArray);
676
+ // let step = Math.round(dataArray.length / 60); //采样步长
677
+ // // 以画布左上角为坐标原点
678
+ // let drawArea = {
679
+ // x1: 28/50 * microphoneSize + 600, // 波动范围右下角的点坐标
680
+ // y1: 25/50 * microphoneSize + 360 * (i + 1) - 60,
681
+ // x2: 22/50 * microphoneSize + 600, // 波动范围左上角的点坐标
682
+ // y2: 10/50 * microphoneSize + 360 * (i + 1) - 60,
683
+ // }
684
+
685
+ // for (var j = 0; j < 40; j++) {
686
+ // let energy = (dataArray[step * j] / 256.0) * 80;
687
+ // cobj.beginPath();
688
+ // cobj.fillStyle = "#0AE544";
689
+ // const { x1,y1,x2,y2} = drawArea
690
+ // let width = x1-x2;
691
+ // let height = (energy>20?(energy-20):0) * (y1 - y2 ) / 70
692
+ // let startX = x2 // 绘制起始点x
693
+ // let startY = y1 - height // 绘制起始点y
694
+ // cobj.fillRect(startX, startY, width, height )
695
+ // }
696
+ // requestAnimationFrame(aou.bind(this, analyser));
697
+
698
+ // }
699
+ }
700
+ }, 100);
701
+ const captureStream = canvas.captureStream();
702
+ const mix_stream = new MediaStream(captureStream);
703
+ pictureInPictureVideo = document.getElementById('mixedvideo');
704
+ pictureInPictureVideo.srcObject = mix_stream;
705
+ pictureInPictureVideo.onloadedmetadata = () => {
706
+ pictureInPictureVideo.requestPictureInPicture();
707
+ };
702
708
  }
703
-
709
+
704
710
 
705
711
  pictureInPictureVideo.addEventListener('enterpictureinpicture', (event) => {
706
712
  //可获取画中画窗口的一些数据,如宽高等
@@ -721,14 +727,14 @@ componentDidMount() {
721
727
  });
722
728
  }
723
729
  };
724
- roomCallBack=(type,manege) =>{
730
+ roomCallBack = (type, manege) => {
725
731
  if (this.state.sessionId) {
726
732
  this.props.joinRoomCallback({
727
733
  type: type,
728
734
  errorManage: manege,
729
735
  data: {}
730
736
  })
731
- }else {
737
+ } else {
732
738
  this.props.createRoomCallback({
733
739
  type: type,
734
740
  errorManage: manege,
@@ -736,13 +742,13 @@ componentDidMount() {
736
742
  })
737
743
  }
738
744
  }
739
- tabTitlesClick = (value,type) =>{
745
+ tabTitlesClick = (value, type) => {
740
746
  const { tabTitles } = this.state;
741
- if(type == 'add') {
747
+ if (type == 'add') {
742
748
  tabTitles.unshift(value)
743
- }else {
744
- this.state.tabTitles.map((item,index)=>{
745
- if(item.value == value) {
749
+ } else {
750
+ this.state.tabTitles.map((item, index) => {
751
+ if (item.value == value) {
746
752
  tabTitles.splice(index, 1)
747
753
  this.setState({
748
754
  tabTitles
@@ -750,7 +756,7 @@ componentDidMount() {
750
756
  }
751
757
  })
752
758
  }
753
- if(this.state.tabTitles.length >0) {
759
+ if (this.state.tabTitles.length > 0) {
754
760
  this.setState({
755
761
  isSelect: this.state.tabTitles[0].value
756
762
  })
@@ -792,194 +798,194 @@ componentDidMount() {
792
798
  } else if (Mival.typeId == 1218) {
793
799
  if (Mival.sessionId == this.state.sessionId) {
794
800
  // 1-开启,2-关闭
795
- if(Mival.type == 1) {
801
+ if (Mival.type == 1) {
796
802
  this.switchExternal()
797
- } else if(Mival.type == 2) {
798
- this.tabTitlesClick('RMWhiteboard','delect')
799
- if(this.state.isSharedScreen) {
803
+ } else if (Mival.type == 2) {
804
+ this.tabTitlesClick('RMWhiteboard', 'delect')
805
+ if (this.state.isSharedScreen) {
800
806
  this.setState({
801
807
  isWhiteboard: false,
802
808
  })
803
- }else {
809
+ } else {
804
810
  this.test_controller.UnPublish(document.getElementById('video20').name)
805
811
  this.setState({
806
812
  isWhiteboard: false,
807
813
  })
808
814
  }
809
815
  }
810
-
816
+
811
817
  }
812
-
818
+
813
819
  } else if (Mival.typeId == 3100) {
814
- if(Mival.data.sessionId == this.state.sessionId) {
815
- if(Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
816
- if(Mival.muteStatus == 0) {
820
+ if (Mival.data.sessionId == this.state.sessionId) {
821
+ if (Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
822
+ if (Mival.muteStatus == 0) {
817
823
  this.setState({
818
824
  voiceVideoOne: false
819
825
  })
820
- } else if(Mival.muteStatus == 1) {
826
+ } else if (Mival.muteStatus == 1) {
821
827
  this.setState({
822
828
  voiceVideoOne: true
823
829
  })
824
830
  }
825
-
831
+
826
832
  }
827
- if(Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
828
- if(Mival.muteStatus == 0) {
833
+ if (Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
834
+ if (Mival.muteStatus == 0) {
829
835
  this.setState({
830
836
  voiceVideoTwo: false
831
837
  })
832
- } else if(Mival.muteStatus == 1) {
838
+ } else if (Mival.muteStatus == 1) {
833
839
  this.setState({
834
840
  voiceVideoTwo: true
835
841
  })
836
842
  }
837
-
843
+
838
844
  }
839
- if(Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
840
- if(Mival.muteStatus == 0) {
845
+ if (Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
846
+ if (Mival.muteStatus == 0) {
841
847
  this.setState({
842
848
  voiceVideoThree: false
843
849
  })
844
- } else if(Mival.muteStatus == 1) {
850
+ } else if (Mival.muteStatus == 1) {
845
851
  this.setState({
846
852
  voiceVideoThree: true
847
853
  })
848
854
  }
849
-
855
+
850
856
  }
851
- if(Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
852
- if(Mival.muteStatus == 0) {
857
+ if (Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
858
+ if (Mival.muteStatus == 0) {
853
859
  this.setState({
854
860
  voiceVideoFour: false
855
861
  })
856
- } else if(Mival.muteStatus == 1) {
862
+ } else if (Mival.muteStatus == 1) {
857
863
  this.setState({
858
864
  voiceVideoFour: true
859
865
  })
860
866
  }
861
-
867
+
862
868
  }
863
- if(Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
864
- if(Mival.muteStatus == 0) {
869
+ if (Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
870
+ if (Mival.muteStatus == 0) {
865
871
  this.setState({
866
872
  voiceVideoFive: false
867
873
  })
868
- } else if(Mival.muteStatus == 1) {
874
+ } else if (Mival.muteStatus == 1) {
869
875
  this.setState({
870
876
  voiceVideoFive: true
871
877
  })
872
878
  }
873
-
879
+
874
880
  }
875
- if(Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
876
- if(Mival.muteStatus == 0) {
881
+ if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
882
+ if (Mival.muteStatus == 0) {
877
883
  this.setState({
878
884
  voiceVideoSix: false
879
885
  })
880
- } else if(Mival.muteStatus == 1) {
886
+ } else if (Mival.muteStatus == 1) {
881
887
  this.setState({
882
888
  voiceVideoSix: true
883
889
  })
884
890
  }
885
-
891
+
886
892
  }
887
893
 
888
- if(Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
889
- if(Mival.muteStatus == 0) {
894
+ if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
895
+ if (Mival.muteStatus == 0) {
890
896
  this.setState({
891
897
  voiceVideoSix: false
892
898
  })
893
- } else if(Mival.muteStatus == 1) {
899
+ } else if (Mival.muteStatus == 1) {
894
900
  this.setState({
895
901
  voiceVideoSix: true
896
902
  })
897
903
  }
898
-
904
+
899
905
  }
900
- if(Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
901
- if(Mival.muteStatus == 0) {
906
+ if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
907
+ if (Mival.muteStatus == 0) {
902
908
  this.setState({
903
909
  voiceVideoSix: false
904
910
  })
905
- } else if(Mival.muteStatus == 1) {
911
+ } else if (Mival.muteStatus == 1) {
906
912
  this.setState({
907
913
  voiceVideoSix: true
908
914
  })
909
915
  }
910
-
916
+
911
917
  }
912
- if(Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
913
- if(Mival.muteStatus == 0) {
918
+ if (Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
919
+ if (Mival.muteStatus == 0) {
914
920
  this.setState({
915
921
  voiceVideoSeven: false
916
922
  })
917
- } else if(Mival.muteStatus == 1) {
923
+ } else if (Mival.muteStatus == 1) {
918
924
  this.setState({
919
925
  voiceVideoSeven: true
920
926
  })
921
927
  }
922
-
928
+
923
929
  }
924
- if(Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
925
- if(Mival.muteStatus == 0) {
930
+ if (Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
931
+ if (Mival.muteStatus == 0) {
926
932
  this.setState({
927
933
  voiceVideoEight: false
928
934
  })
929
- } else if(Mival.muteStatus == 1) {
935
+ } else if (Mival.muteStatus == 1) {
930
936
  this.setState({
931
937
  voiceVideoEight: true
932
938
  })
933
939
  }
934
-
940
+
935
941
  }
936
- if(Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
937
- if(Mival.muteStatus == 0) {
942
+ if (Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
943
+ if (Mival.muteStatus == 0) {
938
944
  this.setState({
939
945
  voiceVideoNine: false
940
946
  })
941
- } else if(Mival.muteStatus == 1) {
947
+ } else if (Mival.muteStatus == 1) {
942
948
  this.setState({
943
949
  voiceVideoNine: true
944
950
  })
945
951
  }
946
-
952
+
947
953
  }
948
- if(Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
949
- if(Mival.muteStatus == 0) {
954
+ if (Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
955
+ if (Mival.muteStatus == 0) {
950
956
  this.setState({
951
957
  voiceVideoTen: false
952
958
  })
953
- } else if(Mival.muteStatus == 1) {
959
+ } else if (Mival.muteStatus == 1) {
954
960
  this.setState({
955
961
  voiceVideoTen: true
956
962
  })
957
963
  }
958
-
964
+
959
965
  }
960
- if(Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
961
- if(Mival.muteStatus == 0) {
966
+ if (Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
967
+ if (Mival.muteStatus == 0) {
962
968
  this.setState({
963
969
  voiceVideoEleven: false
964
970
  })
965
- } else if(Mival.muteStatus == 1) {
971
+ } else if (Mival.muteStatus == 1) {
966
972
  this.setState({
967
973
  voiceVideoEleven: true
968
974
  })
969
975
  }
970
-
976
+
971
977
  }
972
- if(Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
973
- if(Mival.muteStatus == 0) {
978
+ if (Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
979
+ if (Mival.muteStatus == 0) {
974
980
  this.setState({
975
981
  voiceVideoTwelve: false
976
982
  })
977
- } else if(Mival.muteStatus == 1) {
983
+ } else if (Mival.muteStatus == 1) {
978
984
  this.setState({
979
985
  voiceVideoTwelve: true
980
986
  })
981
987
  }
982
-
988
+
983
989
  }
984
990
  }
985
991
  }
@@ -990,7 +996,7 @@ componentDidMount() {
990
996
  type: '2',
991
997
  sigType: 1
992
998
  };
993
-
999
+
994
1000
  this.test_controller.GetDevices();
995
1001
  // 获取设备成功
996
1002
  this.test_controller.OnGetDevicesSuccess = (devicesInfo) => {
@@ -1043,13 +1049,28 @@ componentDidMount() {
1043
1049
  obj2.push(b)
1044
1050
  }
1045
1051
  }
1046
- this.mpaasSig(data);
1052
+ this.setState({
1053
+ cameraList: obj,
1054
+ microphoneList: obj1,
1055
+ })
1056
+ if (!this.state.appId) {
1057
+ this.mpaasSig(data);
1058
+ this.setState({
1059
+ cameraValue: obj[0].actionid,
1060
+ microphoneValue: obj1[0].actionid
1061
+ })
1062
+ } else {
1063
+ this.setState({
1064
+ isModalVisibleInspection: true
1065
+ })
1066
+ }
1067
+
1047
1068
  };
1048
1069
  // 获取设备失败
1049
1070
  this.test_controller.OnGetDevicesFailed = (code, msg) => {
1050
1071
  console.log('获取设备失败', code, msg)
1051
1072
  message.success('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头')
1052
- this.roomCallBack(2,'获取失败失败')
1073
+ this.roomCallBack(2, '获取失败失败')
1053
1074
  };
1054
1075
  // 建立连接成功
1055
1076
  this.test_controller.OnConnectOK = () => {
@@ -1058,7 +1079,7 @@ componentDidMount() {
1058
1079
  };
1059
1080
  this.test_controller.OnConnectFailed = (code, msg) => {
1060
1081
  console.log('建立连接失败', code, msg)
1061
- this.roomCallBack(2,'连接失败')
1082
+ this.roomCallBack(2, '连接失败')
1062
1083
  };
1063
1084
  // 断开连接回调
1064
1085
  this.test_controller.OnConnectClose = (code, msg) => {
@@ -1072,7 +1093,7 @@ componentDidMount() {
1072
1093
  // 初始化房间失败
1073
1094
  this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
1074
1095
  console.log('初始化房间失败', err_code, err_msg)
1075
- this.roomCallBack(2,'初始化失败')
1096
+ this.roomCallBack(2, '初始化失败')
1076
1097
  };
1077
1098
  // 初始化成功回调
1078
1099
  this.test_controller.OnInitRoomConfigOK = () => {
@@ -1098,7 +1119,7 @@ componentDidMount() {
1098
1119
  // 创建房间失败
1099
1120
  this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
1100
1121
  console.log('创建房间失败', err_code, err_msg)
1101
- this.roomCallBack(2,'创建失败')
1122
+ this.roomCallBack(2, '创建失败')
1102
1123
  };
1103
1124
  // 初始化⾳视频成功
1104
1125
  this.test_controller.OnMediaCallSucc = (sid) => {
@@ -1115,26 +1136,26 @@ componentDidMount() {
1115
1136
  // 加入房间成功
1116
1137
  this.test_controller.OnJoinRoomSucc = () => {
1117
1138
  console.log('加入房间成功')
1118
- this.roomCallBack(1,'')
1139
+ this.roomCallBack(1, '')
1119
1140
  };
1120
1141
  // 加入房间失败
1121
1142
  this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
1122
1143
  console.log('加入房间失败', err_code, err_msg)
1123
- this.roomCallBack(2,'加入失败')
1144
+ this.roomCallBack(2, '加入失败')
1124
1145
  };
1125
1146
  // 发布媒体流成功
1126
1147
  this.test_controller.OnPublishSucc = (sid) => {
1127
1148
  console.log('发布媒体流成功', sid)
1128
- if(sid == document.getElementById('video20').name) {
1129
- callNimIM('sendCustomCmdMsg', {
1130
- customId: this.state.imRoomId,
1131
- content: JSON.stringify({
1132
- 'typeId': 2030,
1133
- 'sessionId': this.state.sessionId,
1134
- 'sharedScreen': 1,
1135
- 'tellerId': this.props.tellerAccount
1136
- })
1137
- });
1149
+ if (sid == document.getElementById('video20').name) {
1150
+ callNimIM('sendCustomCmdMsg', {
1151
+ customId: this.state.imRoomId,
1152
+ content: JSON.stringify({
1153
+ 'typeId': 2030,
1154
+ 'sessionId': this.state.sessionId,
1155
+ 'sharedScreen': 1,
1156
+ 'tellerId': this.props.tellerAccount
1157
+ })
1158
+ });
1138
1159
  }
1139
1160
  };
1140
1161
  // 发布媒体流失败
@@ -1157,22 +1178,22 @@ componentDidMount() {
1157
1178
  // 推送“房间与会者列表”给新加⼊者
1158
1179
  this.test_controller.OnRoomAttendanceList = (participants) => {
1159
1180
  console.log('房间与会者列表', participants)
1160
- participants.map((item,index)=>{
1161
- if(item.uid != this.state.tellerAccount) {
1162
- item.publish.map((itemOne,indexOne)=>{
1181
+ participants.map((item, index) => {
1182
+ if (item.uid != this.state.tellerAccount) {
1183
+ item.publish.map((itemOne, indexOne) => {
1163
1184
  let array = this.state.roomCustomerList;
1164
- let newArray = [...array];
1165
- newArray.push({
1166
- feedId: itemOne.feedId,
1167
- uid: item.uid,
1168
- tag: itemOne.tag
1169
- });
1170
- console.log(array, newArray, this.state.roomCustomerList);
1171
- this.setState({
1172
- roomCustomerList: newArray
1173
- })
1174
- let config_param
1175
- if(itemOne.tag == 'VIDEO_SOURCE_SCREEN') {
1185
+ let newArray = [...array];
1186
+ newArray.push({
1187
+ feedId: itemOne.feedId,
1188
+ uid: item.uid,
1189
+ tag: itemOne.tag
1190
+ });
1191
+ console.log(array, newArray, this.state.roomCustomerList);
1192
+ this.setState({
1193
+ roomCustomerList: newArray
1194
+ })
1195
+ let config_param
1196
+ if (itemOne.tag == 'VIDEO_SOURCE_SCREEN') {
1176
1197
  config_param = {
1177
1198
  subscribe_video_id: 'video21',
1178
1199
  subscribe_audio_id: 'audio21',
@@ -1180,15 +1201,15 @@ componentDidMount() {
1180
1201
  feedId_id: 'feedId21',
1181
1202
  feedId: itemOne.feedId
1182
1203
  }
1183
-
1204
+
1184
1205
  this.tabTitlesClick(
1185
1206
  {
1186
1207
  value: 'customerScreen',
1187
1208
  name: '客户投屏'
1188
- },'add'
1209
+ }, 'add'
1189
1210
  )
1190
- }else {
1191
- if(!document.getElementById('video1').name) {
1211
+ } else {
1212
+ if (!document.getElementById('video1').name) {
1192
1213
  config_param = {
1193
1214
  subscribe_video_id: 'video1',
1194
1215
  subscribe_audio_id: 'audio1',
@@ -1197,7 +1218,7 @@ componentDidMount() {
1197
1218
  feedId: itemOne.feedId
1198
1219
  }
1199
1220
  }
1200
- else if(!document.getElementById('video2').name) {
1221
+ else if (!document.getElementById('video2').name) {
1201
1222
  config_param = {
1202
1223
  subscribe_video_id: 'video2',
1203
1224
  subscribe_audio_id: 'audio2',
@@ -1206,7 +1227,7 @@ componentDidMount() {
1206
1227
  feedId: itemOne.feedId
1207
1228
  }
1208
1229
  }
1209
- else if(!document.getElementById('video3').name) {
1230
+ else if (!document.getElementById('video3').name) {
1210
1231
  config_param = {
1211
1232
  subscribe_video_id: 'video3',
1212
1233
  subscribe_audio_id: 'audio3',
@@ -1215,7 +1236,7 @@ componentDidMount() {
1215
1236
  feedId: itemOne.feedId
1216
1237
  }
1217
1238
  }
1218
- else if(!document.getElementById('video4').name) {
1239
+ else if (!document.getElementById('video4').name) {
1219
1240
  config_param = {
1220
1241
  subscribe_video_id: 'video4',
1221
1242
  subscribe_audio_id: 'audio4',
@@ -1224,7 +1245,7 @@ componentDidMount() {
1224
1245
  feedId: itemOne.feedId
1225
1246
  }
1226
1247
  }
1227
- else if(!document.getElementById('video5').name) {
1248
+ else if (!document.getElementById('video5').name) {
1228
1249
  config_param = {
1229
1250
  subscribe_video_id: 'video5',
1230
1251
  subscribe_audio_id: 'audio5',
@@ -1233,7 +1254,7 @@ componentDidMount() {
1233
1254
  feedId: itemOne.feedId
1234
1255
  }
1235
1256
  }
1236
- else if(!document.getElementById('video6').name) {
1257
+ else if (!document.getElementById('video6').name) {
1237
1258
  config_param = {
1238
1259
  subscribe_video_id: 'video6',
1239
1260
  subscribe_audio_id: 'audio6',
@@ -1243,7 +1264,7 @@ componentDidMount() {
1243
1264
  }
1244
1265
  }
1245
1266
 
1246
- else if(!document.getElementById('video7').name) {
1267
+ else if (!document.getElementById('video7').name) {
1247
1268
  config_param = {
1248
1269
  subscribe_video_id: 'video7',
1249
1270
  subscribe_audio_id: 'audio7',
@@ -1252,7 +1273,7 @@ componentDidMount() {
1252
1273
  feedId: itemOne.feedId
1253
1274
  }
1254
1275
  }
1255
- else if(!document.getElementById('video8').name) {
1276
+ else if (!document.getElementById('video8').name) {
1256
1277
  config_param = {
1257
1278
  subscribe_video_id: 'video8',
1258
1279
  subscribe_audio_id: 'audio8',
@@ -1261,7 +1282,7 @@ componentDidMount() {
1261
1282
  feedId: itemOne.feedId
1262
1283
  }
1263
1284
  }
1264
- else if(!document.getElementById('video9').name) {
1285
+ else if (!document.getElementById('video9').name) {
1265
1286
  config_param = {
1266
1287
  subscribe_video_id: 'video9',
1267
1288
  subscribe_audio_id: 'audio9',
@@ -1270,7 +1291,7 @@ componentDidMount() {
1270
1291
  feedId: itemOne.feedId
1271
1292
  }
1272
1293
  }
1273
- else if(!document.getElementById('video10').name) {
1294
+ else if (!document.getElementById('video10').name) {
1274
1295
  config_param = {
1275
1296
  subscribe_video_id: 'video10',
1276
1297
  subscribe_audio_id: 'audio10',
@@ -1279,7 +1300,7 @@ componentDidMount() {
1279
1300
  feedId: itemOne.feedId
1280
1301
  }
1281
1302
  }
1282
- else if(!document.getElementById('video11').name) {
1303
+ else if (!document.getElementById('video11').name) {
1283
1304
  config_param = {
1284
1305
  subscribe_video_id: 'video11',
1285
1306
  subscribe_audio_id: 'audio11',
@@ -1288,7 +1309,7 @@ componentDidMount() {
1288
1309
  feedId: itemOne.feedId
1289
1310
  }
1290
1311
  }
1291
- else if(!document.getElementById('video12').name) {
1312
+ else if (!document.getElementById('video12').name) {
1292
1313
  config_param = {
1293
1314
  subscribe_video_id: 'video12',
1294
1315
  subscribe_audio_id: 'audio12',
@@ -1325,12 +1346,12 @@ componentDidMount() {
1325
1346
  content: JSON.stringify({
1326
1347
  'typeId': 1014,
1327
1348
  'sessionId': this.state.sessionId,
1328
- 'meetingInfo': {
1349
+ 'meetingInfo': {
1329
1350
  'title': this.props.meetingInfo.title,
1330
1351
  'host': this.props.meetingInfo.host,
1331
1352
  'customers': this.props.meetingInfo.customers
1332
1353
  }
1333
-
1354
+
1334
1355
  })
1335
1356
  }, function (code, message, data) {
1336
1357
  })
@@ -1346,8 +1367,8 @@ componentDidMount() {
1346
1367
  roomCustomerList: newArray
1347
1368
  })
1348
1369
  let config_param
1349
- if(feed.uid != this.state.tellerAccount) {
1350
- if(feed.tag == 'VIDEO_SOURCE_SCREEN') {
1370
+ if (feed.uid != this.state.tellerAccount) {
1371
+ if (feed.tag == 'VIDEO_SOURCE_SCREEN') {
1351
1372
  config_param = {
1352
1373
  subscribe_video_id: 'video21',
1353
1374
  subscribe_audio_id: 'audio21',
@@ -1355,42 +1376,42 @@ componentDidMount() {
1355
1376
  feedId_id: 'feedId21',
1356
1377
  feedId: feed.feedId
1357
1378
  }
1358
-
1379
+
1359
1380
  this.tabTitlesClick(
1360
1381
  {
1361
1382
  value: 'customerScreen',
1362
1383
  name: '客户投屏'
1363
- },'add'
1384
+ }, 'add'
1364
1385
  )
1365
1386
  if (config_param !== undefined) {
1366
1387
  config_param.need_volume_analyser = false
1367
1388
  console.log(config_param)
1368
- setTimeout(()=>{
1369
-
1389
+ setTimeout(() => {
1390
+
1370
1391
  this.test_controller.Subscribe(config_param)
1371
1392
  }, 1000)
1372
-
1393
+
1373
1394
  }
1374
1395
  } else {
1375
- // let data_param = {
1376
- // isVideo: true,
1377
- // videoIndex: this.state.videoList.length + 1,
1378
- // videoTwoName: ''
1379
- // }
1380
- // let videoList = this.state.videoList;
1381
- // let newvideoList = [...videoList];
1382
- // newvideoList.push(data_param);
1383
- // this.setState({
1384
- // videoList: newvideoList
1385
- // },()=>{
1386
- // config_param = {
1387
- // subscribe_video_id: 'video' + this.state.videoList.length,
1388
- // subscribe_audio_id: 'audio' + this.state.videoList.length,
1389
- // subscribe_streamId_id: 'subscribe_streamId' + this.state.videoList.length,
1390
- // feedId_id: 'feedId' + this.state.videoList.length,
1391
- // feedId: feed.feedId
1392
- // }
1393
- if(!document.getElementById('video1').name) {
1396
+ // let data_param = {
1397
+ // isVideo: true,
1398
+ // videoIndex: this.state.videoList.length + 1,
1399
+ // videoTwoName: ''
1400
+ // }
1401
+ // let videoList = this.state.videoList;
1402
+ // let newvideoList = [...videoList];
1403
+ // newvideoList.push(data_param);
1404
+ // this.setState({
1405
+ // videoList: newvideoList
1406
+ // },()=>{
1407
+ // config_param = {
1408
+ // subscribe_video_id: 'video' + this.state.videoList.length,
1409
+ // subscribe_audio_id: 'audio' + this.state.videoList.length,
1410
+ // subscribe_streamId_id: 'subscribe_streamId' + this.state.videoList.length,
1411
+ // feedId_id: 'feedId' + this.state.videoList.length,
1412
+ // feedId: feed.feedId
1413
+ // }
1414
+ if (!document.getElementById('video1').name) {
1394
1415
  config_param = {
1395
1416
  subscribe_video_id: 'video1',
1396
1417
  subscribe_audio_id: 'audio1',
@@ -1399,7 +1420,7 @@ componentDidMount() {
1399
1420
  feedId: feed.feedId
1400
1421
  }
1401
1422
  }
1402
- else if(!document.getElementById('video2').name) {
1423
+ else if (!document.getElementById('video2').name) {
1403
1424
  config_param = {
1404
1425
  subscribe_video_id: 'video2',
1405
1426
  subscribe_audio_id: 'audio2',
@@ -1408,7 +1429,7 @@ componentDidMount() {
1408
1429
  feedId: feed.feedId
1409
1430
  }
1410
1431
  }
1411
- else if(!document.getElementById('video3').name) {
1432
+ else if (!document.getElementById('video3').name) {
1412
1433
  config_param = {
1413
1434
  subscribe_video_id: 'video3',
1414
1435
  subscribe_audio_id: 'audio3',
@@ -1417,7 +1438,7 @@ componentDidMount() {
1417
1438
  feedId: feed.feedId
1418
1439
  }
1419
1440
  }
1420
- else if(!document.getElementById('video4').name) {
1441
+ else if (!document.getElementById('video4').name) {
1421
1442
  config_param = {
1422
1443
  subscribe_video_id: 'video4',
1423
1444
  subscribe_audio_id: 'audio4',
@@ -1426,7 +1447,7 @@ componentDidMount() {
1426
1447
  feedId: feed.feedId
1427
1448
  }
1428
1449
  }
1429
- else if(!document.getElementById('video5').name) {
1450
+ else if (!document.getElementById('video5').name) {
1430
1451
  config_param = {
1431
1452
  subscribe_video_id: 'video5',
1432
1453
  subscribe_audio_id: 'audio5',
@@ -1435,7 +1456,7 @@ componentDidMount() {
1435
1456
  feedId: feed.feedId
1436
1457
  }
1437
1458
  }
1438
- else if(!document.getElementById('video6').name) {
1459
+ else if (!document.getElementById('video6').name) {
1439
1460
  config_param = {
1440
1461
  subscribe_video_id: 'video6',
1441
1462
  subscribe_audio_id: 'audio6',
@@ -1444,7 +1465,7 @@ componentDidMount() {
1444
1465
  feedId: feed.feedId
1445
1466
  }
1446
1467
  }
1447
- else if(!document.getElementById('video7').name) {
1468
+ else if (!document.getElementById('video7').name) {
1448
1469
  config_param = {
1449
1470
  subscribe_video_id: 'video7',
1450
1471
  subscribe_audio_id: 'audio7',
@@ -1453,7 +1474,7 @@ componentDidMount() {
1453
1474
  feedId: feed.feedId
1454
1475
  }
1455
1476
  }
1456
- else if(!document.getElementById('video8').name) {
1477
+ else if (!document.getElementById('video8').name) {
1457
1478
  config_param = {
1458
1479
  subscribe_video_id: 'video8',
1459
1480
  subscribe_audio_id: 'audio8',
@@ -1462,7 +1483,7 @@ componentDidMount() {
1462
1483
  feedId: feed.feedId
1463
1484
  }
1464
1485
  }
1465
- else if(!document.getElementById('video9').name) {
1486
+ else if (!document.getElementById('video9').name) {
1466
1487
  config_param = {
1467
1488
  subscribe_video_id: 'video9',
1468
1489
  subscribe_audio_id: 'audio9',
@@ -1471,7 +1492,7 @@ componentDidMount() {
1471
1492
  feedId: feed.feedId
1472
1493
  }
1473
1494
  }
1474
- else if(!document.getElementById('video10').name) {
1495
+ else if (!document.getElementById('video10').name) {
1475
1496
  config_param = {
1476
1497
  subscribe_video_id: 'video10',
1477
1498
  subscribe_audio_id: 'audio10',
@@ -1480,7 +1501,7 @@ componentDidMount() {
1480
1501
  feedId: feed.feedId
1481
1502
  }
1482
1503
  }
1483
- else if(!document.getElementById('video11').name) {
1504
+ else if (!document.getElementById('video11').name) {
1484
1505
  config_param = {
1485
1506
  subscribe_video_id: 'video11',
1486
1507
  subscribe_audio_id: 'audio11',
@@ -1489,7 +1510,7 @@ componentDidMount() {
1489
1510
  feedId: feed.feedId
1490
1511
  }
1491
1512
  }
1492
- else if(!document.getElementById('video12').name) {
1513
+ else if (!document.getElementById('video12').name) {
1493
1514
  config_param = {
1494
1515
  subscribe_video_id: 'video12',
1495
1516
  subscribe_audio_id: 'audio12',
@@ -1498,20 +1519,20 @@ componentDidMount() {
1498
1519
  feedId: feed.feedId
1499
1520
  }
1500
1521
  }
1501
- if (config_param !== undefined) {
1502
- config_param.need_volume_analyser = true
1503
- console.log(config_param)
1504
-
1505
- this.test_controller.Subscribe(config_param)
1506
-
1507
- }
1522
+ if (config_param !== undefined) {
1523
+ config_param.need_volume_analyser = true
1524
+ console.log(config_param)
1525
+
1526
+ this.test_controller.Subscribe(config_param)
1527
+
1528
+ }
1508
1529
  // })
1509
-
1530
+
1510
1531
 
1511
1532
  }
1512
1533
 
1513
1534
  }
1514
-
1535
+
1515
1536
  };
1516
1537
  // 推送“有新订阅”给与会者
1517
1538
  this.test_controller.OnNewSubscribe = (subscriber, feed) => {
@@ -1519,8 +1540,8 @@ componentDidMount() {
1519
1540
  };
1520
1541
  // 取消发布成功
1521
1542
  this.test_controller.OnUnPublishSucc = (sid) => {
1522
- console.log('取消发布成功', sid,document.getElementById('publish_video1').name)
1523
- if(sid != document.getElementById('publish_video1').name) {
1543
+ console.log('取消发布成功', sid, document.getElementById('publish_video1').name)
1544
+ if (sid != document.getElementById('publish_video1').name) {
1524
1545
  callNimIM('sendCustomCmdMsg', {
1525
1546
  customId: this.state.imRoomId,
1526
1547
  content: JSON.stringify({
@@ -1535,8 +1556,8 @@ componentDidMount() {
1535
1556
  isSharedScreen: false,
1536
1557
  screenName: '投屏'
1537
1558
  });
1538
- this.tabTitlesClick('RMScreen','delect')
1539
- if(this.state.isPictureInPicture) {
1559
+ this.tabTitlesClick('RMScreen', 'delect')
1560
+ if (this.state.isPictureInPicture) {
1540
1561
  document.exitPictureInPicture()
1541
1562
  }
1542
1563
  }
@@ -1545,80 +1566,80 @@ componentDidMount() {
1545
1566
  this.test_controller.OnUnSubscribeSucc = (sid) => {
1546
1567
  console.log('取消订阅媒体流成功', sid)
1547
1568
  this.state.tabTitles.map((item) => {
1548
- if(item.value == 'customerScreen') {
1549
- if(!document.getElementById("video21").name) {
1550
- this.tabTitlesClick('customerScreen','delect')
1569
+ if (item.value == 'customerScreen') {
1570
+ if (!document.getElementById("video21").name) {
1571
+ this.tabTitlesClick('customerScreen', 'delect')
1551
1572
  }
1552
1573
  }
1553
1574
  })
1554
- if(!document.getElementById("video1").name) {
1575
+ if (!document.getElementById("video1").name) {
1555
1576
  this.setState({
1556
1577
  videoOneName: '',
1557
1578
  voiceVideoOne: false
1558
1579
  })
1559
1580
  }
1560
- if(!document.getElementById("video2").name) {
1581
+ if (!document.getElementById("video2").name) {
1561
1582
  this.setState({
1562
1583
  videoTwoName: '',
1563
1584
  voiceVideoTwo: false
1564
1585
  })
1565
1586
  }
1566
- if(!document.getElementById("video3").name) {
1587
+ if (!document.getElementById("video3").name) {
1567
1588
  this.setState({
1568
1589
  videoThreeName: '',
1569
1590
  voiceVideoThree: false
1570
1591
  })
1571
1592
  }
1572
- if(!document.getElementById("video4").name) {
1593
+ if (!document.getElementById("video4").name) {
1573
1594
  this.setState({
1574
1595
  videoFourName: '',
1575
1596
  voiceVideoFour: false,
1576
1597
  })
1577
1598
  }
1578
- if(!document.getElementById("video5").name) {
1599
+ if (!document.getElementById("video5").name) {
1579
1600
  this.setState({
1580
1601
  videoFiveName: '',
1581
1602
  voiceVideoFive: false
1582
1603
  })
1583
1604
  }
1584
- if(!document.getElementById("video6").name) {
1605
+ if (!document.getElementById("video6").name) {
1585
1606
  this.setState({
1586
1607
  videoSixName: '',
1587
1608
  voiceVideoSix: false
1588
1609
  })
1589
1610
  }
1590
1611
 
1591
- if(!document.getElementById("video7").name) {
1612
+ if (!document.getElementById("video7").name) {
1592
1613
  this.setState({
1593
1614
  videoSevenName: '',
1594
1615
  voiceVideoSeven: false
1595
1616
  })
1596
1617
  }
1597
- if(!document.getElementById("video8").name) {
1618
+ if (!document.getElementById("video8").name) {
1598
1619
  this.setState({
1599
1620
  videoEightName: '',
1600
1621
  voiceVideoEight: false
1601
1622
  })
1602
1623
  }
1603
- if(!document.getElementById("video9").name) {
1624
+ if (!document.getElementById("video9").name) {
1604
1625
  this.setState({
1605
1626
  videoNineName: '',
1606
1627
  voiceVideoNine: false
1607
1628
  })
1608
1629
  }
1609
- if(!document.getElementById("video10").name) {
1630
+ if (!document.getElementById("video10").name) {
1610
1631
  this.setState({
1611
1632
  videoTenName: '',
1612
1633
  voiceVideoTen: false
1613
1634
  })
1614
1635
  }
1615
- if(!document.getElementById("video11").name) {
1636
+ if (!document.getElementById("video11").name) {
1616
1637
  this.setState({
1617
1638
  videoElevenName: '',
1618
1639
  voiceVideoEleven: false
1619
1640
  })
1620
1641
  }
1621
- if(!document.getElementById("video12").name) {
1642
+ if (!document.getElementById("video12").name) {
1622
1643
  this.setState({
1623
1644
  videoTwelveName: '',
1624
1645
  voiceVideoTwelve: false
@@ -1628,13 +1649,13 @@ componentDidMount() {
1628
1649
  // 推送“取消发布”给与会者
1629
1650
  this.test_controller.OnUnPublish = (feed) => {
1630
1651
  console.log('取消发布者', feed)
1631
- for(let i=0;i<this.state.roomCustomerList.length;i++) {
1632
- if(this.state.roomCustomerList[i].feedId == feed.feedId) {
1652
+ for (let i = 0; i < this.state.roomCustomerList.length; i++) {
1653
+ if (this.state.roomCustomerList[i].feedId == feed.feedId) {
1633
1654
  this.state.roomCustomerList.splice(i, 1)
1634
1655
  }
1635
1656
  }
1636
1657
 
1637
- if(this.state.roomCustomerList.length == 0) {
1658
+ if (this.state.roomCustomerList.length == 0) {
1638
1659
  // this.test_controller.ChangeStreamSize(document.getElementById('publish_video1').name, 3)
1639
1660
  this.setState({
1640
1661
  isCustomer: false
@@ -1818,6 +1839,10 @@ componentDidMount() {
1818
1839
  // 切流成功通知
1819
1840
  this.test_controller.OnChangeMediaStreamSuccess = (sid) => {
1820
1841
  console.log('切流成功通知', sid);
1842
+ message.success('切换摄像头或麦克风成功');
1843
+ this.setState({
1844
+ isModalVisibleInspection: false
1845
+ })
1821
1846
  };
1822
1847
  // 切流失败通知
1823
1848
  this.test_controller.OnChangeMediaStreamFailed = (
@@ -1826,6 +1851,7 @@ componentDidMount() {
1826
1851
  msg
1827
1852
  ) => {
1828
1853
  console.log('切流失败通知', sid, code, msg)
1854
+ message.success('切换摄像头或麦克风失败,请先检查设备');
1829
1855
  };
1830
1856
  // 服务端录制初始化成功
1831
1857
  this.test_controller.OnInitRemoteRecordSucc = (
@@ -1908,22 +1934,22 @@ componentDidMount() {
1908
1934
  ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
1909
1935
  // 以画布左上角为坐标原点
1910
1936
  let drawArea = {
1911
- x1: 28/50*canvas.width, // 波动范围右下角的点坐标
1912
- y1: 25/50*canvas.height,
1913
- x2: 22/50*canvas.width, // 波动范围左上角的点坐标
1914
- y2: 10/50*canvas.height,
1937
+ x1: 28 / 50 * canvas.width, // 波动范围右下角的点坐标
1938
+ y1: 25 / 50 * canvas.height,
1939
+ x2: 22 / 50 * canvas.width, // 波动范围左上角的点坐标
1940
+ y2: 10 / 50 * canvas.height,
1915
1941
  }
1916
1942
 
1917
1943
  for (var i = 0; i < 40; i++) {
1918
1944
  let energy = (dataArray[step * i] / 256.0) * 80;
1919
1945
  ctx.beginPath();
1920
1946
  ctx.fillStyle = this.props.voiceColor;
1921
- const { x1,y1,x2,y2} = drawArea
1922
- let width = x1-x2;
1923
- let height = (energy>20?(energy-20):0) * (y1 - y2 ) / 70
1924
- let startX = x2 // 绘制起始点x
1925
- let startY = y1 - height // 绘制起始点y
1926
- ctx.fillRect(startX, startY, width, height )
1947
+ const { x1, y1, x2, y2 } = drawArea
1948
+ let width = x1 - x2;
1949
+ let height = (energy > 20 ? (energy - 20) : 0) * (y1 - y2) / 70
1950
+ let startX = x2 // 绘制起始点x
1951
+ let startY = y1 - height // 绘制起始点y
1952
+ ctx.fillRect(startX, startY, width, height)
1927
1953
  }
1928
1954
  requestAnimationFrame(this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser));
1929
1955
  }
@@ -1958,26 +1984,26 @@ componentDidMount() {
1958
1984
  }
1959
1985
  };
1960
1986
  finishSession = async () => {
1961
-
1962
-
1963
- if(this.state.roomCustomerList.length == 0) {
1964
- try {
1965
- let result = await API.finishSession({
1966
- sessionId: this.state.sessionId,
1967
- tellerId: this.props.tellerAccount
1968
- });
1969
- } catch (err) {
1970
- }
1987
+
1988
+
1989
+ if (this.state.roomCustomerList.length == 0) {
1990
+ try {
1991
+ let result = await API.finishSession({
1992
+ sessionId: this.state.sessionId,
1993
+ tellerId: this.props.tellerAccount
1994
+ });
1995
+ } catch (err) {
1971
1996
  }
1972
- this.setState({
1973
- isCustomer: false,
1974
- isWhiteboard: false,
1975
- isPictureInPicture: false,
1976
- });
1977
- this.props.onLeaveRoom({
1978
- code: LEAVE_TYPE.TELLER_EXIT,
1979
- errMsg: '坐席退出'
1980
- })
1997
+ }
1998
+ this.setState({
1999
+ isCustomer: false,
2000
+ isWhiteboard: false,
2001
+ isPictureInPicture: false,
2002
+ });
2003
+ this.props.onLeaveRoom({
2004
+ code: LEAVE_TYPE.TELLER_EXIT,
2005
+ errMsg: '坐席退出'
2006
+ })
1981
2007
 
1982
2008
  }
1983
2009
  getRoomStatus = async data => {
@@ -2108,7 +2134,7 @@ componentDidMount() {
2108
2134
  }, function (code, message, data) {
2109
2135
  console.log(data)
2110
2136
  })
2111
-
2137
+
2112
2138
  } else if (this.state.voiceStatue) {
2113
2139
  // 打开本地
2114
2140
  this.setState({
@@ -2216,8 +2242,8 @@ componentDidMount() {
2216
2242
  screenName: '投屏'
2217
2243
  });
2218
2244
  console.log(pictureInPictureVideo)
2219
- this.tabTitlesClick('RMScreen','delect')
2220
- if(this.state.isPictureInPicture) {
2245
+ this.tabTitlesClick('RMScreen', 'delect')
2246
+ if (this.state.isPictureInPicture) {
2221
2247
  document.exitPictureInPicture()
2222
2248
  }
2223
2249
  } else {
@@ -2245,14 +2271,14 @@ componentDidMount() {
2245
2271
  })
2246
2272
  this.tabTitlesClick(
2247
2273
  {
2248
- value: 'RMScreen',
2249
- name: '坐席投屏'
2250
- },'add'
2274
+ value: 'RMScreen',
2275
+ name: '坐席投屏'
2276
+ }, 'add'
2251
2277
  )
2252
- if(!this.state.isPictureInPicture) {
2278
+ if (!this.state.isPictureInPicture) {
2253
2279
  this.pictureInPicture()
2254
2280
  }
2255
-
2281
+
2256
2282
  }
2257
2283
  }
2258
2284
  };
@@ -2485,37 +2511,37 @@ componentDidMount() {
2485
2511
  // } catch (err) {
2486
2512
 
2487
2513
  // }
2488
- if(document.getElementById('video1').name == sid){
2514
+ if (document.getElementById('video1').name == sid) {
2489
2515
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid
2490
2516
  }
2491
- if(document.getElementById('video2').name == sid){
2517
+ if (document.getElementById('video2').name == sid) {
2492
2518
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid
2493
- }if(document.getElementById('video3').name == sid){
2519
+ } if (document.getElementById('video3').name == sid) {
2494
2520
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid
2495
- }if(document.getElementById('video4').name == sid){
2521
+ } if (document.getElementById('video4').name == sid) {
2496
2522
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid
2497
- }if(document.getElementById('video5').name == sid){
2523
+ } if (document.getElementById('video5').name == sid) {
2498
2524
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid
2499
- }if(document.getElementById('video6').name == sid){
2525
+ } if (document.getElementById('video6').name == sid) {
2500
2526
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid
2501
2527
  }
2502
2528
 
2503
- if(document.getElementById('video7').name == sid){
2529
+ if (document.getElementById('video7').name == sid) {
2504
2530
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid
2505
2531
  }
2506
- if(document.getElementById('video8').name == sid){
2532
+ if (document.getElementById('video8').name == sid) {
2507
2533
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid
2508
2534
  }
2509
- if(document.getElementById('video9').name == sid){
2535
+ if (document.getElementById('video9').name == sid) {
2510
2536
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid
2511
2537
  }
2512
- if(document.getElementById('video10').name == sid){
2538
+ if (document.getElementById('video10').name == sid) {
2513
2539
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid
2514
2540
  }
2515
- if(document.getElementById('video11').name == sid){
2541
+ if (document.getElementById('video11').name == sid) {
2516
2542
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid
2517
2543
  }
2518
- if(document.getElementById('video12').name == sid){
2544
+ if (document.getElementById('video12').name == sid) {
2519
2545
  userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid
2520
2546
  }
2521
2547
  try {
@@ -2529,56 +2555,56 @@ componentDidMount() {
2529
2555
  } else {
2530
2556
  message.success('查询失败')
2531
2557
  }
2532
- if(document.getElementById('video1').name == sid){
2558
+ if (document.getElementById('video1').name == sid) {
2533
2559
 
2534
2560
  this.setState({
2535
2561
  videoOneName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户1'
2536
2562
  })
2537
2563
  }
2538
- if(document.getElementById('video2').name == sid){
2564
+ if (document.getElementById('video2').name == sid) {
2539
2565
  this.setState({
2540
- videoTwoName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data? data : '客户2'
2566
+ videoTwoName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户2'
2541
2567
  })
2542
- }if(document.getElementById('video3').name == sid){
2568
+ } if (document.getElementById('video3').name == sid) {
2543
2569
  this.setState({
2544
- videoThreeName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data : '客户3'
2570
+ videoThreeName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户3'
2545
2571
  })
2546
- }if(document.getElementById('video4').name == sid){
2572
+ } if (document.getElementById('video4').name == sid) {
2547
2573
  this.setState({
2548
- videoFourName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data : '客户4'
2574
+ videoFourName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户4'
2549
2575
  })
2550
- }if(document.getElementById('video5').name == sid){
2576
+ } if (document.getElementById('video5').name == sid) {
2551
2577
  this.setState({
2552
- videoFiveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data? data : '客户5'
2578
+ videoFiveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户5'
2553
2579
  })
2554
- }if(document.getElementById('video6').name == sid){
2580
+ } if (document.getElementById('video6').name == sid) {
2555
2581
  this.setState({
2556
- videoSixName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户6'
2582
+ videoSixName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户6'
2557
2583
  })
2558
2584
  }
2559
- if(document.getElementById('video7').name == sid){
2585
+ if (document.getElementById('video7').name == sid) {
2560
2586
  this.setState({
2561
- videoSevenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户7'
2587
+ videoSevenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户7'
2562
2588
  })
2563
- }if(document.getElementById('video8').name == sid){
2589
+ } if (document.getElementById('video8').name == sid) {
2564
2590
  this.setState({
2565
- videoEightName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户8'
2591
+ videoEightName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户8'
2566
2592
  })
2567
- }if(document.getElementById('video9').name == sid){
2593
+ } if (document.getElementById('video9').name == sid) {
2568
2594
  this.setState({
2569
- videoNineName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户9'
2595
+ videoNineName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户9'
2570
2596
  })
2571
- }if(document.getElementById('video10').name == sid){
2597
+ } if (document.getElementById('video10').name == sid) {
2572
2598
  this.setState({
2573
- videoTenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户10'
2599
+ videoTenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户10'
2574
2600
  })
2575
- }if(document.getElementById('video11').name == sid){
2601
+ } if (document.getElementById('video11').name == sid) {
2576
2602
  this.setState({
2577
- videoElevenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户11'
2603
+ videoElevenName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户11'
2578
2604
  })
2579
- }if(document.getElementById('video12').name == sid){
2605
+ } if (document.getElementById('video12').name == sid) {
2580
2606
  this.setState({
2581
- videoTwelveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户12'
2607
+ videoTwelveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户12'
2582
2608
  })
2583
2609
  }
2584
2610
  } catch (err) {
@@ -2627,7 +2653,7 @@ componentDidMount() {
2627
2653
  })
2628
2654
  }
2629
2655
  switchExternal = () => {
2630
- if(!this.state.isWhiteboard) {
2656
+ if (!this.state.isWhiteboard) {
2631
2657
  const publish_config = {};
2632
2658
  this.setState({
2633
2659
  isWhiteboard: true,
@@ -2635,7 +2661,7 @@ componentDidMount() {
2635
2661
  this.tabTitlesClick({
2636
2662
  value: 'RMWhiteboard',
2637
2663
  name: 'RM白板'
2638
- },'add')
2664
+ }, 'add')
2639
2665
  if (document.getElementById('video20').name) {
2640
2666
  // 代表已经有了进行切流
2641
2667
  publish_config.publish_device = 4
@@ -2645,7 +2671,7 @@ componentDidMount() {
2645
2671
  publish_config.video_profile_type = 5
2646
2672
  this.test_controller.ChangeMediaStream(publish_config);
2647
2673
  } else {
2648
-
2674
+
2649
2675
  publish_config.media_type = 1
2650
2676
  publish_config.publish_device = 4
2651
2677
  publish_config.need_volume_analyser = true
@@ -2656,47 +2682,74 @@ componentDidMount() {
2656
2682
  publish_config.publish_tag = 'projectionWhiteboard'
2657
2683
  this.test_controller.Publish(publish_config)
2658
2684
  }
2659
- } else{
2685
+ } else {
2660
2686
  message.success('当前已经切换RM白板')
2661
2687
  }
2662
-
2688
+
2663
2689
 
2664
2690
  }
2665
2691
  switchSelect = (value) => {
2666
2692
  this.setState({
2667
- isSelect: value,
2668
- })
2693
+ isSelect: value,
2694
+ })
2669
2695
  }
2670
- facialHandleVisibleChange=(value)=>{
2671
- if(!value) {
2696
+ facialHandleVisibleChange = (value) => {
2697
+ if (!value) {
2672
2698
  this.setState({
2673
2699
  clickedFacial: false
2674
2700
  })
2675
2701
  }
2676
2702
  }
2677
- ocrHandleVisibleChange=(value)=>{
2678
- if(!value) {
2703
+ ocrHandleVisibleChange = (value) => {
2704
+ if (!value) {
2679
2705
  this.setState({
2680
2706
  clickedOcr: false
2681
2707
  })
2682
2708
  }
2683
2709
  }
2710
+ inspection = () => {
2711
+ this.test_controller.GetDevices()
2712
+ }
2713
+ handleOkInspection = () => {
2714
+ const config = {}
2715
+ config.sid = document.getElementById('publish_video1').name
2716
+ config.videoSource = this.state.cameraValue
2717
+ config.audioSource = this.state.microphoneValue
2718
+ this.test_controller.ChangeProfile(config)
2719
+ }
2720
+ handleCancelInspection = () => {
2721
+ this.setState({
2722
+ isModalVisibleInspection: false
2723
+ })
2724
+ }
2725
+ getCameraValue = (event) => {
2726
+ console.log(event.target.value);
2727
+ this.setState({
2728
+ cameraValue: event.target.value
2729
+ })
2730
+ }
2731
+ getMicrophoneValue = (event) => {
2732
+ console.log(event.target.value);
2733
+ this.setState({
2734
+ microphoneValue: event.target.value
2735
+ })
2736
+ }
2684
2737
  render() {
2685
- const {meetingInfo} = this.props
2738
+ const { meetingInfo } = this.props
2686
2739
  var pdfChildren
2687
2740
  if (this.props.children) {
2688
2741
  pdfChildren = React.cloneElement(this.props.children, { width: 100, height: 100, id: 12 })
2689
2742
  }
2690
2743
  const customerNameList = (
2691
- <span>
2744
+ <span className='labelClass'>
2692
2745
  {
2693
- meetingInfo.customers.map((item,index)=>{
2746
+ meetingInfo.customers.map((item, index) => {
2694
2747
  return <label>
2695
2748
  {item}
2696
2749
  {
2697
- meetingInfo.customers.length > 0 && index != meetingInfo.customers.length-1 &&<span>,</span>
2750
+ meetingInfo.customers.length > 0 && index != meetingInfo.customers.length - 1 && <label>,</label>
2698
2751
  }
2699
-
2752
+
2700
2753
  </label>
2701
2754
  })
2702
2755
  }
@@ -2705,41 +2758,69 @@ componentDidMount() {
2705
2758
  const tabTitleList = (
2706
2759
  <div className="button">
2707
2760
  {
2708
- this.state.tabTitles.map((item)=>{
2709
- return <div className={`${this.state.isSelect == item.value ? 'selectSee' : "noSelest"}`} onClick={this.switchSelect.bind(this,item.value)}>
2761
+ this.state.tabTitles.map((item) => {
2762
+ return <div className={`${this.state.isSelect == item.value ? 'selectSee' : "noSelest"}`} onClick={this.switchSelect.bind(this, item.value)}>
2710
2763
  {item.name}
2711
2764
  </div>
2712
2765
  })
2713
2766
  }
2714
2767
  </div>
2715
2768
  )
2716
- const videoCustomer =
2717
- this.state.videoList.map((item,index)=>{
2718
- return <div className={`itemed`} style={{ display: (item.isVideo) ? '' : 'none', }}>
2719
- <video
2720
- id={'video' + item.videoIndex}
2721
- autoPlay
2722
- muted={true}
2723
- className="video"
2724
- />
2725
- <audio id={'audio' + item.videoIndex} autoPlay />
2726
- <label style={{ display: 'none' }} id={'feedId' + item.videoIndex} type="text" />
2727
- <div className={`customerTitle titleSamlle`}>
2728
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2729
- {this.state.videoTwoName}
2730
- </div>
2769
+ const videoCustomer =
2770
+ this.state.videoList.map((item, index) => {
2771
+ return <div className={`itemed`} style={{ display: (item.isVideo) ? '' : 'none', }}>
2772
+ <video
2773
+ id={'video' + item.videoIndex}
2774
+ autoPlay
2775
+ muted={true}
2776
+ className="video"
2777
+ />
2778
+ <audio id={'audio' + item.videoIndex} autoPlay />
2779
+ <label style={{ display: 'none' }} id={'feedId' + item.videoIndex} type="text" />
2780
+ <div className={`customerTitle titleSamlle`}>
2781
+ <div className='titleName' style={{ background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
2782
+ {this.state.videoTwoName}
2731
2783
  </div>
2732
- <canvas className="canvasClassOne" id={'subscribe_volumeView' + item.videoIndex} width="40" height="70"></canvas>
2784
+ </div>
2785
+ <canvas className="canvasClassOne" id={'subscribe_volumeView' + item.videoIndex} width="40" height="70"></canvas>
2733
2786
  </div>
2787
+ })
2788
+ const camera = (
2789
+ <div class="cameraAnMicrophone">
2790
+ {
2791
+ this.state.cameraList.map((item, index) => {
2792
+ return <div>
2793
+ <input type="radio" name="camere" value={item.actionid} checked={this.state.cameraValue == item.actionid} onChange={(e) => this.getCameraValue(e)} />{item.actionname}
2794
+ </div>
2734
2795
  })
2735
-
2796
+ }
2797
+ </div>
2798
+ )
2799
+
2800
+ const microphone = (
2801
+ <div>
2802
+ {
2803
+ this.state.microphoneList.map((item, index) => {
2804
+ return <div class="cameraAnMicrophone">
2805
+ <input type="radio" name="microphone" value={item.actionid} checked={this.state.microphoneValue == item.actionid} onChange={(e) => this.getMicrophoneValue(e)} />{item.actionname}
2806
+ </div>
2807
+ })
2808
+ }
2809
+ </div>
2810
+ )
2811
+ const sectionStyle = {
2812
+ backgroundImage: `url(${Background})`,
2813
+ 'background-repeat': 'no-repeat',
2814
+ 'background-size': '100% 100%'
2815
+ };
2736
2816
  return (
2737
2817
  <div className="all">
2738
2818
  <Spin spinning={this.state.loading} tip="视频初始化中...">
2739
2819
  <Header></Header>
2820
+ <div className="health">
2740
2821
  {tabTitleList}
2741
- <div className="health" style={{'margin-top': (this.state.tabTitles.length > 0) ? '0px' : '20px' }}>
2742
- <div className="projection">
2822
+ <div className="healthVideo">
2823
+ <div className="projection" style={sectionStyle}>
2743
2824
  <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
2744
2825
  <div className="videoDiv">
2745
2826
  <video
@@ -2774,33 +2855,33 @@ componentDidMount() {
2774
2855
  {
2775
2856
  this.state.tabTitles.length == 0 &&
2776
2857
  <div className='themeClass'>
2777
- <div>
2778
- <ul>
2779
- <li>
2780
- <span>会议主题:</span>
2781
- <label>{meetingInfo.title}</label>
2782
- </li>
2783
- <li>
2784
- <span>主持人:</span>
2785
- <label>{meetingInfo.host}</label>
2786
- </li>
2787
- <li>
2788
- <span>参会客户:</span>
2789
- {customerNameList}
2790
- </li>
2791
- </ul>
2858
+ <div>
2859
+ <ul>
2860
+ <li>
2861
+ <span>会议主题:</span>
2862
+ <label className='labelClass'>{meetingInfo.title}</label>
2863
+ </li>
2864
+ <li>
2865
+ <span>主持人:</span>
2866
+ <label className='labelClass'>{meetingInfo.host}</label>
2867
+ </li>
2868
+ <li>
2869
+ <span>参会客户:</span>
2870
+ {customerNameList}
2871
+ </li>
2872
+ </ul>
2873
+ </div>
2792
2874
  </div>
2793
- </div>
2794
2875
  }
2795
-
2876
+
2796
2877
 
2797
2878
  </div>
2798
- <div className="wrapper" style={{ width: '20%' , }}>
2879
+ <div className="wrapper" style={{ width: '20%', }}>
2799
2880
  <div
2800
2881
  className={`itemed ${this.state.publishDevic == 4 ? '' : 'isBack'} `}
2801
2882
  >
2802
2883
  <div className="publishVideoDiv">
2803
-
2884
+
2804
2885
  <video
2805
2886
  id="publish_video1"
2806
2887
  className={`publishVideoClass`}
@@ -2810,6 +2891,8 @@ componentDidMount() {
2810
2891
  playsinline={true}
2811
2892
  />
2812
2893
  <label style={{ display: 'none' }} id="publish_streamId1" type="text" />
2894
+
2895
+ <div id="publish_video_div" className={`tellerTitle titleSamlle`}>
2813
2896
  {
2814
2897
  this.state.voiceStatue && <img
2815
2898
  alt=""
@@ -2817,10 +2900,9 @@ componentDidMount() {
2817
2900
  className="imgClassVoice voiceClass"
2818
2901
  />
2819
2902
  }
2820
- <div id="publish_video_div" className={`tellerTitle titleSamlle`}>
2821
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>坐席</div>
2822
- </div>
2823
2903
  <canvas style={{ display: (!this.state.voiceStatue) ? '' : 'none', }} className="canvasClass" id="publish_volumeView" width="40" height="70"></canvas>
2904
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>坐席</div>
2905
+ </div>
2824
2906
  </div>
2825
2907
 
2826
2908
  </div>
@@ -2829,13 +2911,13 @@ componentDidMount() {
2829
2911
  } */}
2830
2912
  <div
2831
2913
  className={`itemed`}
2832
- style={{ position: "relative",display: (this.state.videoOneName) ? '' : 'none'}}
2914
+ style={{ position: "relative", display: (this.state.videoOneName) ? '' : 'none' }}
2833
2915
  >
2834
2916
  {
2835
2917
  this.state.customAudioed && <img
2836
2918
  alt=""
2837
2919
  src={require("../../assets/img/yingpin.png").default}
2838
- style={{ width: "100%", height: "100%",}}
2920
+ style={{ width: "100%", height: "100%", }}
2839
2921
  ></img>
2840
2922
  }
2841
2923
  <div className="video1Div">
@@ -2847,6 +2929,8 @@ componentDidMount() {
2847
2929
  />
2848
2930
  <audio id="audio1" autoPlay />
2849
2931
  <label style={{ display: 'none' }} id="feedId1" type="text" />
2932
+
2933
+ <div style={{ display: (this.state.videoOneName) ? '' : 'none' }} className={`customerTitle titleSamlle`}>
2850
2934
  {
2851
2935
  this.state.voiceVideoOne && <img
2852
2936
  alt=""
@@ -2854,41 +2938,43 @@ componentDidMount() {
2854
2938
  className="imgClassVoice voiceVideoClass"
2855
2939
  />
2856
2940
  }
2857
- <div style={{ display: (this.state.videoOneName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
2858
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2941
+ <canvas style={{ display: (this.state.videoOneName && !this.state.voiceVideoOne) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView1" width="40" height="70"></canvas>
2942
+
2943
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
2859
2944
  {this.state.videoOneName}
2860
2945
  </div>
2861
2946
 
2862
-
2947
+
2863
2948
  </div>
2864
- <canvas style={{ display: (this.state.videoOneName&&!this.state.voiceVideoOne) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView1" width="40" height="70"></canvas>
2865
2949
  </div>
2866
2950
  </div>
2867
2951
  <div className={`itemed`} style={{ display: (this.state.videoTwoName) ? '' : 'none', }}>
2868
- <video
2869
- id="video2"
2870
- autoPlay
2871
- muted={true}
2872
- className="video"
2952
+ <video
2953
+ id="video2"
2954
+ autoPlay
2955
+ muted={true}
2956
+ className="video"
2957
+ />
2958
+ <audio id="audio2" autoPlay />
2959
+ <label style={{ display: 'none' }} id="feedId2" type="text" />
2960
+
2961
+ <div style={{ display: (this.state.videoTwoName) ? '' : 'none' }} className={`customerTitle titleSamlle`}>
2962
+ {
2963
+ this.state.voiceVideoTwo && <img
2964
+ alt=""
2965
+ src={require("../../assets/img/jingyin.png").default}
2966
+ className="imgClassVoice voiceVideoClass"
2873
2967
  />
2874
- <audio id="audio2" autoPlay />
2875
- <label style={{ display: 'none' }} id="feedId2" type="text" />
2876
- {
2877
- this.state.voiceVideoTwo && <img
2878
- alt=""
2879
- src={require("../../assets/img/jingyin.png").default}
2880
- className="imgClassVoice voiceVideoClass"
2881
- />
2882
- }
2883
- <div style={{ display: (this.state.videoTwoName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
2884
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2885
- {this.state.videoTwoName}
2886
- </div>
2968
+ }
2969
+ <canvas style={{ display: (this.state.videoTwoName && !this.state.voiceVideoTwo) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView2" width="40" height="70"></canvas>
2970
+
2971
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
2972
+ {this.state.videoTwoName}
2887
2973
  </div>
2888
- <canvas style={{ display: (this.state.videoTwoName&&!this.state.voiceVideoTwo) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView2" width="40" height="70"></canvas>
2974
+ </div>
2889
2975
  </div>
2890
2976
  <div className={`itemed`}
2891
- style={{display: (this.state.videoThreeName) ? '' : 'none' }}>
2977
+ style={{ display: (this.state.videoThreeName) ? '' : 'none' }}>
2892
2978
  <video
2893
2979
  id="video3"
2894
2980
  autoPlay
@@ -2897,19 +2983,21 @@ componentDidMount() {
2897
2983
  />
2898
2984
  <audio id="audio3" autoPlay />
2899
2985
  <label style={{ display: 'none' }} id="feedId3" type="text" />
2986
+
2987
+ <div style={{ display: (this.state.videoThreeName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2900
2988
  {
2901
- this.state.voiceVideoThree && <img
2902
- alt=""
2903
- src={require("../../assets/img/jingyin.png").default}
2904
- className="imgClassVoice voiceVideoClass"
2905
- />
2906
- }
2907
- <div style={{ display: (this.state.videoThreeName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2908
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2989
+ this.state.voiceVideoThree && <img
2990
+ alt=""
2991
+ src={require("../../assets/img/jingyin.png").default}
2992
+ className="imgClassVoice voiceVideoClass"
2993
+ />
2994
+ }
2995
+ <canvas style={{ display: (this.state.videoThreeName && !this.state.voiceVideoThree) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView3" width="40" height="70"></canvas>
2996
+
2997
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
2909
2998
  {this.state.videoThreeName}
2910
2999
  </div>
2911
3000
  </div>
2912
- <canvas style={{ display: (this.state.videoThreeName&&!this.state.voiceVideoThree) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView3" width="40" height="70"></canvas>
2913
3001
  </div>
2914
3002
  <div className={`itemed`} style={{ display: (this.state.videoFourName) ? '' : 'none', }}>
2915
3003
  <video
@@ -2920,22 +3008,24 @@ componentDidMount() {
2920
3008
  />
2921
3009
  <audio id="audio4" autoPlay />
2922
3010
  <label style={{ display: 'none' }} id="feedId4" type="text" />
3011
+
3012
+ <div style={{ display: (this.state.videoFourName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2923
3013
  {
2924
- this.state.voiceVideoFour && <img
2925
- alt=""
2926
- src={require("../../assets/img/jingyin.png").default}
2927
- className="imgClassVoice voiceVideoClass"
2928
- />
2929
- }
2930
- <div style={{ display: (this.state.videoFourName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2931
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3014
+ this.state.voiceVideoFour && <img
3015
+ alt=""
3016
+ src={require("../../assets/img/jingyin.png").default}
3017
+ className="imgClassVoice voiceVideoClass"
3018
+ />
3019
+ }
3020
+ <canvas style={{ display: (this.state.videoFourName && !this.state.voiceVideoFour) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView4" width="40" height="70"></canvas>
3021
+
3022
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
2932
3023
  {this.state.videoFourName}
2933
3024
  </div>
2934
3025
  </div>
2935
- <canvas style={{ display: (this.state.videoFourName&&!this.state.voiceVideoFour) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView4" width="40" height="70"></canvas>
2936
3026
  </div>
2937
3027
  <div className={`itemed`}
2938
- style={{display: (this.state.videoFiveName) ? '' : 'none' }}>
3028
+ style={{ display: (this.state.videoFiveName) ? '' : 'none' }}>
2939
3029
  <video
2940
3030
  id="video5"
2941
3031
  autoPlay
@@ -2944,53 +3034,57 @@ componentDidMount() {
2944
3034
  />
2945
3035
  <audio id="audio5" autoPlay />
2946
3036
  <label style={{ display: 'none' }} id="feedId5" type="text" />
3037
+
3038
+ <div style={{ display: (this.state.videoFiveName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2947
3039
  {
2948
- this.state.voiceVideoFive && <img
2949
- alt=""
2950
- src={require("../../assets/img/jingyin.png").default}
2951
- className="imgClassVoice voiceVideoClass"
2952
- />
2953
- }
2954
- <div style={{ display: (this.state.videoFiveName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2955
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3040
+ this.state.voiceVideoFive && <img
3041
+ alt=""
3042
+ src={require("../../assets/img/jingyin.png").default}
3043
+ className="imgClassVoice voiceVideoClass"
3044
+ />
3045
+ }
3046
+ <canvas style={{ display: (this.state.videoFiveName && !this.state.voiceVideoFive) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView5" width="40" height="70"></canvas>
3047
+
3048
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
2956
3049
  {this.state.videoFiveName}
2957
- </div>
3050
+ </div>
2958
3051
  </div>
2959
- <canvas style={{ display: (this.state.videoFiveName&&!this.state.voiceVideoFive) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView5" width="40" height="70"></canvas>
2960
3052
  </div>
2961
3053
  <div className={`itemed`} style={{ display: (this.state.videoSixName) ? '' : 'none', }}>
2962
3054
  <video
2963
3055
  id="video6"
2964
3056
  autoPlay
2965
- muted={true}
3057
+ muted={true}
2966
3058
  className="video"
2967
3059
  />
2968
3060
  <audio id="audio6" autoPlay />
2969
3061
  <label style={{ display: 'none' }} id="feedId6" type="text" />
3062
+
3063
+ <div style={{ display: (this.state.videoSixName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2970
3064
  {
2971
- this.state.voiceVideoSix && <img
2972
- alt=""
2973
- src={require("../../assets/img/jingyin.png").default}
2974
- className="imgClassVoice voiceVideoClass"
2975
- />
2976
- }
2977
- <div style={{ display: (this.state.videoSixName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
2978
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3065
+ this.state.voiceVideoSix && <img
3066
+ alt=""
3067
+ src={require("../../assets/img/jingyin.png").default}
3068
+ className="imgClassVoice voiceVideoClass"
3069
+ />
3070
+ }
3071
+ <canvas style={{ display: (!this.state.voiceVideoSix) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView6" width="40" height="70"></canvas>
3072
+
3073
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
2979
3074
  {this.state.videoSixName}
2980
3075
  </div>
2981
3076
  </div>
2982
- <canvas style={{ display: (!this.state.voiceVideoSix) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView6" width="40" height="70"></canvas>
2983
3077
 
2984
3078
  </div>
2985
3079
  <div
2986
3080
  className={`itemed`}
2987
- style={{ position: "relative",display: (this.state.videoSevenName) ? '' : 'none'}}
3081
+ style={{ position: "relative", display: (this.state.videoSevenName) ? '' : 'none' }}
2988
3082
  >
2989
3083
  {
2990
3084
  this.state.customAudioed && <img
2991
3085
  alt=""
2992
3086
  src={require("../../assets/img/yingpin.png").default}
2993
- style={{ width: "100%", height: "100%",}}
3087
+ style={{ width: "100%", height: "100%", }}
2994
3088
  ></img>
2995
3089
  }
2996
3090
  <div className="video1Div" style={{ display: (!this.state.customAudioed) ? '' : 'none', }}>
@@ -3002,6 +3096,8 @@ componentDidMount() {
3002
3096
  />
3003
3097
  <audio id="audio7" autoPlay />
3004
3098
  <label style={{ display: 'none' }} id="feedId7" type="text" />
3099
+
3100
+ <div style={{ display: (this.state.videoSevenName) ? '' : 'none' }} className={`customerTitle titleSamlle`}>
3005
3101
  {
3006
3102
  this.state.voiceVideoSeven && <img
3007
3103
  alt=""
@@ -3009,65 +3105,69 @@ componentDidMount() {
3009
3105
  className="imgClassVoice voiceVideoClass"
3010
3106
  />
3011
3107
  }
3012
- <div style={{ display: (this.state.videoSevenName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
3013
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3108
+ <canvas style={{ display: (this.state.videoSevenName && !this.state.voiceVideoSeven) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView7" width="40" height="70"></canvas>
3109
+
3110
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
3014
3111
  {this.state.videoSevenName}
3015
3112
  </div>
3016
3113
 
3017
-
3114
+
3018
3115
  </div>
3019
- <canvas style={{ display: (this.state.videoSevenName&&!this.state.voiceVideoSeven) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView7" width="40" height="70"></canvas>
3020
3116
  </div>
3021
3117
  </div>
3022
3118
  <div className={`itemed`} style={{ display: (this.state.videoEightName) ? '' : 'none', }}>
3023
- <video
3024
- id="video8"
3025
- autoPlay
3026
- muted={true}
3027
- className="video"
3119
+ <video
3120
+ id="video8"
3121
+ autoPlay
3122
+ muted={true}
3123
+ className="video"
3124
+ />
3125
+ <audio id="audio8" autoPlay />
3126
+ <label style={{ display: 'none' }} id="feedId8" type="text" />
3127
+
3128
+ <div style={{ display: (this.state.videoEightName) ? '' : 'none' }} className={`customerTitle titleSamlle`}>
3129
+ {
3130
+ this.state.voiceVideoEight && <img
3131
+ alt=""
3132
+ src={require("../../assets/img/jingyin.png").default}
3133
+ className="imgClassVoice voiceVideoClass"
3028
3134
  />
3029
- <audio id="audio8" autoPlay />
3030
- <label style={{ display: 'none' }} id="feedId8" type="text" />
3031
- {
3032
- this.state.voiceVideoEight && <img
3033
- alt=""
3034
- src={require("../../assets/img/jingyin.png").default}
3035
- className="imgClassVoice voiceVideoClass"
3036
- />
3037
- }
3038
- <div style={{ display: (this.state.videoEightName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
3039
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3040
- {this.state.videoEightName}
3041
- </div>
3135
+ }
3136
+ <canvas style={{ display: (this.state.videoEightName && !this.state.voiceVideoEight) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView8" width="40" height="70"></canvas>
3137
+
3138
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
3139
+ {this.state.videoEightName}
3042
3140
  </div>
3043
- <canvas style={{ display: (this.state.videoEightName&&!this.state.voiceVideoEight) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView8" width="40" height="70"></canvas>
3141
+ </div>
3044
3142
  </div>
3045
3143
  <div className={`itemed`} style={{ display: (this.state.videoNineName) ? '' : 'none', }}>
3046
3144
  <video
3047
3145
  id="video9"
3048
3146
  autoPlay
3049
- muted={true}
3147
+ muted={true}
3050
3148
  className="video"
3051
3149
  />
3052
3150
  <audio id="audio9" autoPlay />
3053
3151
  <label style={{ display: 'none' }} id="feedId9" type="text" />
3152
+
3153
+ <div style={{ display: (this.state.videoNineName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3054
3154
  {
3055
- this.state.voiceVideoNine && <img
3056
- alt=""
3057
- src={require("../../assets/img/jingyin.png").default}
3058
- className="imgClassVoice voiceVideoClass"
3059
- />
3060
- }
3061
- <div style={{ display: (this.state.videoNineName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3062
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3155
+ this.state.voiceVideoNine && <img
3156
+ alt=""
3157
+ src={require("../../assets/img/jingyin.png").default}
3158
+ className="imgClassVoice voiceVideoClass"
3159
+ />
3160
+ }
3161
+ <canvas style={{ display: (this.state.videoNineName && !this.state.voiceVideoSix) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView9" width="40" height="70"></canvas>
3162
+
3163
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
3063
3164
  {this.state.videoNineName}
3064
3165
  </div>
3065
3166
  </div>
3066
- <canvas style={{ display: (this.state.videoNineName && !this.state.voiceVideoSix) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView9" width="40" height="70"></canvas>
3067
3167
 
3068
3168
  </div>
3069
3169
  <div className={`itemed`}
3070
- style={{display: (this.state.videoTenName) ? '' : 'none' }}>
3170
+ style={{ display: (this.state.videoTenName) ? '' : 'none' }}>
3071
3171
  <video
3072
3172
  id="video10"
3073
3173
  autoPlay
@@ -3076,19 +3176,21 @@ componentDidMount() {
3076
3176
  />
3077
3177
  <audio id="audio10" autoPlay />
3078
3178
  <label style={{ display: 'none' }} id="feedId10" type="text" />
3179
+
3180
+ <div style={{ display: (this.state.videoTenName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3079
3181
  {
3080
- this.state.voiceVideoTen && <img
3081
- alt=""
3082
- src={require("../../assets/img/jingyin.png").default}
3083
- className="imgClassVoice voiceVideoClass"
3084
- />
3085
- }
3086
- <div style={{ display: (this.state.videoTenName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3087
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3182
+ this.state.voiceVideoTen && <img
3183
+ alt=""
3184
+ src={require("../../assets/img/jingyin.png").default}
3185
+ className="imgClassVoice voiceVideoClass"
3186
+ />
3187
+ }
3188
+ <canvas style={{ display: (this.state.videoTenName && !this.state.voiceVideoTen) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView10" width="40" height="70"></canvas>
3189
+
3190
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
3088
3191
  {this.state.videoTenName}
3089
3192
  </div>
3090
3193
  </div>
3091
- <canvas style={{ display: (this.state.videoTenName&&!this.state.voiceVideoTen) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView10" width="40" height="70"></canvas>
3092
3194
  </div>
3093
3195
  <div className={`itemed`} style={{ display: (this.state.videoElevenName) ? '' : 'none', }}>
3094
3196
  <video
@@ -3099,22 +3201,24 @@ componentDidMount() {
3099
3201
  />
3100
3202
  <audio id="audio11" autoPlay />
3101
3203
  <label style={{ display: 'none' }} id="feedId11" type="text" />
3204
+
3205
+ <div style={{ display: (this.state.videoElevenName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3102
3206
  {
3103
- this.state.voiceVideoEleven && <img
3104
- alt=""
3105
- src={require("../../assets/img/jingyin.png").default}
3106
- className="imgClassVoice voiceVideoClass"
3107
- />
3108
- }
3109
- <div style={{ display: (this.state.videoElevenName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3110
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3207
+ this.state.voiceVideoEleven && <img
3208
+ alt=""
3209
+ src={require("../../assets/img/jingyin.png").default}
3210
+ className="imgClassVoice voiceVideoClass"
3211
+ />
3212
+ }
3213
+ <canvas style={{ display: (this.state.videoElevenName && !this.state.voiceVideoEleven) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView11" width="40" height="70"></canvas>
3214
+
3215
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
3111
3216
  {this.state.videoElevenName}
3112
3217
  </div>
3113
3218
  </div>
3114
- <canvas style={{ display: (this.state.videoElevenName&&!this.state.voiceVideoEleven) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView11" width="40" height="70"></canvas>
3115
3219
  </div>
3116
3220
  <div className={`itemed`}
3117
- style={{display: (this.state.videoTwelveName) ? '' : 'none' }}>
3221
+ style={{ display: (this.state.videoTwelveName) ? '' : 'none' }}>
3118
3222
  <video
3119
3223
  id="video12"
3120
3224
  autoPlay
@@ -3123,24 +3227,27 @@ componentDidMount() {
3123
3227
  />
3124
3228
  <audio id="audio12" autoPlay />
3125
3229
  <label style={{ display: 'none' }} id="feedId12" type="text" />
3230
+
3231
+ <div style={{ display: (this.state.videoTwelveName) ? '' : 'none', background: this.props.titleBackground, color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3126
3232
  {
3127
- this.state.voiceVideoTwelve && <img
3128
- alt=""
3129
- src={require("../../assets/img/jingyin.png").default}
3130
- className="imgClassVoice voiceVideoClass"
3131
- />
3132
- }
3133
- <div style={{ display: (this.state.videoTwelveName) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily }} className={`customerTitle titleSamlle`}>
3134
- <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
3233
+ this.state.voiceVideoTwelve && <img
3234
+ alt=""
3235
+ src={require("../../assets/img/jingyin.png").default}
3236
+ className="imgClassVoice voiceVideoClass"
3237
+ />
3238
+ }
3239
+ <canvas style={{ display: (this.state.videoTwelveName && !this.state.voiceVideoTwelve) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView12" width="40" height="70"></canvas>
3240
+
3241
+ <div className='titleName' style={{ color: this.props.titleColor, 'font-size': this.props.fontSize + 'px', 'font-family': this.props.fontFamily }}>
3135
3242
  {this.state.videoTwelveName}
3136
- </div>
3243
+ </div>
3137
3244
  </div>
3138
- <canvas style={{ display: (this.state.videoTwelveName&&!this.state.voiceVideoTwelve) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView12" width="40" height="70"></canvas>
3139
3245
  </div>
3140
-
3141
-
3246
+
3247
+
3142
3248
  </div>
3143
- <img id="icon_huatong" style={{display:'none'}} src={require("../../assets/img/icon_huatong.png").default}></img>
3249
+ <img id="icon_huatong" style={{ display: 'none' }} src={require("../../assets/img/icon_huatong.png").default}></img>
3250
+ </div>
3144
3251
  </div>
3145
3252
  <Foot
3146
3253
  img={this.state.voiceImg}
@@ -3165,6 +3272,7 @@ componentDidMount() {
3165
3272
  customerFaceClick={this.customerFaceClick}
3166
3273
  ocrClick={this.ocrClick}
3167
3274
  switchExternal={this.switchExternal}
3275
+ inspection={this.inspection}
3168
3276
  ></Foot>
3169
3277
  <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
3170
3278
  onCancel={this.handleCancel}>
@@ -3175,9 +3283,11 @@ componentDidMount() {
3175
3283
  !this.state.isSuspend && <span>确定是否暂停会话?</span>
3176
3284
  }
3177
3285
  </Modal>
3178
- <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisibleEnd} onOk={this.handleOkEnd}
3179
- onCancel={this.handleCancelEnd}>
3180
- <span>确定是否结束会话?</span>
3286
+ <Modal closable={false} centered={true} visible={this.state.isModalVisibleEnd} footer={[
3287
+ <Button className="modelButtonCancel" onClick={this.handleCancelEnd}>取消</Button>,
3288
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkEnd}>确定</Button>
3289
+ ]}>
3290
+ <div className='endModal'>确定是否结束会话?</div>
3181
3291
  </Modal>
3182
3292
  <Modal title={this.state.titleModal} cancelText="取消" okText="确定" visible={this.state.isModalVisibleFacial}
3183
3293
  onOk={this.handleOkFacial} onCancel={this.handleCancelFacial}>
@@ -3186,18 +3296,17 @@ componentDidMount() {
3186
3296
  </div>
3187
3297
 
3188
3298
  </Modal>
3189
- <Modal title="新增预约" visible={this.state.isModalVisibleInvitation} footer={[
3190
- <Button type="primary" danger onClick={this.handleOkInvitation}>发送</Button>,
3191
- <Button onClick={this.handleCancelInvitation}>取消</Button>
3299
+ <Modal className="modelClass" title="新增预约" closable={false} centered={true} visible={this.state.isModalVisibleInvitation} footer={[
3300
+ <Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>,
3301
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkInvitation}>确定</Button>
3192
3302
  ]}>
3193
3303
  <div>
3194
- <div>输入员工号:</div>
3195
3304
  <div className="invitationDiv">
3196
- <input className="inputClick" placeholder="请输入员工号" value={this.state.employeeNumber} onChange={e => this.handleChange(e)}></input>
3305
+ <span class="modalSpan">员工号:</span><input className="inputClick" placeholder="请输入员工号" value={this.state.employeeNumber} onChange={e => this.handleChange(e)}></input>
3197
3306
  <span className="invitationSpan" onClick={this.queryStaff}>查 询</span>
3198
3307
  </div>
3199
3308
  <div className="invitationDiv">
3200
- <input className="inputClick" readonly value={this.state.employeeName}></input>
3309
+ <span class="modalSpan">&nbsp;&nbsp;&nbsp;姓名:</span><span>{this.state.employeeName}</span>
3201
3310
  </div>
3202
3311
  </div>
3203
3312
  </Modal>
@@ -3218,6 +3327,17 @@ componentDidMount() {
3218
3327
  ></CanvasDraw>
3219
3328
  </div>
3220
3329
  </Modal>
3330
+ <Modal title="设备检测" closable={false} centered={true} visible={this.state.isModalVisibleInspection} footer={[
3331
+ <Button className="modelButtonCancel" onClick={this.handleCancelInspection}>取消</Button>,
3332
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkInspection}>确定</Button>
3333
+ ]}>
3334
+ <div class="inspection">
3335
+ <div>摄像头设备:</div>
3336
+ {camera}
3337
+ <div>麦克风设备:</div>
3338
+ {microphone}
3339
+ </div>
3340
+ </Modal>
3221
3341
  <video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"
3222
3342
  webkit-playsinline="true" playsInline={true} x5-playsinline="x5-playsinline"
3223
3343
  x-webkit-airplay="true"></video>
@@ -3242,7 +3362,7 @@ Video.defaultProps = {
3242
3362
  meetingInfo: {
3243
3363
  title: '测试',
3244
3364
  host: 'wmz',
3245
- customers: ['王三','张思']
3365
+ customers: ['王三', '张思']
3246
3366
  }
3247
3367
  }
3248
3368
  export default Video