react_hsbc_teller 0.3.5 → 0.3.9

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.
@@ -21,6 +21,7 @@ import 'antd/lib/spin/style'
21
21
  import { Button } from '../../../node_modules/antd/lib/index';
22
22
  import CanvasDraw from "react-canvas-draw";
23
23
  import { FormattedMessage, injectIntl } from 'react-intl';
24
+ import html2canvas from 'html2canvas';
24
25
  const LEAVE_TYPE = {
25
26
  TELLER_EXIT: '1', // 坐席退出
26
27
  ROOM_DESTROYED: '-1', // 房间异常
@@ -31,8 +32,7 @@ class Video extends Component {
31
32
  signCanvas = React.createRef();
32
33
  state = {
33
34
  isWhiteboard: false,
34
- isSelect: 'video',
35
- isPDF: false,
35
+ isSelect: '',
36
36
  loading: false,
37
37
  isModalVisibleSign: false,
38
38
  titleModal: '人脸识别',
@@ -70,7 +70,15 @@ class Video extends Component {
70
70
  imRoomId: this.props.imRoomId,
71
71
  isPictureInPicture: false,
72
72
  clickedFacial: false,
73
- clickedOcr: false
73
+ clickedOcr: false,
74
+ videoOneName: '',
75
+ videoTwoName: '',
76
+ videoThreeName: '',
77
+ videoFourName: '',
78
+ videoFiveName: '',
79
+ videoSixName: '',
80
+ tabTitles: [
81
+ ]
74
82
  };
75
83
  // eslint-disable-next-line no-undef
76
84
  test_controller = '';
@@ -145,8 +153,8 @@ class Video extends Component {
145
153
  config_param.workspaceId = this.state.workSpaceId;
146
154
  config_param.uid = this.props.tellerAccount;
147
155
  config_param.biz_name = this.state.bizName; // 'demo'
148
- config_param.appId = this.state.appId;
149
-
156
+ config_param.sub_biz = this.state.appId;
157
+ config_param.sign = window.sessionStorage.getItem('alimpassSig')
150
158
  config_param.room_server_url = this.props.roomServerUrl;
151
159
  // 允许最大断网时间 (超过未重连, 直接关闭)
152
160
  config_param.network_check_timeout = 10000;
@@ -155,14 +163,11 @@ class Video extends Component {
155
163
  // 初始化视频
156
164
  ConnectMRTC = () => {
157
165
  const config_param = {};
158
- config_param.auto_publish_subscribe = 3;
166
+ config_param.auto_publish_subscribe = 2;
159
167
  config_param.media_type = 1;
160
168
  config_param.publish_device = 1;
161
- config_param.video_profile_type = '5';
169
+ config_param.video_profile_type = '3';
162
170
  config_param.need_volume_analyser = true;
163
- // config_param.audioSource = that.microphone[0].actionid
164
- // config_param.videoSource = that.checkOne[0]
165
- // config_param.transport_ = 'relay'
166
171
  config_param.initPublish = [
167
172
  {
168
173
  publish_video_id: 'publish_video1',
@@ -334,7 +339,7 @@ class Video extends Component {
334
339
  list.push({
335
340
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
336
341
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
337
- name: '客户1',
342
+ name: this.state.videoOneName,
338
343
  })
339
344
  }
340
345
  if (document.getElementById('video2').name) {
@@ -343,7 +348,7 @@ class Video extends Component {
343
348
  list.push({
344
349
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
345
350
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
346
- name: '客户2'
351
+ name: this.state.videoTwoName
347
352
  })
348
353
  }
349
354
  if (document.getElementById('video3').name) {
@@ -352,7 +357,7 @@ class Video extends Component {
352
357
  list.push({
353
358
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
354
359
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
355
- name: '客户3'
360
+ name: this.state.videoThreeName
356
361
  })
357
362
  }
358
363
  if (document.getElementById('video4').name) {
@@ -361,7 +366,7 @@ class Video extends Component {
361
366
  list.push({
362
367
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
363
368
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
364
- name: '客户4'
369
+ name: this.state.videoFourName
365
370
  })
366
371
  }
367
372
  if (document.getElementById('video5').name) {
@@ -370,7 +375,7 @@ class Video extends Component {
370
375
  list.push({
371
376
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
372
377
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
373
- name: '客户5'
378
+ name: this.state.videoFiveName
374
379
  })
375
380
  }
376
381
  if (document.getElementById('video6').name) {
@@ -379,7 +384,7 @@ class Video extends Component {
379
384
  list.push({
380
385
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
381
386
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
382
- name: '客户6'
387
+ name: this.state.videoSixName
383
388
  })
384
389
  }
385
390
  if(list.length > 0) {
@@ -428,7 +433,7 @@ class Video extends Component {
428
433
  this.setState({ isBigVideo: 'video1' })
429
434
  }
430
435
  } else if (val == 'isLangPublishVideo1') {
431
- if (document.getElementById('publish_video1').name) {
436
+ if (document.getElementById('publish_video1').name && this.state.isCustomer) {
432
437
  this.setState({ isBigVideo: 'publish_video1' })
433
438
  }
434
439
  } else if (val == 'isLangVideo2') {
@@ -462,52 +467,164 @@ class Video extends Component {
462
467
  } else {
463
468
  const list = []
464
469
  if(document.getElementById('video1').name) {
465
- list.push('video1')
470
+ list.push({
471
+ name: 'video1',
472
+ title: this.state.videoOneName
473
+ })
466
474
  }
467
475
  if(document.getElementById('publish_video1').name) {
468
- list.push('publish_video1')
476
+ list.push({
477
+ name: 'publish_video1',
478
+ title: '坐席'
479
+ })
469
480
  }
470
481
  if(document.getElementById('video2').name) {
471
- list.push('video2')
482
+ list.push({
483
+ name: 'video2',
484
+ title: this.state.videoTwoName
485
+ })
472
486
  }
473
487
  if(document.getElementById('video3').name) {
474
- list.push('video3')
488
+ list.push({
489
+ name: 'video3',
490
+ title: this.state.videoThreeName
491
+ })
475
492
  }
476
493
  if(document.getElementById('video4').name) {
477
- list.push('video4')
494
+ list.push({
495
+ name: 'video4',
496
+ title: this.state.videoFourName
497
+ })
478
498
  }
479
499
  if(document.getElementById('video5').name) {
480
- list.push('video5')
500
+ list.push({
501
+ name: 'video5',
502
+ title: this.state.videoFiveName
503
+ })
481
504
  }
482
505
  if(document.getElementById('video6').name) {
483
- list.push('video6')
484
- }
485
- if(document.getElementById('video10').name) {
486
- list.push('video10')
506
+ list.push({
507
+ name: 'video6',
508
+ title: this.state.videoSixName
509
+ })
487
510
  }
511
+ // if(document.getElementById('video10').name) {
512
+ // list.push({
513
+ // name: 'video10',
514
+ // title: '互动白板'
515
+ // })
516
+ // }
488
517
  console.log(list)
489
- const width = 320 * list.length;
490
- const height = 480;
518
+ const width = 640;
519
+ const height = 360 * list.length;
491
520
  const canvas = document.createElement('canvas');
492
521
  const cobj = canvas.getContext('2d'); // 获取绘图环境
493
522
  canvas.width = width;
494
523
  canvas.height = height;
524
+
495
525
  interval = setInterval(() => {
496
526
  cobj.clearRect(0, 0, width, height);
497
527
  for(let i=0;i<list.length;i++){
498
-
499
- let videoId = list[i];
528
+
529
+ let videoId = list[i].name;
500
530
  let videoDiv = document.getElementById(videoId);
501
531
  let videoWidth = videoDiv.videoWidth;
502
532
  let videoHeight = videoDiv.videoHeight;
503
- let newVideoWidth = 320;
504
- let newVideoHeight = 480;
505
- if (videoHeight * 320 / videoWidth > 480) {
506
- newVideoWidth = videoWidth * 480 / videoHeight;
533
+ let newVideoWidth = 640;
534
+ let newVideoHeight = 360;
535
+ if (videoHeight * 640 / videoWidth > 360) {
536
+ newVideoWidth = videoWidth * 360 / videoHeight;
507
537
  } else {
508
- newVideoHeight = videoHeight * 320 / videoWidth;
538
+ newVideoHeight = videoHeight * 640 / videoWidth;
509
539
  }
510
- cobj.drawImage(videoDiv, 320 * i, (480 - newVideoHeight)/2, 320, newVideoHeight);
540
+
541
+ cobj.drawImage(videoDiv, (640 - newVideoWidth)/2, 360 * i, newVideoWidth, newVideoHeight);
542
+ cobj.beginPath();
543
+ cobj.strokeStyle = this.props.titleColor;
544
+ cobj.fillStyle = this.props.titleBackground;
545
+ cobj.fillRect(0, 360 * (i + 1) - 60, 300, 60 )
546
+ cobj.fill();
547
+ cobj.stroke();
548
+ cobj.beginPath();
549
+ cobj.font = "28px auto";
550
+ cobj.textAlign = 'center';
551
+ cobj.lineWidth = 1;
552
+ cobj.strokeText(list[i].title, 150, 360 * (i + 1) - 20);
553
+ cobj.stroke();
554
+ //左边框
555
+ cobj.beginPath();
556
+ cobj.moveTo( 0, 0);
557
+ cobj.lineTo( 0, 360 * list.length);
558
+ cobj.closePath(); //闭合路径
559
+ cobj.lineWidth = 5; //线的边框为10像素
560
+ cobj.strokeStyle = '#d9363e';
561
+ cobj.stroke(); //绘制定义的图形
562
+
563
+ //下边框
564
+ cobj.beginPath();
565
+ cobj.moveTo( 0, 0);
566
+ cobj.lineTo( 640, 0);
567
+ cobj.closePath(); //闭合路径
568
+ cobj.lineWidth = 5; //线的边框为10像素
569
+ cobj.strokeStyle = '#d9363e';
570
+ cobj.stroke(); //绘制定义的图形
571
+
572
+ //右边框
573
+ cobj.beginPath();
574
+ cobj.moveTo( 640, 360 * list.length);
575
+ cobj.lineTo( 640, 0);
576
+ cobj.closePath(); //闭合路径
577
+ cobj.lineWidth = 5; //线的边框为10像素
578
+ cobj.strokeStyle = '#d9363e';
579
+ cobj.stroke(); //绘制定义的图形
580
+
581
+
582
+ //上边框
583
+ cobj.beginPath();
584
+ cobj.moveTo( 0, 360 * list.length);
585
+ cobj.lineTo( 640, 360 * list.length);
586
+ cobj.closePath(); //闭合路径
587
+ cobj.lineWidth = 5; //线的边框为10像素
588
+ cobj.strokeStyle = '#d9363e';
589
+ cobj.stroke(); //绘制定义的图形
590
+
591
+ // let sid = document.getElementById(list[i].name).name
592
+ // let stream = this.test_controller.GetMediaInfo(sid).audio_
593
+ // let acc = new AudioContext()
594
+ // let mic = acc.createMediaStreamSource(stream)
595
+ // let analyser = acc.createAnalyser()
596
+ // analyser.fftSize = 256
597
+ // mic.connect(analyser)
598
+ // aou(analyser)
599
+ // let microphoneSize = this.props.microphoneSize
600
+ // var img = document.getElementById("icon_huatong");
601
+ // cobj.drawImage(img, 600, 360 * (i + 1) - 60, microphoneSize, microphoneSize);
602
+ // function aou(analyser){
603
+ // let dataArray = new Uint8Array(analyser.frequencyBinCount);
604
+ // analyser.getByteFrequencyData(dataArray);
605
+ // let step = Math.round(dataArray.length / 60); //采样步长
606
+ // // 以画布左上角为坐标原点
607
+ // let drawArea = {
608
+ // x1: 28/50 * microphoneSize + 600, // 波动范围右下角的点坐标
609
+ // y1: 25/50 * microphoneSize + 360 * (i + 1) - 60,
610
+ // x2: 22/50 * microphoneSize + 600, // 波动范围左上角的点坐标
611
+ // y2: 10/50 * microphoneSize + 360 * (i + 1) - 60,
612
+ // }
613
+
614
+ // for (var j = 0; j < 40; j++) {
615
+ // let energy = (dataArray[step * j] / 256.0) * 80;
616
+ // cobj.beginPath();
617
+ // cobj.fillStyle = "#0AE544";
618
+ // const { x1,y1,x2,y2} = drawArea
619
+ // let width = x1-x2;
620
+ // let height = (energy>20?(energy-20):0) * (y1 - y2 ) / 70
621
+ // let startX = x2 // 绘制起始点x
622
+ // let startY = y1 - height // 绘制起始点y
623
+ // cobj.fillRect(startX, startY, width, height )
624
+ // }
625
+ // requestAnimationFrame(aou.bind(this, analyser));
626
+
627
+ // }
511
628
  }
512
629
  }, 100);
513
630
  const captureStream = canvas.captureStream();
@@ -554,6 +671,30 @@ class Video extends Component {
554
671
  })
555
672
  }
556
673
  }
674
+ tabTitlesClick = (value,type) =>{
675
+ const { tabTitles } = this.state;
676
+ if(type == 'add') {
677
+ tabTitles.unshift(value)
678
+ }else {
679
+ this.state.tabTitles.map((item,index)=>{
680
+ if(item.value == value) {
681
+ tabTitles.splice(index, 1)
682
+ this.setState({
683
+ tabTitles
684
+ })
685
+ }
686
+ })
687
+ }
688
+ if(this.state.tabTitles.length >0) {
689
+ this.setState({
690
+ isSelect: this.state.tabTitles[0].value
691
+ })
692
+ } else {
693
+ this.setState({
694
+ isSelect: 0
695
+ })
696
+ }
697
+ }
557
698
  mountClick = () => {
558
699
  window.IMEvt = msg => {
559
700
  console.log(JSON.parse(msg));
@@ -589,6 +730,7 @@ class Video extends Component {
589
730
  if(Mival.type == 1) {
590
731
  this.switchExternal()
591
732
  } else if(Mival.type == 2) {
733
+ this.tabTitlesClick('RMWhiteboard','delect')
592
734
  if(this.state.isSharedScreen) {
593
735
  this.setState({
594
736
  isWhiteboard: false,
@@ -596,8 +738,6 @@ class Video extends Component {
596
738
  }else {
597
739
  this.test_controller.UnPublish(document.getElementById('video10').name)
598
740
  this.setState({
599
- isPDF: false,
600
- isSelect: 'video',
601
741
  isWhiteboard: false,
602
742
  })
603
743
  }
@@ -765,7 +905,7 @@ class Video extends Component {
765
905
  // 订阅媒体流成功
766
906
  this.test_controller.OnSubscribeSucc = (feed, sid) => {
767
907
  console.log('订阅媒体流成功', feed, sid);
768
- console.log(document.getElementById("feedId1").innerText)
908
+ this.appGetUsername(sid)
769
909
  };
770
910
  // 订阅媒体流失败
771
911
  this.test_controller.OnSubscribeFailed = (
@@ -782,6 +922,7 @@ class Video extends Component {
782
922
  // 推送“新加⼊房间者”给与会者
783
923
  this.test_controller.OnNewJoinerIn = (participant) => {
784
924
  console.log('新加⼊房间者', participant);
925
+ this.test_controller.ChangeStreamSize(document.getElementById('publish_video1').name, 5)
785
926
  this.setState(
786
927
  {
787
928
  isCustomer: true
@@ -795,12 +936,92 @@ class Video extends Component {
795
936
  let newArray = [...array];
796
937
  newArray.push({
797
938
  feedId: feed.feedId,
798
- uid: feed.uid
939
+ uid: feed.uid,
940
+ tag: feed.tag
799
941
  });
800
942
  console.log(array, newArray, this.state.roomCustomerList);
801
943
  this.setState({
802
944
  roomCustomerList: newArray
803
945
  })
946
+ let config_param
947
+ if(feed.uid != this.state.tellerAccount) {
948
+ if(feed.tag == 'VIDEO_SOURCE_SCREEN') {
949
+ config_param = {
950
+ subscribe_video_id: 'video11',
951
+ subscribe_audio_id: 'audio11',
952
+ subscribe_streamId_id: 'subscribe_streamId11',
953
+ feedId_id: 'feedId11',
954
+ feedId: feed.feedId
955
+ }
956
+
957
+ this.tabTitlesClick(
958
+ {
959
+ value: 'customerScreen',
960
+ name: '客户投屏'
961
+ },'add'
962
+ )
963
+ } else {
964
+ if(!document.getElementById('video1').name) {
965
+ config_param = {
966
+ subscribe_video_id: 'video1',
967
+ subscribe_audio_id: 'audio1',
968
+ subscribe_streamId_id: 'subscribe_streamId1',
969
+ feedId_id: 'feedId1',
970
+ feedId: feed.feedId
971
+ }
972
+ }
973
+ else if(!document.getElementById('video2').name) {
974
+ config_param = {
975
+ subscribe_video_id: 'video2',
976
+ subscribe_audio_id: 'audio2',
977
+ subscribe_streamId_id: 'subscribe_streamId2',
978
+ feedId_id: 'feedId2',
979
+ feedId: feed.feedId
980
+ }
981
+ }
982
+ else if(!document.getElementById('video3').name) {
983
+ config_param = {
984
+ subscribe_video_id: 'video3',
985
+ subscribe_audio_id: 'audio3',
986
+ subscribe_streamId_id: 'subscribe_streamId3',
987
+ feedId_id: 'feedId3',
988
+ feedId: feed.feedId
989
+ }
990
+ }
991
+ else if(!document.getElementById('video4').name) {
992
+ config_param = {
993
+ subscribe_video_id: 'video4',
994
+ subscribe_audio_id: 'audio4',
995
+ subscribe_streamId_id: 'subscribe_streamId4',
996
+ feedId_id: 'feedId4',
997
+ feedId: feed.feedId
998
+ }
999
+ }
1000
+ else if(!document.getElementById('video5').name) {
1001
+ config_param = {
1002
+ subscribe_video_id: 'video5',
1003
+ subscribe_audio_id: 'audio5',
1004
+ subscribe_streamId_id: 'subscribe_streamId5',
1005
+ feedId_id: 'feedId5',
1006
+ feedId: feed.feedId
1007
+ }
1008
+ }
1009
+ else if(!document.getElementById('video6').name) {
1010
+ config_param = {
1011
+ subscribe_video_id: 'video6',
1012
+ subscribe_audio_id: 'audio6',
1013
+ subscribe_streamId_id: 'subscribe_streamId6',
1014
+ feedId_id: 'feedId6',
1015
+ feedId: feed.feedId
1016
+ }
1017
+ }
1018
+ }
1019
+
1020
+ }
1021
+ if (config_param !== undefined) {
1022
+ config_param.need_volume_analyser = true
1023
+ this.test_controller.Subscribe(config_param)
1024
+ }
804
1025
  };
805
1026
  // 推送“有新订阅”给与会者
806
1027
  this.test_controller.OnNewSubscribe = (subscriber, feed) => {
@@ -819,15 +1040,73 @@ class Video extends Component {
819
1040
  'tellerId': this.props.tellerAccount
820
1041
  })
821
1042
  })
1043
+ this.setState({
1044
+ publishDevic: 1,
1045
+ isSharedScreen: false,
1046
+ screenName: '投屏'
1047
+ });
1048
+ this.tabTitlesClick('RMScreen','delect')
1049
+ if(this.state.isPictureInPicture) {
1050
+ document.exitPictureInPicture()
1051
+ }
822
1052
  }
823
1053
  };
824
1054
  // 取消订阅媒体流成功
825
1055
  this.test_controller.OnUnSubscribeSucc = (sid) => {
826
1056
  console.log('取消订阅媒体流成功', sid)
1057
+ this.state.tabTitles.map((item) => {
1058
+ if(item.value == 'customerScreen') {
1059
+ if(!document.getElementById("video11").name) {
1060
+ this.tabTitlesClick('customerScreen','delect')
1061
+ }
1062
+ }
1063
+ })
1064
+ if(!document.getElementById("video1").name) {
1065
+ this.setState({
1066
+ videoOneName: ''
1067
+ })
1068
+ }
1069
+ if(!document.getElementById("video2").name) {
1070
+ this.setState({
1071
+ videoTwoName: ''
1072
+ })
1073
+ }
1074
+ if(!document.getElementById("video3").name) {
1075
+ this.setState({
1076
+ videoThreeName: ''
1077
+ })
1078
+ }
1079
+ if(!document.getElementById("video4").name) {
1080
+ this.setState({
1081
+ videoFourName: ''
1082
+ })
1083
+ }
1084
+ if(!document.getElementById("video5").name) {
1085
+ this.setState({
1086
+ videoFiveName: ''
1087
+ })
1088
+ }
1089
+ if(!document.getElementById("video6").name) {
1090
+ this.setState({
1091
+ videoSixName: ''
1092
+ })
1093
+ }
827
1094
  };
828
1095
  // 推送“取消发布”给与会者
829
1096
  this.test_controller.OnUnPublish = (feed) => {
830
1097
  console.log('取消发布者', feed)
1098
+ for(let i=0;i<this.state.roomCustomerList.length;i++) {
1099
+ if(this.state.roomCustomerList[i].uid == feed.uid) {
1100
+ this.state.roomCustomerList.splice(i, 1)
1101
+ }
1102
+ }
1103
+
1104
+ if(this.state.roomCustomerList.length == 0) {
1105
+ this.test_controller.ChangeStreamSize(document.getElementById('publish_video1').name, 3)
1106
+ this.setState({
1107
+ isCustomer: false
1108
+ })
1109
+ }
831
1110
  };
832
1111
  // 推送“取消订阅”给与会者 OnUnSubscribe(unsubscriber,feed)
833
1112
  this.test_controller.OnUnSubscribe = (unsubscriber, feed) => {
@@ -1059,52 +1338,42 @@ class Video extends Component {
1059
1338
  return;
1060
1339
  }
1061
1340
  let canvas = document.getElementById(volumeView);
1341
+ canvas.width = this.props.microphoneSize
1342
+ canvas.height = this.props.microphoneSize
1062
1343
  let ctx = canvas.getContext("2d");
1063
-
1064
- let outcanvas = document.createElement("canvas");
1065
- outcanvas.width = canvas.width;
1066
- outcanvas.height = canvas.height;
1067
- ctx.strokeStyle = this.props.voiceColor;
1068
- ctx.lineWidth = 2;
1069
1344
  ctx.clearRect(0, 0, canvas.width, canvas.height); //清理画布
1070
1345
  let dataArray = new Uint8Array(analyser.frequencyBinCount);
1071
1346
  analyser.getByteFrequencyData(dataArray);
1072
1347
  let step = Math.round(dataArray.length / 60); //采样步长
1348
+ var img = document.getElementById("icon_huatong");
1349
+ ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
1350
+ // 以画布左上角为坐标原点
1351
+ let drawArea = {
1352
+ x1: 28/50*canvas.width, // 波动范围右下角的点坐标
1353
+ y1: 25/50*canvas.height,
1354
+ x2: 22/50*canvas.width, // 波动范围左上角的点坐标
1355
+ y2: 10/50*canvas.height,
1356
+ }
1357
+
1073
1358
  for (var i = 0; i < 40; i++) {
1074
1359
  let energy = (dataArray[step * i] / 256.0) * 80;
1075
- for (var j = 0; j < energy; j++) {
1076
- ctx.beginPath();
1077
- ctx.moveTo(20 * i + 2, 200 + 4 * j);
1078
- ctx.lineTo(20 * (i + 1) - 2, 200 + 4 * j);
1079
- ctx.stroke();
1080
- ctx.beginPath();
1081
- ctx.moveTo(20 * i + 2, 200 - 4 * j);
1082
- ctx.lineTo(20 * (i + 1) - 2, 200 - 4 * j);
1083
- ctx.stroke();
1084
- }
1085
1360
  ctx.beginPath();
1086
- ctx.moveTo(20 * i + 2, 200);
1087
- ctx.lineTo(20 * (i + 1) - 2, 200);
1088
- ctx.stroke();
1089
- }
1090
-
1091
- //制造半透明投影
1092
- function draw() {
1093
- ctx.drawImage(outcanvas, 0, 0);
1094
- ctx.save();
1095
- ctx.translate(canvas.width / 4, canvas.height / 2);
1096
- ctx.rotate(Math.PI);
1097
- ctx.scale(-1, 1);
1098
- ctx.drawImage(outcanvas, -canvas.width / 2, -canvas.height / 2);
1099
- ctx.restore();
1100
- ctx.fillStyle = 'rgba(192,192,192, .0)';
1101
- ctx.fillRect(0, 0, canvas.width, canvas.height);
1361
+ ctx.fillStyle = this.props.voiceColor;
1362
+ const { x1,y1,x2,y2} = drawArea
1363
+ let width = x1-x2;
1364
+ let height = (energy>20?(energy-20):0) * (y1 - y2 ) / 70
1365
+ let startX = x2 // 绘制起始点x
1366
+ let startY = y1 - height // 绘制起始点y
1367
+ ctx.fillRect(startX, startY, width, height )
1102
1368
  }
1103
-
1104
- draw();
1105
1369
  requestAnimationFrame(this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser));
1106
1370
  }
1107
-
1371
+ // 停止共享
1372
+ this.test_controller.OnDesktopDisplayClosed = () => {
1373
+ if (this.state.isSharedScreen) {
1374
+ this.sharedScreen()
1375
+ }
1376
+ }
1108
1377
  }
1109
1378
  contrastFaceVerify = async data => {
1110
1379
  console.log(data);
@@ -1179,6 +1448,9 @@ class Video extends Component {
1179
1448
  })
1180
1449
  const _dependScripts = [
1181
1450
  // https://counter-web.leimondata.cn:7199
1451
+ this.props.resourcePath + "/beauty/beauty.js",
1452
+ this.props.resourcePath + "/beauty/meeting_beautify_stream.js",
1453
+ this.props.resourcePath + "/beauty/backgroundBlur.js",
1182
1454
  this.props.resourcePath + "/adapter.js",
1183
1455
  this.props.resourcePath + "/getMediaInfo.js",
1184
1456
  this.props.resourcePath + "/pdf.js",
@@ -1246,12 +1518,6 @@ class Video extends Component {
1246
1518
  sessionId: this.props.sessionId
1247
1519
  })
1248
1520
  } else {
1249
- setTimeout(() => {
1250
- this.setState({
1251
- screenName: this.props.intl.formatMessage({ id: 'shareScreen' }),
1252
- suspendName: this.props.intl.formatMessage({ id: 'suspend' }),
1253
- })
1254
- }, 50);
1255
1521
  this.addToScript()
1256
1522
  }
1257
1523
  }
@@ -1279,6 +1545,7 @@ class Video extends Component {
1279
1545
  }, function (code, message, data) {
1280
1546
  console.log(data)
1281
1547
  })
1548
+
1282
1549
  } else if (this.state.voiceStatue) {
1283
1550
  // 打开本地
1284
1551
  this.setState({
@@ -1373,22 +1640,17 @@ class Video extends Component {
1373
1640
  this.test_controller.ChangeMediaStream(publish_config);
1374
1641
  this.setState({
1375
1642
  isPDF: true,
1376
- isSelect: 'noVideo',
1377
1643
  })
1378
1644
  } else {
1379
1645
  this.test_controller.UnPublish(document.getElementById('video10').name)
1380
- this.setState({
1381
- isPDF: false,
1382
- isSelect: 'video',
1383
- })
1384
1646
  }
1385
1647
  this.setState({
1386
1648
  publishDevic: 1,
1387
1649
  isSharedScreen: false,
1388
-
1389
1650
  screenName: '投屏'
1390
1651
  });
1391
1652
  console.log(pictureInPictureVideo)
1653
+ this.tabTitlesClick('RMScreen','delect')
1392
1654
  if(this.state.isPictureInPicture) {
1393
1655
  document.exitPictureInPicture()
1394
1656
  }
@@ -1409,20 +1671,18 @@ class Video extends Component {
1409
1671
  publish_config.publish_tag = 'projectionWhiteboard'
1410
1672
  this.test_controller.Publish(publish_config)
1411
1673
  }
1412
-
1413
-
1414
- // publish_config.media_type = 1;
1415
- // publish_config.publish_device = 2;
1416
- // publish_config.video_profile_type = 5;
1417
- // publish_config.sid = document.getElementById('publish_video1').name;
1418
- // this.test_controller.ChangeMediaStream(publish_config);
1419
1674
  this.setState({
1420
1675
  publishDevic: 2,
1421
- isSelect: 'noVideo',
1422
1676
  isSharedScreen: true,
1423
1677
  screenName: '取消共享',
1424
1678
  isPDF: false
1425
1679
  })
1680
+ this.tabTitlesClick(
1681
+ {
1682
+ value: 'RMScreen',
1683
+ name: '坐席投屏'
1684
+ },'add'
1685
+ )
1426
1686
  if(!this.state.isPictureInPicture) {
1427
1687
  this.pictureInPicture()
1428
1688
  }
@@ -1622,6 +1882,64 @@ class Video extends Component {
1622
1882
  imRoomId: props.imRoomId
1623
1883
  });
1624
1884
  }
1885
+ appGetUsername = async (sid) => {
1886
+ console.log(sid)
1887
+ let userId = ''
1888
+ if(document.getElementById('video1').name == sid){
1889
+ userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid
1890
+ }
1891
+ if(document.getElementById('video2').name == sid){
1892
+ userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid
1893
+ }if(document.getElementById('video3').name == sid){
1894
+ userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid
1895
+ }if(document.getElementById('video4').name == sid){
1896
+ userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid
1897
+ }if(document.getElementById('video5').name == sid){
1898
+ userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid
1899
+ }if(document.getElementById('video6').name == sid){
1900
+ userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid
1901
+ }
1902
+ try {
1903
+ let result = await API.appGetUsername({
1904
+ userId: userId
1905
+ });
1906
+ console.log(result)
1907
+ if (result.code == 200) {
1908
+ let data = result.data.userInfo ? result.data.userInfo.userName ? result.data.userInfo.userName : '' : ''
1909
+ if(document.getElementById('video1').name == sid){
1910
+
1911
+ this.setState({
1912
+ videoOneName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户1'
1913
+ })
1914
+ }
1915
+ if(document.getElementById('video2').name == sid){
1916
+ this.setState({
1917
+ videoTwoName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data? data : '客户2'
1918
+ })
1919
+ }if(document.getElementById('video3').name == sid){
1920
+ this.setState({
1921
+ videoThreeName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data : '客户3'
1922
+ })
1923
+ }if(document.getElementById('video4').name == sid){
1924
+ this.setState({
1925
+ videoFourName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data : '客户4'
1926
+ })
1927
+ }if(document.getElementById('video5').name == sid){
1928
+ this.setState({
1929
+ videoFiveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data? data : '客户5'
1930
+ })
1931
+ }if(document.getElementById('video6').name == sid){
1932
+ this.setState({
1933
+ videoSixName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' :data ? data: '客户6'
1934
+ })
1935
+ }
1936
+ } else {
1937
+ message.success('查询失败')
1938
+ }
1939
+ } catch (err) {
1940
+
1941
+ }
1942
+ }
1625
1943
  queryStaff = async () => {
1626
1944
  try {
1627
1945
  let result = await API.getUsername({
@@ -1667,10 +1985,12 @@ class Video extends Component {
1667
1985
  if(!this.state.isWhiteboard) {
1668
1986
  const publish_config = {};
1669
1987
  this.setState({
1670
- isPDF: true,
1671
1988
  isWhiteboard: true,
1672
- isSelect: 'noVideo',
1673
1989
  })
1990
+ this.tabTitlesClick({
1991
+ value: 'RMWhiteboard',
1992
+ name: 'RM白板'
1993
+ },'add')
1674
1994
  if (document.getElementById('video10').name) {
1675
1995
  // 代表已经有了进行切流
1676
1996
  publish_config.publish_device = 4
@@ -1697,21 +2017,24 @@ class Video extends Component {
1697
2017
 
1698
2018
 
1699
2019
  }
1700
- switchSelect = () => {
1701
- if (this.state.isSelect == 'video') {
1702
- if (document.getElementById('video10').name) {
1703
- this.setState({
1704
- isSelect: 'noVideo',
2020
+ switchSelect = (value) => {
2021
+ this.setState({
2022
+ isSelect: value,
1705
2023
  })
1706
- } else {
1707
- message.success('当前无签字白板')
1708
- }
2024
+ // if (this.state.isSelect == 'video') {
2025
+ // if (document.getElementById('video10').name) {
2026
+ // this.setState({
2027
+ // isSelect: 'noVideo',
2028
+ // })
2029
+ // } else {
2030
+ // message.success('当前无签字白板')
2031
+ // }
1709
2032
 
1710
- } else {
1711
- this.setState({
1712
- isSelect: 'video',
1713
- })
1714
- }
2033
+ // } else {
2034
+ // this.setState({
2035
+ // isSelect: 'video',
2036
+ // })
2037
+ // }
1715
2038
  }
1716
2039
  facialHandleVisibleChange=(value)=>{
1717
2040
  if(!value) {
@@ -1728,25 +2051,46 @@ class Video extends Component {
1728
2051
  }
1729
2052
  }
1730
2053
  render() {
2054
+ const {theme} = this.props
1731
2055
  var pdfChildren
1732
2056
  if (this.props.children) {
1733
2057
  pdfChildren = React.cloneElement(this.props.children, { width: 100, height: 100, id: 12 })
1734
2058
  }
2059
+ const customerNameList = (
2060
+ <span>
2061
+ {
2062
+ theme.customers.map((item,index)=>{
2063
+ return <label>
2064
+ {item}
2065
+ {
2066
+ theme.customers.length > 0 && index != theme.customers.length-1 &&<span>,</span>
2067
+ }
2068
+
2069
+ </label>
2070
+ })
2071
+ }
2072
+ </span>
2073
+ )
2074
+ const tabTitleList = (
2075
+ <div className="button">
2076
+ {
2077
+ this.state.tabTitles.map((item)=>{
2078
+ return <div className={`${this.state.isSelect == item.value ? 'selectSee' : "noSelest"}`} onClick={this.switchSelect.bind(this,item.value)}>
2079
+ {item.name}
2080
+ </div>
2081
+ })
2082
+ }
2083
+ </div>
2084
+ )
1735
2085
  return (
1736
2086
  <div className="all">
1737
2087
  <Spin spinning={this.state.loading} tip="视频初始化中...">
1738
2088
  <Header></Header>
1739
- <div className="health">
2089
+ {tabTitleList}
2090
+ <div className="health" style={{'margin-top': (this.state.tabTitles.length > 0) ? '0px' : '20px' }}>
1740
2091
  <div className="projection" style={{ display: (this.state.isCustomer) ? '' : 'none', }}>
1741
- <div className="button">
1742
- <div className={`${this.state.isSelect == 'video' ? 'selectSee' : "noSelest"}`} onClick={this.switchSelect.bind(this)}>视频画面</div>
1743
- <div className={`${this.state.isSelect == 'noVideo' ? 'selectSee' : "noSelest"}`} onClick={this.switchSelect.bind(this)}>投屏白板</div>
1744
- </div>
1745
- <div className="videoDiv" style={{ display: (this.state.isSelect == 'noVideo') ? '' : 'none', }}>
1746
- <div style={{ display: (this.state.isPDF) ? '' : 'none', }} id="touBoxItem">
1747
- {pdfChildren}
1748
- </div>
1749
- <div className="videoDiv" style={this.state.isPDF ? { display: 'none' } : {}}>
2092
+ <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
2093
+ <div className="videoDiv">
1750
2094
  <video
1751
2095
  id="video10"
1752
2096
  autoPlay
@@ -1755,18 +2099,86 @@ class Video extends Component {
1755
2099
  />
1756
2100
  <audio id="audio10" autoPlay />
1757
2101
  <label style={{ display: 'none' }} id="feedId10" type="text" />
1758
- {/* <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView10" width="70" height="70"></canvas> */}
2102
+ </div>
1759
2103
 
2104
+ </div>
2105
+ <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMWhiteboard') ? '' : 'none', }}>
2106
+ <div id="touBoxItem">
2107
+ {pdfChildren}
2108
+ </div>
2109
+ </div>
2110
+ <div className="videoDiv" style={{ display: (this.state.isSelect == 'customerScreen') ? '' : 'none', }}>
2111
+ <div className="videoDiv">
2112
+ <video
2113
+ id="video11"
2114
+ autoPlay
2115
+ muted={true}
2116
+ className="video"
2117
+ />
2118
+ <audio id="audio11" autoPlay />
2119
+ <label style={{ display: 'none' }} id="feedId11" type="text" />
2120
+ {/* <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView10" width="70" height="70"></canvas> */}
1760
2121
  </div>
1761
2122
 
1762
2123
  </div>
2124
+ {
2125
+ this.state.tabTitles.length == 0 &&
2126
+ <div className='themeClass'>
2127
+ <div>
2128
+ <ul>
2129
+ <li>
2130
+ <span>会议主题:</span>
2131
+ <label>{theme.title}</label>
2132
+ </li>
2133
+ <li>
2134
+ <span>支持人:</span>
2135
+ <label>{theme.host}</label>
2136
+ </li>
2137
+ <li>
2138
+ <span>参会客户:</span>
2139
+ {customerNameList}
2140
+ </li>
2141
+ </ul>
2142
+ </div>
2143
+ </div>
2144
+ }
2145
+
2146
+
1763
2147
  </div>
1764
- <div className="wrapper">
2148
+ <div className="wrapper" style={{ width: (this.state.isCustomer) ? '20%' : '100%', }}>
2149
+ <div
2150
+ className={`itemed ${this.state.publishDevic == 4 ? '' : (this.state.isBigVideo == 'publish_video1' ? 'isBack' : (this.state.isCustomer ? 'isBack' : ''))} ${this.state.isCustomer ? '' : 'video1Div'}`}
2151
+ >
2152
+ <div className="publishVideoDiv">
2153
+
2154
+ <video
2155
+ id="publish_video1"
2156
+ className={`publishVideoClass ${this.state.isCustomer ? '' : "videoFit"}`}
2157
+ autoPlay
2158
+ muted={true}
2159
+ webkit-playsinline={true}
2160
+ playsinline={true}
2161
+ />
2162
+ <label style={{ display: 'none' }} id="publish_streamId1" type="text" />
2163
+ {
2164
+ this.state.voiceStatue && <img
2165
+ alt=""
2166
+ src={require("../../assets/img/icon_MuteOne.png").default}
2167
+ className="imgClass voiceClass"
2168
+ />
2169
+ }
2170
+ <div id="publish_video_div" style={{ display: (this.state.isCustomer) ? '' : 'none'}} className={`tellerTitle titleSamlle`}>
2171
+ <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>坐席</div>
2172
+ </div>
2173
+ <canvas style={{ display: (this.state.isCustomer && !this.state.voiceStatue) ? '' : 'none', }} className="canvasClass" id="publish_volumeView" width="40" height="70"></canvas>
2174
+ </div>
2175
+
2176
+ </div>
2177
+ <div style={{ display: (this.state.isCustomer) ? '' : 'none', }}>
1765
2178
  <div
1766
2179
  className={`itemed ${this.state.isBigVideo == 'video1' ? 'item1' : ""}`}
1767
2180
  // className="itemed item1"
1768
- style={{ position: "relative",'margin-right': '5px', }}
1769
- onClick={this.enlargeClick.bind(this, 'isLangVideo1')}
2181
+ style={{ position: "relative"}}
1770
2182
  >
1771
2183
  {
1772
2184
  this.state.customAudioed && <img
@@ -1784,52 +2196,17 @@ class Video extends Component {
1784
2196
  />
1785
2197
  <audio id="audio1" autoPlay />
1786
2198
  <label style={{ display: 'none' }} id="feedId1" type="text" />
1787
- <div style={{ display: (this.state.isCustomer) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor }} className='customerTitle'>客户</div>
2199
+ <div style={{ display: (this.state.videoOneName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
2200
+ <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2201
+ {this.state.videoOneName}
2202
+ </div>
2203
+
2204
+
2205
+ </div>
1788
2206
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView1" width="40" height="70"></canvas>
1789
2207
  </div>
1790
2208
  </div>
1791
- <div
1792
- className={`itemed ${this.state.publishDevic == 4 ? '' : (this.state.isBigVideo == 'publish_video1' ? 'item1 isBack' : (this.state.isCustomer ? 'isBack' : 'itemPublic'))}`}
1793
- onClick={this.enlargeClick.bind(this, 'isLangPublishVideo1')}
1794
- >
1795
- <div className="publishVideoDiv">
1796
- {
1797
- this.state.audioed && <img
1798
- alt=""
1799
- src={require("../../assets/img/yingpin.png").default}
1800
- className="imgClass"
1801
- />
1802
- }
1803
- {
1804
- this.state.isSuspend && <img
1805
- alt=""
1806
- src={require("../../assets/img/zanTing.png").default}
1807
- className="imgClass"
1808
- />
1809
- }
1810
- {/* {
1811
- this.state.isSharedScreen && <span
1812
- className="sharedScreen"
1813
- >
1814
- 屏幕共享中
1815
- </span>
1816
- } */}
1817
- <video
1818
- style={{ display: (!this.state.audioed && !this.state.isSuspend) ? '' : 'none', }}
1819
- id="publish_video1"
1820
- className={`publishVideoClass ${this.state.isCustomer ? '' : "videoFit"}`}
1821
- onClick={this.enlargeClick.bind(this, 'isLangVideo2')}
1822
- autoPlay
1823
- muted={true}
1824
- />
1825
- <audio id="audio1" autoPlay />
1826
- <label style={{ display: 'none' }} id="publish_streamId1" type="text" />
1827
- <div style={{ display: (this.state.isCustomer) ? '' : 'none', background: this.props.titleBackground,color: this.props.titleColor}} className='tellerTitle'>坐席</div>
1828
- <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="publish_volumeView" width="40" height="70"></canvas>
1829
- </div>
1830
-
1831
- </div>
1832
- <div className={`itemed ${this.state.isBigVideo == 'video2' ? 'item1' : ""}`} style={{'margin-top': '5px', }} onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
2209
+ <div className={`itemed`}>
1833
2210
  <video
1834
2211
  id="video2"
1835
2212
  autoPlay
@@ -1838,12 +2215,15 @@ class Video extends Component {
1838
2215
  />
1839
2216
  <audio id="audio2" autoPlay />
1840
2217
  <label style={{ display: 'none' }} id="feedId2" type="text" />
1841
- {/* <div className='customerTitle'>客户</div> */}
2218
+ <div style={{ display: (this.state.videoTwoName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
2219
+ <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2220
+ {this.state.videoTwoName}
2221
+ </div>
2222
+ </div>
1842
2223
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView2" width="40" height="70"></canvas>
1843
2224
  </div>
1844
- <div className={`itemed ${this.state.isBigVideo == 'video3' ? 'item1' : ""}`}
1845
- style={{'margin-top': '5px', }}
1846
- onClick={this.enlargeClick.bind(this, 'isLangVideo3')}>
2225
+ <div className={`itemed`}
2226
+ style={{'margin-top': '5px' }}>
1847
2227
  <video
1848
2228
  id="video3"
1849
2229
  autoPlay
@@ -1852,12 +2232,14 @@ class Video extends Component {
1852
2232
  />
1853
2233
  <audio id="audio3" autoPlay />
1854
2234
  <label style={{ display: 'none' }} id="feedId3" type="text" />
1855
- {/* <div style={{ display: (this.state.isCustomer) ? '' : 'none', }} className='customerTitle'>客户</div> */}
2235
+ <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`}>
2236
+ <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2237
+ {this.state.videoThreeName}
2238
+ </div>
2239
+ </div>
1856
2240
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView3" width="40" height="70"></canvas>
1857
2241
  </div>
1858
- <div className={`itemed ${this.state.isBigVideo == 'video4' ? 'item1' : ""}`}
1859
- style={{'margin-right': '5px', }}
1860
- onClick={this.enlargeClick.bind(this, 'isLangVideo4')}>
2242
+ <div className={`itemed`}>
1861
2243
  <video
1862
2244
  id="video4"
1863
2245
  autoPlay
@@ -1866,12 +2248,15 @@ class Video extends Component {
1866
2248
  />
1867
2249
  <audio id="audio4" autoPlay />
1868
2250
  <label style={{ display: 'none' }} id="feedId4" type="text" />
1869
- {/* <div style={{ display: (this.state.isCustomer) ? '' : 'none', }} className='customerTitle'>客户</div> */}
2251
+ <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`}>
2252
+ <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2253
+ {this.state.videoFourName}
2254
+ </div>
2255
+ </div>
1870
2256
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView4" width="40" height="70"></canvas>
1871
2257
  </div>
1872
- <div className={`itemed ${this.state.isBigVideo == 'video5' ? 'item1' : ""}`}
1873
- style={{'margin-top': '5px', }}
1874
- onClick={this.enlargeClick.bind(this, 'isLangVideo5')}>
2258
+ <div className={`itemed`}
2259
+ style={{'margin-top': '5px' }}>
1875
2260
  <video
1876
2261
  id="video5"
1877
2262
  autoPlay
@@ -1880,10 +2265,14 @@ class Video extends Component {
1880
2265
  />
1881
2266
  <audio id="audio5" autoPlay />
1882
2267
  <label style={{ display: 'none' }} id="feedId5" type="text" />
1883
- {/* <div style={{ display: (this.state.isCustomer) ? '' : 'none', }} className='customerTitle'>客户</div> */}
2268
+ <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`}>
2269
+ <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2270
+ {this.state.videoFiveName}
2271
+ </div>
2272
+ </div>
1884
2273
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView5" width="40" height="70"></canvas>
1885
2274
  </div>
1886
- <div onClick={this.enlargeClick.bind(this, 'isLangVideo6')} style={{'margin-top': '5px', }} className={`${this.state.isBigVideo == 'video6' ? 'item1' : "itemed"}`}>
2275
+ <div className={`"itemed"`}>
1887
2276
  <video
1888
2277
  id="video6"
1889
2278
  autoPlay
@@ -1892,12 +2281,17 @@ class Video extends Component {
1892
2281
  />
1893
2282
  <audio id="audio6" autoPlay />
1894
2283
  <label style={{ display: 'none' }} id="feedId6" type="text" />
1895
- {/* <div style={{ display: (this.state.isCustomer) ? '' : 'none', }} className='customerTitle'>客户</div> */}
2284
+ <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`}>
2285
+ <div className='titleName' style={{ background: this.props.titleBackground,color: this.props.titleColor,'font-size': this.props.fontSize + 'px','font-family' : this.props.fontFamily}}>
2286
+ {this.state.videoSixName}
2287
+ </div>
2288
+ </div>
1896
2289
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView6" width="40" height="70"></canvas>
1897
2290
 
1898
2291
  </div>
2292
+ </div>
1899
2293
  </div>
1900
-
2294
+ <img id="icon_huatong" style={{display:'none'}} src={require("../../assets/img/icon_huatong.png").default}></img>
1901
2295
  </div>
1902
2296
  <Foot
1903
2297
  img={this.state.voiceImg}
@@ -1907,6 +2301,7 @@ class Video extends Component {
1907
2301
  customerList={this.state.customerList}
1908
2302
  clickedOcr={this.state.clickedOcr}
1909
2303
  clickedFacial={this.state.clickedFacial}
2304
+ {...this.props}
1910
2305
  suspend={this.suspend}
1911
2306
  facialHandleVisibleChange={this.facialHandleVisibleChange}
1912
2307
  ocrHandleVisibleChange={this.ocrHandleVisibleChange}
@@ -1988,8 +2383,17 @@ Video.defaultProps = {
1988
2383
  roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
1989
2384
  resourcePath: 'https://counter-web.leimondata.cn:7199',
1990
2385
  prohibitPrompt: '当前无客户',
1991
- voiceColor: '#db0011',
1992
- titleBackground: 'rgba(219, 0, 17, 0.1)',
1993
- titleColor: '#DB0011'
2386
+ voiceColor: '#0AE544',
2387
+ titleBackground: 'rgba(0,0,0,0.65)',
2388
+ titleColor: '#fff',
2389
+ microphoneSize: '50',
2390
+ fontSize: '14',
2391
+ fontFamily: 'auto',
2392
+ menus: ['SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
2393
+ theme: {
2394
+ title: '测试',
2395
+ host: 'wmz',
2396
+ customers: ['王三','张思']
2397
+ }
1994
2398
  }
1995
2399
  export default Video