react_hsbc_teller 0.2.6 → 0.2.7
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 +62 -20
- package/packages/pages/video/video.less +2 -1
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@ class Video extends Component {
|
|
|
52
52
|
voiceStatue: false,
|
|
53
53
|
voiceImg: voiceImgOpen,
|
|
54
54
|
isBigVideo: 'video1',
|
|
55
|
-
isCustomer:
|
|
55
|
+
isCustomer: true,
|
|
56
56
|
publishDevic: 1,
|
|
57
57
|
isSharedScreen: false,
|
|
58
58
|
isSuspend: false,
|
|
@@ -77,8 +77,8 @@ class Video extends Component {
|
|
|
77
77
|
createRoom = async () => {
|
|
78
78
|
try {
|
|
79
79
|
let result = await API.createRoom({
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
staffId: this.props.tellerAccount,
|
|
81
|
+
activityId: this.props.businessNumber,
|
|
82
82
|
callbackUrl: this.props.callbackUrl,
|
|
83
83
|
roomId: this.state.channelId,
|
|
84
84
|
mtoken: this.state.rtoken
|
|
@@ -447,7 +447,33 @@ class Video extends Component {
|
|
|
447
447
|
// })
|
|
448
448
|
// });
|
|
449
449
|
if (this.isFileSuccuse()) {
|
|
450
|
-
const
|
|
450
|
+
const list = []
|
|
451
|
+
if(document.getElementById('video1').name) {
|
|
452
|
+
list.push('video1')
|
|
453
|
+
}
|
|
454
|
+
if(document.getElementById('publish_video1').name) {
|
|
455
|
+
list.push('publish_video1')
|
|
456
|
+
}
|
|
457
|
+
if(document.getElementById('video2').name) {
|
|
458
|
+
list.push('video2')
|
|
459
|
+
}
|
|
460
|
+
if(document.getElementById('video3').name) {
|
|
461
|
+
list.push('video3')
|
|
462
|
+
}
|
|
463
|
+
if(document.getElementById('video4').name) {
|
|
464
|
+
list.push('video4')
|
|
465
|
+
}
|
|
466
|
+
if(document.getElementById('video5').name) {
|
|
467
|
+
list.push('video5')
|
|
468
|
+
}
|
|
469
|
+
if(document.getElementById('video6').name) {
|
|
470
|
+
list.push('video6')
|
|
471
|
+
}
|
|
472
|
+
if(document.getElementById('video10').name) {
|
|
473
|
+
list.push('video10')
|
|
474
|
+
}
|
|
475
|
+
console.log(list)
|
|
476
|
+
const width = 320 * list.length;
|
|
451
477
|
const height = 480;
|
|
452
478
|
const canvas = document.createElement('canvas');
|
|
453
479
|
const cobj = canvas.getContext('2d'); // 获取绘图环境
|
|
@@ -455,7 +481,9 @@ class Video extends Component {
|
|
|
455
481
|
canvas.height = height;
|
|
456
482
|
let interval = setInterval(() => {
|
|
457
483
|
cobj.clearRect(0, 0, width, height);
|
|
458
|
-
let
|
|
484
|
+
for(let i=0;i<list.length;i++){
|
|
485
|
+
|
|
486
|
+
let videoId = list[i];
|
|
459
487
|
let videoDiv = document.getElementById(videoId);
|
|
460
488
|
let videoWidth = videoDiv.videoWidth;
|
|
461
489
|
let videoHeight = videoDiv.videoHeight;
|
|
@@ -466,20 +494,34 @@ class Video extends Component {
|
|
|
466
494
|
} else {
|
|
467
495
|
newVideoHeight = videoHeight * 320 / videoWidth;
|
|
468
496
|
}
|
|
469
|
-
cobj.drawImage(videoDiv,
|
|
470
|
-
|
|
471
|
-
let subscribeVideo = 'video1';
|
|
472
|
-
let subscribeVideoDiv = document.getElementById(subscribeVideo);
|
|
473
|
-
let subscribeVideoDivWidth = subscribeVideoDiv.videoWidth;
|
|
474
|
-
let subscribeVideoDivHeight = subscribeVideoDiv.videoHeight;
|
|
475
|
-
let newVideoWidth1 = 320;
|
|
476
|
-
let newVideoHeight1 = 480;
|
|
477
|
-
if (subscribeVideoDivHeight * 320 / subscribeVideoDivWidth > 480) {
|
|
478
|
-
newVideoWidth1 = subscribeVideoDivWidth * 480 / subscribeVideoDivHeight;
|
|
479
|
-
} else {
|
|
480
|
-
newVideoHeight1 = subscribeVideoDivHeight * 320 / subscribeVideoDivWidth;
|
|
497
|
+
cobj.drawImage(videoDiv, 320 * i, 480 - newVideoHeight, 320, newVideoHeight);
|
|
481
498
|
}
|
|
482
|
-
cobj.
|
|
499
|
+
// cobj.clearRect(0, 0, width, height);
|
|
500
|
+
// let videoId = 'publish_video1';
|
|
501
|
+
// let videoDiv = document.getElementById(videoId);
|
|
502
|
+
// let videoWidth = videoDiv.videoWidth;
|
|
503
|
+
// let videoHeight = videoDiv.videoHeight;
|
|
504
|
+
// let newVideoWidth = 320;
|
|
505
|
+
// let newVideoHeight = 480;
|
|
506
|
+
// if (videoHeight * 320 / videoWidth > 480) {
|
|
507
|
+
// newVideoWidth = videoWidth * 480 / videoHeight;
|
|
508
|
+
// } else {
|
|
509
|
+
// newVideoHeight = videoHeight * 320 / videoWidth;
|
|
510
|
+
// }
|
|
511
|
+
// cobj.drawImage(videoDiv, 0, 480 - newVideoHeight, newVideoWidth, newVideoHeight);
|
|
512
|
+
|
|
513
|
+
// let subscribeVideo = 'video1';
|
|
514
|
+
// let subscribeVideoDiv = document.getElementById(subscribeVideo);
|
|
515
|
+
// let subscribeVideoDivWidth = subscribeVideoDiv.videoWidth;
|
|
516
|
+
// let subscribeVideoDivHeight = subscribeVideoDiv.videoHeight;
|
|
517
|
+
// let newVideoWidth1 = 320;
|
|
518
|
+
// let newVideoHeight1 = 480;
|
|
519
|
+
// if (subscribeVideoDivHeight * 320 / subscribeVideoDivWidth > 480) {
|
|
520
|
+
// newVideoWidth1 = subscribeVideoDivWidth * 480 / subscribeVideoDivHeight;
|
|
521
|
+
// } else {
|
|
522
|
+
// newVideoHeight1 = subscribeVideoDivHeight * 320 / subscribeVideoDivWidth;
|
|
523
|
+
// }
|
|
524
|
+
// cobj.drawImage(subscribeVideoDiv, 320, 480 - newVideoHeight1, newVideoWidth1, newVideoHeight1);
|
|
483
525
|
|
|
484
526
|
}, 100);
|
|
485
527
|
const captureStream = canvas.captureStream();
|
|
@@ -1694,7 +1736,7 @@ class Video extends Component {
|
|
|
1694
1736
|
<div style={{ display: (this.state.isPDF) ? '' : 'none', }} id="touBoxItem">
|
|
1695
1737
|
{pdfChildren}
|
|
1696
1738
|
</div>
|
|
1697
|
-
<div style={this.state.isPDF ? { display: 'none' } : {}}>
|
|
1739
|
+
<div className="videoDiv" style={this.state.isPDF ? { display: 'none' } : {}}>
|
|
1698
1740
|
<video
|
|
1699
1741
|
id="video10"
|
|
1700
1742
|
autoPlay
|
|
@@ -1916,7 +1958,7 @@ class Video extends Component {
|
|
|
1916
1958
|
></CanvasDraw>
|
|
1917
1959
|
</div>
|
|
1918
1960
|
</Modal>
|
|
1919
|
-
<video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="
|
|
1961
|
+
<video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="400" height="400"
|
|
1920
1962
|
webkit-playsinline="true" playsInline={true} x5-playsinline="x5-playsinline"
|
|
1921
1963
|
x-webkit-airplay="true"></video>
|
|
1922
1964
|
</Spin>
|