react_hsbc_teller 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/video/video.jsx +69 -49
- package/packages/pages/video/video.less +11 -8
package/package.json
CHANGED
|
@@ -27,7 +27,9 @@ const LEAVE_TYPE = {
|
|
|
27
27
|
TELLER_EXIT: 1, // 坐席退出
|
|
28
28
|
ROOM_DESTROYED: -1, // 房间异常
|
|
29
29
|
}
|
|
30
|
-
let pictureInPictureVideo
|
|
30
|
+
let pictureInPictureVideo
|
|
31
|
+
let mix_stream
|
|
32
|
+
let worker
|
|
31
33
|
message.config({
|
|
32
34
|
getContainer: ()=>document.getElementById('allHSBC')
|
|
33
35
|
})
|
|
@@ -41,6 +43,7 @@ class Video extends Component {
|
|
|
41
43
|
cancel = axios.CancelToken.source()
|
|
42
44
|
signCanvas = React.createRef();
|
|
43
45
|
state = {
|
|
46
|
+
listVideoPicture: [],
|
|
44
47
|
isScreenSwitching: false,
|
|
45
48
|
whiteboardWidth: '',
|
|
46
49
|
whiteboardHeight: '',
|
|
@@ -592,16 +595,16 @@ class Video extends Component {
|
|
|
592
595
|
if(!val) {
|
|
593
596
|
document.exitPictureInPicture()
|
|
594
597
|
} else {
|
|
595
|
-
this.pictureInPictureClick()
|
|
598
|
+
this.pictureInPictureClick('update')
|
|
596
599
|
}
|
|
597
600
|
} else {
|
|
598
601
|
if(!val) {
|
|
599
|
-
this.pictureInPictureClick()
|
|
602
|
+
this.pictureInPictureClick('add')
|
|
600
603
|
}
|
|
601
604
|
}
|
|
602
605
|
}
|
|
603
606
|
};
|
|
604
|
-
pictureInPictureClick=()=>{
|
|
607
|
+
pictureInPictureClick=(val)=>{
|
|
605
608
|
let interval
|
|
606
609
|
const list = []
|
|
607
610
|
if (document.getElementById('video1').name) {
|
|
@@ -710,12 +713,18 @@ class Video extends Component {
|
|
|
710
713
|
})
|
|
711
714
|
}
|
|
712
715
|
console.log(list)
|
|
713
|
-
|
|
714
|
-
const
|
|
716
|
+
this.state.listVideoPicture = list
|
|
717
|
+
// const width = 640;
|
|
718
|
+
// const height = 360 * this.state.listVideoPicture.length;
|
|
719
|
+
if(val == 'add') {
|
|
720
|
+
pictureInPictureVideo.srcObject = mix_stream;
|
|
721
|
+
let flag1 = true;
|
|
722
|
+
worker.postMessage(flag1);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
workerClick=()=>{
|
|
715
726
|
const canvas = document.createElement('canvas');
|
|
716
727
|
const cobj = canvas.getContext('2d'); // 获取绘图环境
|
|
717
|
-
canvas.width = width;
|
|
718
|
-
canvas.height = height;
|
|
719
728
|
let blob = new Blob([
|
|
720
729
|
`
|
|
721
730
|
let timer;
|
|
@@ -729,15 +738,17 @@ class Video extends Component {
|
|
|
729
738
|
`,
|
|
730
739
|
]);
|
|
731
740
|
let url = window.URL.createObjectURL(blob);
|
|
732
|
-
|
|
741
|
+
worker = new Worker(url);
|
|
733
742
|
window.URL.revokeObjectURL(blob);
|
|
734
|
-
|
|
743
|
+
|
|
735
744
|
|
|
736
745
|
worker.onmessage =() => {
|
|
737
|
-
cobj.clearRect(0, 0,
|
|
738
|
-
|
|
746
|
+
cobj.clearRect(0, 0, 640, 360 * this.state.listVideoPicture.length);
|
|
747
|
+
canvas.width = 640;
|
|
748
|
+
canvas.height = 360 * this.state.listVideoPicture.length;
|
|
749
|
+
for (let i = 0; i < this.state.listVideoPicture.length; i++) {
|
|
739
750
|
|
|
740
|
-
let videoId =
|
|
751
|
+
let videoId = this.state.listVideoPicture[i].name;
|
|
741
752
|
let videoDiv = document.getElementById(videoId);
|
|
742
753
|
let videoWidth = videoDiv.videoWidth;
|
|
743
754
|
let videoHeight = videoDiv.videoHeight;
|
|
@@ -748,7 +759,7 @@ class Video extends Component {
|
|
|
748
759
|
} else {
|
|
749
760
|
newVideoHeight = videoHeight * 640 / videoWidth;
|
|
750
761
|
}
|
|
751
|
-
if(
|
|
762
|
+
if(this.state.listVideoPicture[i].noVideo){
|
|
752
763
|
cobj.fillStyle = '#333';
|
|
753
764
|
cobj.fillRect((640 - newVideoWidth) / 2, 360 * i, newVideoWidth, newVideoHeight)
|
|
754
765
|
} else {
|
|
@@ -762,11 +773,11 @@ class Video extends Component {
|
|
|
762
773
|
cobj.fill();
|
|
763
774
|
cobj.stroke();
|
|
764
775
|
cobj.beginPath();
|
|
765
|
-
cobj.font = "28px
|
|
776
|
+
cobj.font = "28px serif";
|
|
766
777
|
cobj.textAlign = 'left';
|
|
767
778
|
cobj.lineWidth = 1;
|
|
768
779
|
// 文字
|
|
769
|
-
let str =
|
|
780
|
+
let str = this.state.listVideoPicture[i].title
|
|
770
781
|
for (let k = 0; k < str.length; k++){
|
|
771
782
|
// console.log(str.substring(0,k+1))
|
|
772
783
|
// console.log(cobj.measureText(str.substring(0,k+1)).width)
|
|
@@ -781,7 +792,7 @@ class Video extends Component {
|
|
|
781
792
|
//左边框
|
|
782
793
|
cobj.beginPath();
|
|
783
794
|
cobj.moveTo(0, 0);
|
|
784
|
-
cobj.lineTo(0, 360 *
|
|
795
|
+
cobj.lineTo(0, 360 * this.state.listVideoPicture.length);
|
|
785
796
|
cobj.closePath(); //闭合路径
|
|
786
797
|
cobj.lineWidth = 5; //线的边框为10像素
|
|
787
798
|
cobj.strokeStyle = '#d9363e';
|
|
@@ -798,7 +809,7 @@ class Video extends Component {
|
|
|
798
809
|
|
|
799
810
|
//右边框
|
|
800
811
|
cobj.beginPath();
|
|
801
|
-
cobj.moveTo(640, 360 *
|
|
812
|
+
cobj.moveTo(640, 360 * this.state.listVideoPicture.length);
|
|
802
813
|
cobj.lineTo(640, 0);
|
|
803
814
|
cobj.closePath(); //闭合路径
|
|
804
815
|
cobj.lineWidth = 5; //线的边框为10像素
|
|
@@ -808,8 +819,8 @@ class Video extends Component {
|
|
|
808
819
|
|
|
809
820
|
//上边框
|
|
810
821
|
cobj.beginPath();
|
|
811
|
-
cobj.moveTo(0, 360 *
|
|
812
|
-
cobj.lineTo(640, 360 *
|
|
822
|
+
cobj.moveTo(0, 360 * this.state.listVideoPicture.length);
|
|
823
|
+
cobj.lineTo(640, 360 * this.state.listVideoPicture.length);
|
|
813
824
|
cobj.closePath(); //闭合路径
|
|
814
825
|
cobj.lineWidth = 5; //线的边框为10像素
|
|
815
826
|
cobj.strokeStyle = '#d9363e';
|
|
@@ -819,26 +830,15 @@ class Video extends Component {
|
|
|
819
830
|
let microphoneSize = 50
|
|
820
831
|
var img = document.getElementById("icon_huatong");
|
|
821
832
|
var img1 = document.getElementById("icon_huatong_close");
|
|
822
|
-
if(this.state[
|
|
833
|
+
if(this.state[this.state.listVideoPicture[i].voice]) {
|
|
823
834
|
cobj.drawImage(img1, 10, 360 * (i + 1) - 60, microphoneSize, microphoneSize);
|
|
824
835
|
} else {
|
|
825
836
|
cobj.drawImage(img, 10, 360 * (i + 1) - 60, microphoneSize, microphoneSize);
|
|
826
837
|
|
|
827
838
|
// 绘制实时音量
|
|
828
|
-
let sid = document.getElementById(
|
|
839
|
+
let sid = document.getElementById(this.state.listVideoPicture[i].name).name
|
|
829
840
|
let analyser = this.state.analyserData.get(sid)
|
|
830
841
|
aou(analyser)
|
|
831
|
-
// let sid = document.getElementById(list[i].name).name
|
|
832
|
-
// let stream = this.test_controller.GetMediaInfo(sid).audio_
|
|
833
|
-
// let acc = new AudioContext()
|
|
834
|
-
// let mic = acc.createMediaStreamSource(stream)
|
|
835
|
-
// let analyser = acc.createAnalyser()
|
|
836
|
-
// analyser.fftSize = 256
|
|
837
|
-
// mic.connect(analyser)
|
|
838
|
-
// aou(analyser)
|
|
839
|
-
// let microphoneSize = 50
|
|
840
|
-
// var img = document.getElementById("icon_huatong");
|
|
841
|
-
// cobj.drawImage(img, 600, 360 * (i + 1) - 60, microphoneSize, microphoneSize);
|
|
842
842
|
function aou(analyser){
|
|
843
843
|
if(analyser) {
|
|
844
844
|
let dataArray = new Uint8Array(analyser.frequencyBinCount);
|
|
@@ -873,11 +873,11 @@ class Video extends Component {
|
|
|
873
873
|
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
|
|
876
|
+
|
|
877
877
|
const captureStream = canvas.captureStream();
|
|
878
|
-
|
|
878
|
+
mix_stream = new MediaStream(captureStream);
|
|
879
879
|
pictureInPictureVideo = document.getElementById('mixedvideo');
|
|
880
|
-
|
|
880
|
+
|
|
881
881
|
pictureInPictureVideo.onloadedmetadata = () => {
|
|
882
882
|
pictureInPictureVideo.requestPictureInPicture();
|
|
883
883
|
};
|
|
@@ -892,9 +892,11 @@ class Video extends Component {
|
|
|
892
892
|
pictureInPictureVideo.addEventListener('leavepictureinpicture', (event) => {
|
|
893
893
|
pictureInPictureVideo.srcObject = null;
|
|
894
894
|
pictureInPictureVideo.style.display = "none";
|
|
895
|
+
this.state.listVideoPicture = []
|
|
895
896
|
worker.postMessage(false);
|
|
896
897
|
this.state.isPictureInPicture = false
|
|
897
898
|
});
|
|
899
|
+
|
|
898
900
|
}
|
|
899
901
|
roomCallBack = (type, manege,code) => {
|
|
900
902
|
this.setState({
|
|
@@ -1135,7 +1137,10 @@ class Video extends Component {
|
|
|
1135
1137
|
else if (Mival.typeId == 1220) {
|
|
1136
1138
|
// 一炒多的图片
|
|
1137
1139
|
if (Mival.sessionId == this.state.sessionId) {
|
|
1138
|
-
this.props.imgCallback(
|
|
1140
|
+
this.props.imgCallback({
|
|
1141
|
+
type: Mival.data.type,
|
|
1142
|
+
file: Mival.data.file}
|
|
1143
|
+
) // 文字抄录和风险抄录,3--风险,,2--文字
|
|
1139
1144
|
}
|
|
1140
1145
|
} else if (Mival.typeId == 1216) {
|
|
1141
1146
|
// 签字回调
|
|
@@ -1355,7 +1360,7 @@ class Video extends Component {
|
|
|
1355
1360
|
type: '2',
|
|
1356
1361
|
sigType: 1
|
|
1357
1362
|
};
|
|
1358
|
-
|
|
1363
|
+
this.workerClick()
|
|
1359
1364
|
this.test_controller.GetDevices();
|
|
1360
1365
|
// 获取设备成功
|
|
1361
1366
|
this.test_controller.OnGetDevicesSuccess = (devicesInfo) => {
|
|
@@ -2617,6 +2622,7 @@ class Video extends Component {
|
|
|
2617
2622
|
this.props.resourcePath + "/beauty/beauty.js",
|
|
2618
2623
|
this.props.resourcePath + "/beauty/meeting_beautify_stream.js",
|
|
2619
2624
|
this.props.resourcePath + "/beauty/backgroundBlur.js",
|
|
2625
|
+
|
|
2620
2626
|
this.props.resourcePath + "/adapter.js",
|
|
2621
2627
|
this.props.resourcePath + "/getMediaInfo.js",
|
|
2622
2628
|
// this.props.resourcePath + "/pdf.js",
|
|
@@ -2628,10 +2634,17 @@ class Video extends Component {
|
|
|
2628
2634
|
this.props.resourcePath + "/meeting_im.js",
|
|
2629
2635
|
this.props.resourcePath + "/meeting_vod.js",
|
|
2630
2636
|
this.props.resourcePath + "/meeting_invite.js",
|
|
2631
|
-
this.props.resourcePath + "/client_record.js",
|
|
2637
|
+
this.props.resourcePath + "/client_record.js",
|
|
2632
2638
|
this.props.resourcePath + "/remote_record.js",
|
|
2633
2639
|
this.props.resourcePath + "/meeting_camera_stream.js",
|
|
2634
2640
|
this.props.resourcePath + "/meeting_api.js",
|
|
2641
|
+
|
|
2642
|
+
this.props.resourcePath + "/eruda.js",
|
|
2643
|
+
this.props.resourcePath + "/iconfont.js",
|
|
2644
|
+
this.props.resourcePath + "/dialogue.css",
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
|
|
2635
2648
|
]
|
|
2636
2649
|
const that = this
|
|
2637
2650
|
let i = 0
|
|
@@ -2807,6 +2820,8 @@ class Video extends Component {
|
|
|
2807
2820
|
publish_config.media_type = 1
|
|
2808
2821
|
publish_config.publish_device = 2
|
|
2809
2822
|
publish_config.video_profile_type = 1
|
|
2823
|
+
publish_config.enableDesktopAudio=true
|
|
2824
|
+
publish_config.degradationType=2
|
|
2810
2825
|
publish_config.sid = document.getElementById('video20').name
|
|
2811
2826
|
this.test_controller.ChangeMediaStream(publish_config)
|
|
2812
2827
|
this.state.isScreenSwitching = true
|
|
@@ -2846,6 +2861,8 @@ class Video extends Component {
|
|
|
2846
2861
|
publish_config.media_type = 1;
|
|
2847
2862
|
publish_config.publish_device = 2;
|
|
2848
2863
|
publish_config.video_profile_type = 1;
|
|
2864
|
+
publish_config.enableDesktopAudio=true
|
|
2865
|
+
publish_config.degradationType=2
|
|
2849
2866
|
publish_config.sid = document.getElementById('video20').name;
|
|
2850
2867
|
this.test_controller.ChangeMediaStream(publish_config);
|
|
2851
2868
|
} else {
|
|
@@ -2853,6 +2870,8 @@ class Video extends Component {
|
|
|
2853
2870
|
publish_config.publish_device = 2
|
|
2854
2871
|
publish_config.need_volume_analyser = true
|
|
2855
2872
|
publish_config.video_profile_type = 1
|
|
2873
|
+
publish_config.enableDesktopAudio=true
|
|
2874
|
+
publish_config.degradationType=2
|
|
2856
2875
|
publish_config.publish_video_id = 'video20'
|
|
2857
2876
|
publish_config.publish_streamId_id = 'subscribe_streamId20'
|
|
2858
2877
|
publish_config.publish_tag = 'projectionWhiteboard'
|
|
@@ -3214,6 +3233,7 @@ class Video extends Component {
|
|
|
3214
3233
|
console.log(inp.value, '复制到的内容')
|
|
3215
3234
|
document.execCommand('Copy') // 执行浏览器复制命令
|
|
3216
3235
|
inp.remove()
|
|
3236
|
+
this.messageClick('复制成功','success')
|
|
3217
3237
|
}
|
|
3218
3238
|
queryStaff = async () => {
|
|
3219
3239
|
if(!this.state.employeeNumber) return
|
|
@@ -4027,19 +4047,19 @@ class Video extends Component {
|
|
|
4027
4047
|
<div className="invitationDiv">
|
|
4028
4048
|
<span className="modalSpan"> 姓名:</span><span>{this.state.employeeName}</span>
|
|
4029
4049
|
</div>
|
|
4030
|
-
{
|
|
4031
|
-
this.state.employeeName &&<div className='invitationDiv'>
|
|
4032
|
-
<span className="modalSpan"> </span><Button className="invitationButton" onClick={this.linkClick}> <img className='invitationImg' src={require("../../assets/img/link.png").default} alt="" />复制会议链接</Button>
|
|
4033
|
-
</div>
|
|
4034
|
-
}
|
|
4035
4050
|
|
|
4051
|
+
<div className='invitationDiv'>
|
|
4052
|
+
<span className="modalSpan"> </span>
|
|
4053
|
+
<Button style={{ display: this.state.employeeName? '' : 'none'}} className="invitationButton" onClick={this.linkClick}> <img className='invitationImg' src={require("../../assets/img/link.png").default} alt="" />复制会议链接</Button>
|
|
4054
|
+
</div>
|
|
4055
|
+
|
|
4036
4056
|
</div>
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
<img alt="" src={require("../../assets/img/tooltips2_fail.png").default} />
|
|
4040
|
-
<span>{this.state.employeeError}</span>
|
|
4057
|
+
|
|
4058
|
+
<div className={`errorClassInvitation ${this.state.employeeError ? 'errorClassInvitationColor' : ''}`}>
|
|
4059
|
+
<img style={{ display: this.state.employeeError? '' : 'none'}} alt="" src={require("../../assets/img/tooltips2_fail.png").default} />
|
|
4060
|
+
<span style={{ display: this.state.employeeError? '' : 'none'}}>{this.state.employeeError}</span>
|
|
4041
4061
|
</div>
|
|
4042
|
-
|
|
4062
|
+
|
|
4043
4063
|
|
|
4044
4064
|
</Modal>
|
|
4045
4065
|
<Modal title="签字白板" width={600} destroyOnClose={true} closable={false} centered={true} visible={isTranscribing} footer={
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
.mixedvideo{
|
|
6
6
|
display: none;
|
|
7
7
|
position:absolute;
|
|
8
|
-
object-fit:
|
|
8
|
+
object-fit: cover
|
|
9
9
|
}
|
|
10
10
|
.imgClass{
|
|
11
11
|
width: 100%;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
border-radius: 6px;
|
|
51
51
|
}
|
|
52
52
|
.videoFit{
|
|
53
|
-
object-fit:
|
|
53
|
+
object-fit: cover !important;
|
|
54
54
|
}
|
|
55
55
|
// .isBack {
|
|
56
56
|
// transform: rotateY(180deg);
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
.video1{
|
|
60
60
|
width: 100%;
|
|
61
61
|
height: 100%;
|
|
62
|
-
object-fit:
|
|
62
|
+
object-fit: cover;
|
|
63
63
|
border-radius: 6px;
|
|
64
64
|
}
|
|
65
65
|
.video{
|
|
66
66
|
width: 100%;
|
|
67
67
|
height: 100%;
|
|
68
|
-
object-fit:
|
|
68
|
+
object-fit: cover;
|
|
69
69
|
border-radius: 6px;
|
|
70
70
|
}
|
|
71
71
|
.video1Div{
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
background: #f0f0f0;
|
|
78
78
|
}
|
|
79
79
|
.healthVideo{
|
|
80
|
-
height: ~"calc(100vh -
|
|
80
|
+
height: ~"calc(100vh - 15.8125rem)";
|
|
81
81
|
width: 100%;
|
|
82
82
|
display: inline-flex;
|
|
83
83
|
}
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
}
|
|
87
87
|
.ownClass{
|
|
88
88
|
height: calc(100vh - 15px);
|
|
89
|
-
object-fit:
|
|
89
|
+
object-fit: cover;
|
|
90
90
|
width: 100%;
|
|
91
91
|
}
|
|
92
92
|
.publishVideoClass{
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
.invitationDiv{
|
|
139
139
|
margin-left: 40px;
|
|
140
140
|
margin-bottom: 15px;
|
|
141
|
+
height: 27px;
|
|
141
142
|
input::-webkit-inner-spin-button {
|
|
142
143
|
-webkit-appearance: none;
|
|
143
144
|
appearance: none;
|
|
@@ -453,12 +454,14 @@
|
|
|
453
454
|
.radio input:checked+i:after {
|
|
454
455
|
opacity: 1;
|
|
455
456
|
}
|
|
457
|
+
.errorClassInvitationColor{
|
|
458
|
+
background: #F9F2F3;
|
|
459
|
+
border: 1px #E5B2B5 solid;
|
|
460
|
+
}
|
|
456
461
|
.errorClassInvitation{
|
|
457
462
|
width: 90%;
|
|
458
463
|
height: 50px;
|
|
459
464
|
margin: 50px 30px 0px;
|
|
460
|
-
background: #F9F2F3;
|
|
461
|
-
border: 1px #E5B2B5 solid;
|
|
462
465
|
img{
|
|
463
466
|
margin: 15px 20px;
|
|
464
467
|
width: 18px;
|