react_hsbc_teller 1.2.6 → 1.2.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.
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/foot/foot.jsx +12 -2
- package/packages/pages/video/video.jsx +422 -200
- package/packages/pages/video/video.less +2 -2
|
@@ -35,6 +35,9 @@ let pictureInPictureVideo
|
|
|
35
35
|
let mix_stream
|
|
36
36
|
let worker
|
|
37
37
|
let streamShare
|
|
38
|
+
let muteJson = new Map()
|
|
39
|
+
let dateTime = 0
|
|
40
|
+
let messageValue = ''
|
|
38
41
|
message.config({
|
|
39
42
|
getContainer: ()=>document.getElementById('allHSBC')
|
|
40
43
|
})
|
|
@@ -264,7 +267,7 @@ class Video extends Component {
|
|
|
264
267
|
let result = await API.mpaasSig({ account: data.account, type: data.type });
|
|
265
268
|
console.log(result);
|
|
266
269
|
window.sessionStorage.setItem('alimpassSig', result.mpsSig);
|
|
267
|
-
this.state.workSpaceId = result.
|
|
270
|
+
this.state.workSpaceId = result.workspaceId,
|
|
268
271
|
this.state.appId = result.appId,
|
|
269
272
|
this.state.bizName = result.bizName
|
|
270
273
|
// const data1={
|
|
@@ -385,30 +388,19 @@ class Video extends Component {
|
|
|
385
388
|
fontSize: 16, // 字体⼤⼩
|
|
386
389
|
url: '' // ⽔印图⽚ HTTP 地址
|
|
387
390
|
},
|
|
388
|
-
{
|
|
389
|
-
tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
|
|
390
|
-
type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
391
|
-
id: 2, // ⽔印 ID
|
|
392
|
-
enable: true,
|
|
393
|
-
xPosition: 10, // x 轴位置
|
|
394
|
-
yPosition: 50, // y 轴位置
|
|
395
|
-
text: this.state.contentDress, // ⽔印⽂字
|
|
396
|
-
fontSize: 16, // 字体⼤⼩
|
|
397
|
-
url: '' // ⽔印图⽚ HTTP 地址
|
|
398
|
-
}
|
|
399
391
|
];
|
|
400
392
|
recordParam.tagPositions = [
|
|
401
393
|
{
|
|
402
394
|
tag: 'projectionWhiteboard',
|
|
403
395
|
xPosition: 0,
|
|
404
|
-
yPosition:
|
|
405
|
-
width:
|
|
406
|
-
height:
|
|
396
|
+
yPosition: 270,
|
|
397
|
+
width: 1280,
|
|
398
|
+
height: 720
|
|
407
399
|
},
|
|
408
400
|
{
|
|
409
401
|
tag: 'VIDEO_SOURCE_SCREEN',
|
|
410
|
-
xPosition:
|
|
411
|
-
yPosition:
|
|
402
|
+
xPosition: 1280,
|
|
403
|
+
yPosition: 630,
|
|
412
404
|
width: 640,
|
|
413
405
|
height: 360
|
|
414
406
|
},
|
|
@@ -416,86 +408,86 @@ class Video extends Component {
|
|
|
416
408
|
tag: 'tag1',
|
|
417
409
|
xPosition: 0,
|
|
418
410
|
yPosition: 0,
|
|
419
|
-
width:
|
|
411
|
+
width: 310,
|
|
420
412
|
height: 180
|
|
421
413
|
},
|
|
422
414
|
{
|
|
423
415
|
tag: 'customer1',
|
|
424
|
-
xPosition:
|
|
416
|
+
xPosition: 320,
|
|
425
417
|
yPosition: 0,
|
|
426
|
-
width:
|
|
418
|
+
width: 310,
|
|
427
419
|
height: 180
|
|
428
420
|
},
|
|
429
421
|
{
|
|
430
422
|
tag: 'customer2',
|
|
431
|
-
xPosition:
|
|
423
|
+
xPosition: 640,
|
|
432
424
|
yPosition: 0,
|
|
433
|
-
width:
|
|
425
|
+
width: 310,
|
|
434
426
|
height: 180
|
|
435
427
|
},
|
|
436
428
|
{
|
|
437
429
|
tag: 'customer3',
|
|
438
|
-
xPosition:
|
|
430
|
+
xPosition: 960,
|
|
439
431
|
yPosition: 0,
|
|
440
|
-
width:
|
|
432
|
+
width: 310,
|
|
441
433
|
height: 180
|
|
442
434
|
},
|
|
443
435
|
{
|
|
444
436
|
tag: 'customer4',
|
|
445
|
-
xPosition:
|
|
437
|
+
xPosition: 1280,
|
|
446
438
|
yPosition: 0,
|
|
447
|
-
width:
|
|
439
|
+
width: 310,
|
|
448
440
|
height: 180
|
|
449
441
|
},
|
|
450
442
|
{
|
|
451
443
|
tag: 'customer5',
|
|
452
|
-
xPosition:
|
|
453
|
-
yPosition: 0,
|
|
454
|
-
width: 240,
|
|
455
|
-
height: 180
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
tag: 'customer6',
|
|
459
|
-
xPosition: 1440,
|
|
444
|
+
xPosition: 1600,
|
|
460
445
|
yPosition: 0,
|
|
461
|
-
width:
|
|
446
|
+
width: 310,
|
|
462
447
|
height: 180
|
|
463
448
|
},
|
|
464
|
-
{
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}
|
|
449
|
+
// {
|
|
450
|
+
// tag: 'customer6',
|
|
451
|
+
// xPosition: 1440,
|
|
452
|
+
// yPosition: 0,
|
|
453
|
+
// width: 240,
|
|
454
|
+
// height: 180
|
|
455
|
+
// },
|
|
456
|
+
// {
|
|
457
|
+
// tag: 'customer7',
|
|
458
|
+
// xPosition: 1680,
|
|
459
|
+
// yPosition: 0,
|
|
460
|
+
// width: 240,
|
|
461
|
+
// height: 180
|
|
462
|
+
// },
|
|
463
|
+
// {
|
|
464
|
+
// tag: 'customer8',
|
|
465
|
+
// xPosition: 1680,
|
|
466
|
+
// yPosition: 180,
|
|
467
|
+
// width: 240,
|
|
468
|
+
// height: 180
|
|
469
|
+
// },
|
|
470
|
+
// {
|
|
471
|
+
// tag: 'customer9',
|
|
472
|
+
// xPosition: 1680,
|
|
473
|
+
// yPosition: 360,
|
|
474
|
+
// width: 240,
|
|
475
|
+
// height: 180
|
|
476
|
+
// },
|
|
477
|
+
// {
|
|
478
|
+
// tag: 'customer10',
|
|
479
|
+
// xPosition: 1680,
|
|
480
|
+
// yPosition: 540,
|
|
481
|
+
// width: 240,
|
|
482
|
+
// height: 180
|
|
483
|
+
// },
|
|
484
|
+
// {
|
|
485
|
+
// tag: 'customer11',
|
|
486
|
+
// xPosition: 1680,
|
|
487
|
+
// yPosition: 720,
|
|
488
|
+
// width: 240,
|
|
489
|
+
// height: 180
|
|
490
|
+
// }
|
|
499
491
|
]
|
|
500
492
|
console.log('recordParam', recordParam);
|
|
501
493
|
this.test_controller.StartRemoteRecord(filePath, recordParam, '')
|
|
@@ -795,23 +787,46 @@ class Video extends Component {
|
|
|
795
787
|
}
|
|
796
788
|
messageClick=(value,valueOne)=>{
|
|
797
789
|
console.log(value,valueOne)
|
|
798
|
-
if(
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
790
|
+
if(messageValue != value){
|
|
791
|
+
messageValue = value
|
|
792
|
+
dateTime = new Date().getTime()
|
|
793
|
+
if(valueOne == 'error') {
|
|
794
|
+
message.error({
|
|
795
|
+
content: value,
|
|
796
|
+
icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
|
|
797
|
+
className: 'errorClassName',
|
|
798
|
+
top: 200,
|
|
799
|
+
duration: 10
|
|
800
|
+
})
|
|
801
|
+
} else if(valueOne == 'success') {
|
|
802
|
+
message.success({
|
|
803
|
+
content: value,
|
|
804
|
+
icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
|
|
805
|
+
className: 'successClassName',
|
|
806
|
+
top: 200,
|
|
807
|
+
duration: 10
|
|
808
|
+
})
|
|
809
|
+
}
|
|
810
|
+
} else if(((new Date().getTime()) - dateTime) / 1000 > 30){
|
|
811
|
+
dateTime = new Date().getTime()
|
|
812
|
+
if(valueOne == 'error') {
|
|
813
|
+
message.error({
|
|
814
|
+
content: value,
|
|
815
|
+
icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
|
|
816
|
+
className: 'errorClassName',
|
|
817
|
+
top: 200,
|
|
818
|
+
duration: 10
|
|
819
|
+
})
|
|
820
|
+
} else if(valueOne == 'success') {
|
|
821
|
+
message.success({
|
|
822
|
+
content: value,
|
|
823
|
+
icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
|
|
824
|
+
className: 'successClassName',
|
|
825
|
+
top: 200,
|
|
826
|
+
duration: 10
|
|
827
|
+
})
|
|
828
|
+
}
|
|
829
|
+
}
|
|
815
830
|
|
|
816
831
|
}
|
|
817
832
|
// 人脸识别
|
|
@@ -1443,7 +1458,9 @@ class Video extends Component {
|
|
|
1443
1458
|
|
|
1444
1459
|
} else if (Mival.typeId == 3100) {
|
|
1445
1460
|
if (Mival.data.sessionId == this.state.sessionId) {
|
|
1461
|
+
muteJson.set(Mival.data.userId, JSON.stringify(Mival))
|
|
1446
1462
|
if (Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
|
|
1463
|
+
muteJson.delete(Mival.data.userId)
|
|
1447
1464
|
if (Mival.muteStatus == 0) {
|
|
1448
1465
|
this.setState({
|
|
1449
1466
|
voiceVideoOne: false
|
|
@@ -1456,6 +1473,7 @@ class Video extends Component {
|
|
|
1456
1473
|
|
|
1457
1474
|
}
|
|
1458
1475
|
if (Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
|
|
1476
|
+
muteJson.delete(Mival.data.userId)
|
|
1459
1477
|
if (Mival.muteStatus == 0) {
|
|
1460
1478
|
this.setState({
|
|
1461
1479
|
voiceVideoTwo: false
|
|
@@ -1468,6 +1486,7 @@ class Video extends Component {
|
|
|
1468
1486
|
|
|
1469
1487
|
}
|
|
1470
1488
|
if (Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
|
|
1489
|
+
muteJson.delete(Mival.data.userId)
|
|
1471
1490
|
if (Mival.muteStatus == 0) {
|
|
1472
1491
|
this.setState({
|
|
1473
1492
|
voiceVideoThree: false
|
|
@@ -1480,6 +1499,7 @@ class Video extends Component {
|
|
|
1480
1499
|
|
|
1481
1500
|
}
|
|
1482
1501
|
if (Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
|
|
1502
|
+
muteJson.delete(Mival.data.userId)
|
|
1483
1503
|
if (Mival.muteStatus == 0) {
|
|
1484
1504
|
this.setState({
|
|
1485
1505
|
voiceVideoFour: false
|
|
@@ -1492,6 +1512,7 @@ class Video extends Component {
|
|
|
1492
1512
|
|
|
1493
1513
|
}
|
|
1494
1514
|
if (Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
|
|
1515
|
+
muteJson.delete(Mival.data.userId)
|
|
1495
1516
|
if (Mival.muteStatus == 0) {
|
|
1496
1517
|
this.setState({
|
|
1497
1518
|
voiceVideoFive: false
|
|
@@ -1504,6 +1525,7 @@ class Video extends Component {
|
|
|
1504
1525
|
|
|
1505
1526
|
}
|
|
1506
1527
|
if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
1528
|
+
muteJson.delete(Mival.data.userId)
|
|
1507
1529
|
if (Mival.muteStatus == 0) {
|
|
1508
1530
|
this.setState({
|
|
1509
1531
|
voiceVideoSix: false
|
|
@@ -1516,31 +1538,8 @@ class Video extends Component {
|
|
|
1516
1538
|
|
|
1517
1539
|
}
|
|
1518
1540
|
|
|
1519
|
-
if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
1520
|
-
if (Mival.muteStatus == 0) {
|
|
1521
|
-
this.setState({
|
|
1522
|
-
voiceVideoSix: false
|
|
1523
|
-
})
|
|
1524
|
-
} else if (Mival.muteStatus == 1) {
|
|
1525
|
-
this.setState({
|
|
1526
|
-
voiceVideoSix: true
|
|
1527
|
-
})
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
}
|
|
1531
|
-
if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
1532
|
-
if (Mival.muteStatus == 0) {
|
|
1533
|
-
this.setState({
|
|
1534
|
-
voiceVideoSix: false
|
|
1535
|
-
})
|
|
1536
|
-
} else if (Mival.muteStatus == 1) {
|
|
1537
|
-
this.setState({
|
|
1538
|
-
voiceVideoSix: true
|
|
1539
|
-
})
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
}
|
|
1543
1541
|
if (Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
|
|
1542
|
+
muteJson.delete(Mival.data.userId)
|
|
1544
1543
|
if (Mival.muteStatus == 0) {
|
|
1545
1544
|
this.setState({
|
|
1546
1545
|
voiceVideoSeven: false
|
|
@@ -1553,6 +1552,7 @@ class Video extends Component {
|
|
|
1553
1552
|
|
|
1554
1553
|
}
|
|
1555
1554
|
if (Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
|
|
1555
|
+
muteJson.delete(Mival.data.userId)
|
|
1556
1556
|
if (Mival.muteStatus == 0) {
|
|
1557
1557
|
this.setState({
|
|
1558
1558
|
voiceVideoEight: false
|
|
@@ -1565,6 +1565,7 @@ class Video extends Component {
|
|
|
1565
1565
|
|
|
1566
1566
|
}
|
|
1567
1567
|
if (Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
|
|
1568
|
+
muteJson.delete(Mival.data.userId)
|
|
1568
1569
|
if (Mival.muteStatus == 0) {
|
|
1569
1570
|
this.setState({
|
|
1570
1571
|
voiceVideoNine: false
|
|
@@ -1577,6 +1578,7 @@ class Video extends Component {
|
|
|
1577
1578
|
|
|
1578
1579
|
}
|
|
1579
1580
|
if (Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
|
|
1581
|
+
muteJson.delete(Mival.data.userId)
|
|
1580
1582
|
if (Mival.muteStatus == 0) {
|
|
1581
1583
|
this.setState({
|
|
1582
1584
|
voiceVideoTen: false
|
|
@@ -1589,6 +1591,7 @@ class Video extends Component {
|
|
|
1589
1591
|
|
|
1590
1592
|
}
|
|
1591
1593
|
if (Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
|
|
1594
|
+
muteJson.delete(Mival.data.userId)
|
|
1592
1595
|
if (Mival.muteStatus == 0) {
|
|
1593
1596
|
this.setState({
|
|
1594
1597
|
voiceVideoEleven: false
|
|
@@ -1601,6 +1604,7 @@ class Video extends Component {
|
|
|
1601
1604
|
|
|
1602
1605
|
}
|
|
1603
1606
|
if (Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
|
|
1607
|
+
muteJson.delete(Mival.data.userId)
|
|
1604
1608
|
if (Mival.muteStatus == 0) {
|
|
1605
1609
|
this.setState({
|
|
1606
1610
|
voiceVideoTwelve: false
|
|
@@ -1873,6 +1877,12 @@ class Video extends Component {
|
|
|
1873
1877
|
};
|
|
1874
1878
|
this.mpaasSig(data);
|
|
1875
1879
|
};
|
|
1880
|
+
this.test_controller.OnSendTextMsgSucc = (msgId)=>{
|
|
1881
|
+
console.log('发送成功',msgId)
|
|
1882
|
+
}
|
|
1883
|
+
this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
|
|
1884
|
+
console.log('发送失败',msgId,code, msg)
|
|
1885
|
+
}
|
|
1876
1886
|
// 发布媒体流成功
|
|
1877
1887
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
1878
1888
|
console.log('发布媒体流成功', sid)
|
|
@@ -1901,6 +1911,16 @@ class Video extends Component {
|
|
|
1901
1911
|
this.timer = setInterval(
|
|
1902
1912
|
() => {
|
|
1903
1913
|
if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0.1) {
|
|
1914
|
+
// this.test_controller.SendTextMsg(JSON.stringify({
|
|
1915
|
+
// 'typeId': 3200,
|
|
1916
|
+
// 'decibelValue': this.state.analyserHeight.get(sid).toFixed(2),
|
|
1917
|
+
// "data": {
|
|
1918
|
+
// 'sessionId': this.state.sessionId,
|
|
1919
|
+
// 'userId': this.props.tellerAccount,
|
|
1920
|
+
// 'data': (new Date()).valueOf()
|
|
1921
|
+
// }
|
|
1922
|
+
|
|
1923
|
+
// }))
|
|
1904
1924
|
callNimIM('sendCustomCmdMsg', {
|
|
1905
1925
|
customId: this.state.imRoomId,
|
|
1906
1926
|
content: JSON.stringify({
|
|
@@ -1935,6 +1955,171 @@ class Video extends Component {
|
|
|
1935
1955
|
this.test_controller.OnSubscribeSucc = (feed, sid) => {
|
|
1936
1956
|
console.log('订阅媒体流成功', feed, sid);
|
|
1937
1957
|
this.appGetUsername(sid)
|
|
1958
|
+
console.log(muteJson,muteJson.size)
|
|
1959
|
+
if(muteJson.size > 0) {
|
|
1960
|
+
let userId = ''
|
|
1961
|
+
if (muteJson.get(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid)) {
|
|
1962
|
+
userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid
|
|
1963
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
1964
|
+
this.setState({
|
|
1965
|
+
voiceVideoOne: false
|
|
1966
|
+
})
|
|
1967
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
1968
|
+
this.setState({
|
|
1969
|
+
voiceVideoOne: true
|
|
1970
|
+
})
|
|
1971
|
+
}
|
|
1972
|
+
muteJson.delete(userId)
|
|
1973
|
+
}
|
|
1974
|
+
if (muteJson.get(document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
|
|
1975
|
+
userId = document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : ''
|
|
1976
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
1977
|
+
this.setState({
|
|
1978
|
+
voiceVideoTwo: false
|
|
1979
|
+
})
|
|
1980
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
1981
|
+
this.setState({
|
|
1982
|
+
voiceVideoTwo: true
|
|
1983
|
+
})
|
|
1984
|
+
}
|
|
1985
|
+
muteJson.delete(userId)
|
|
1986
|
+
}
|
|
1987
|
+
if (muteJson.get(document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
|
|
1988
|
+
userId = document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : ''
|
|
1989
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
1990
|
+
this.setState({
|
|
1991
|
+
voiceVideoThree: false
|
|
1992
|
+
})
|
|
1993
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
1994
|
+
this.setState({
|
|
1995
|
+
voiceVideoThree: true
|
|
1996
|
+
})
|
|
1997
|
+
}
|
|
1998
|
+
muteJson.delete(userId)
|
|
1999
|
+
}
|
|
2000
|
+
if (muteJson.get(document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
|
|
2001
|
+
userId = document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : ''
|
|
2002
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2003
|
+
this.setState({
|
|
2004
|
+
voiceVideoFour: false
|
|
2005
|
+
})
|
|
2006
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2007
|
+
this.setState({
|
|
2008
|
+
voiceVideoFour: true
|
|
2009
|
+
})
|
|
2010
|
+
}
|
|
2011
|
+
muteJson.delete(userId)
|
|
2012
|
+
}
|
|
2013
|
+
if (muteJson.get(document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
|
|
2014
|
+
userId = document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : ''
|
|
2015
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2016
|
+
this.setState({
|
|
2017
|
+
voiceVideoFive: false
|
|
2018
|
+
})
|
|
2019
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2020
|
+
this.setState({
|
|
2021
|
+
voiceVideoFive: true
|
|
2022
|
+
})
|
|
2023
|
+
}
|
|
2024
|
+
muteJson.delete(userId)
|
|
2025
|
+
}
|
|
2026
|
+
if (muteJson.get(document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
|
|
2027
|
+
userId = document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : ''
|
|
2028
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2029
|
+
this.setState({
|
|
2030
|
+
voiceVideoSix: false
|
|
2031
|
+
})
|
|
2032
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2033
|
+
this.setState({
|
|
2034
|
+
voiceVideoSix: true
|
|
2035
|
+
})
|
|
2036
|
+
}
|
|
2037
|
+
muteJson.delete(userId)
|
|
2038
|
+
}
|
|
2039
|
+
if (muteJson.get(document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
|
|
2040
|
+
userId = document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : ''
|
|
2041
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2042
|
+
this.setState({
|
|
2043
|
+
voiceVideoSeven: false
|
|
2044
|
+
})
|
|
2045
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2046
|
+
this.setState({
|
|
2047
|
+
voiceVideoSeven: true
|
|
2048
|
+
})
|
|
2049
|
+
}
|
|
2050
|
+
muteJson.delete(userId)
|
|
2051
|
+
}
|
|
2052
|
+
if (muteJson.get(document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
|
|
2053
|
+
userId = document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : ''
|
|
2054
|
+
|
|
2055
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2056
|
+
this.setState({
|
|
2057
|
+
voiceVideoEight: false
|
|
2058
|
+
})
|
|
2059
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2060
|
+
this.setState({
|
|
2061
|
+
voiceVideoEight: true
|
|
2062
|
+
})
|
|
2063
|
+
}
|
|
2064
|
+
muteJson.delete(userId)
|
|
2065
|
+
}
|
|
2066
|
+
if (muteJson.get(document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
|
|
2067
|
+
userId = document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : ''
|
|
2068
|
+
|
|
2069
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2070
|
+
this.setState({
|
|
2071
|
+
voiceVideoNine: false
|
|
2072
|
+
})
|
|
2073
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2074
|
+
this.setState({
|
|
2075
|
+
voiceVideoNine: true
|
|
2076
|
+
})
|
|
2077
|
+
}
|
|
2078
|
+
muteJson.delete(userId)
|
|
2079
|
+
}
|
|
2080
|
+
if (muteJson.get(document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
|
|
2081
|
+
userId = document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : ''
|
|
2082
|
+
|
|
2083
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2084
|
+
this.setState({
|
|
2085
|
+
voiceVideoTen: false
|
|
2086
|
+
})
|
|
2087
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2088
|
+
this.setState({
|
|
2089
|
+
voiceVideoTen: true
|
|
2090
|
+
})
|
|
2091
|
+
}
|
|
2092
|
+
muteJson.delete(userId)
|
|
2093
|
+
}
|
|
2094
|
+
if (muteJson.get(document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
|
|
2095
|
+
userId = document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : ''
|
|
2096
|
+
|
|
2097
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2098
|
+
this.setState({
|
|
2099
|
+
voiceVideoEleven: false
|
|
2100
|
+
})
|
|
2101
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2102
|
+
this.setState({
|
|
2103
|
+
voiceVideoEleven: true
|
|
2104
|
+
})
|
|
2105
|
+
}
|
|
2106
|
+
muteJson.delete(userId)
|
|
2107
|
+
}
|
|
2108
|
+
if (muteJson.get(document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
|
|
2109
|
+
userId = document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : ''
|
|
2110
|
+
if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
|
|
2111
|
+
this.setState({
|
|
2112
|
+
voiceVideoTwelve: false
|
|
2113
|
+
})
|
|
2114
|
+
} else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
|
|
2115
|
+
this.setState({
|
|
2116
|
+
voiceVideoTwelve: true
|
|
2117
|
+
})
|
|
2118
|
+
}
|
|
2119
|
+
muteJson.delete(userId)
|
|
2120
|
+
}
|
|
2121
|
+
console.log(muteJson,muteJson.length)
|
|
2122
|
+
}
|
|
1938
2123
|
};
|
|
1939
2124
|
// 订阅媒体流失败
|
|
1940
2125
|
this.test_controller.OnSubscribeFailed = (
|
|
@@ -1947,6 +2132,7 @@ class Video extends Component {
|
|
|
1947
2132
|
// 推送“房间与会者列表”给新加⼊者
|
|
1948
2133
|
this.test_controller.OnRoomAttendanceList = (participants) => {
|
|
1949
2134
|
console.log('房间与会者列表', participants)
|
|
2135
|
+
setTimeout(() => {
|
|
1950
2136
|
participants.map((item, index) => {
|
|
1951
2137
|
if (item.uid != this.state.tellerAccount) {
|
|
1952
2138
|
item.publish.map((itemOne, indexOne) => {
|
|
@@ -1975,6 +2161,21 @@ class Video extends Component {
|
|
|
1975
2161
|
name: '客户投屏'
|
|
1976
2162
|
}, 'add'
|
|
1977
2163
|
)
|
|
2164
|
+
} else if (itemOne.tag == 'projectionWhiteboard') {
|
|
2165
|
+
config_param = {
|
|
2166
|
+
subscribe_video_id: 'video20',
|
|
2167
|
+
subscribe_audio_id: 'audio20',
|
|
2168
|
+
subscribe_streamId_id: 'subscribe_streamId20',
|
|
2169
|
+
feedId_id: 'feedId20',
|
|
2170
|
+
feedId: itemOne.feedId
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
this.tabTitlesClick(
|
|
2174
|
+
{
|
|
2175
|
+
value: 'staffScreen',
|
|
2176
|
+
name: 'internal staff 投屏'
|
|
2177
|
+
}, 'add'
|
|
2178
|
+
)
|
|
1978
2179
|
} else {
|
|
1979
2180
|
if (!document.getElementById('video1').name) {
|
|
1980
2181
|
config_param = {
|
|
@@ -2089,11 +2290,14 @@ class Video extends Component {
|
|
|
2089
2290
|
if (config_param !== undefined) {
|
|
2090
2291
|
config_param.need_volume_analyser = true
|
|
2091
2292
|
console.log(config_param)
|
|
2092
|
-
|
|
2293
|
+
|
|
2294
|
+
this.test_controller.Subscribe(config_param)
|
|
2295
|
+
|
|
2093
2296
|
}
|
|
2094
2297
|
})
|
|
2095
2298
|
}
|
|
2096
2299
|
})
|
|
2300
|
+
}, 2000);
|
|
2097
2301
|
};
|
|
2098
2302
|
// 推送“新加⼊房间者”给与会者
|
|
2099
2303
|
this.test_controller.OnNewJoinerIn = (participant) => {
|
|
@@ -2122,12 +2326,11 @@ class Video extends Component {
|
|
|
2122
2326
|
})
|
|
2123
2327
|
}, function (code, message, data) {
|
|
2124
2328
|
})
|
|
2125
|
-
if(this.state.voiceStatue) {
|
|
2126
2329
|
callNimIM('sendCustomCmdMsg', {
|
|
2127
2330
|
customId: this.state.imRoomId,
|
|
2128
2331
|
content: JSON.stringify({
|
|
2129
2332
|
'typeId': 1013,
|
|
2130
|
-
'muteStatus': 1,
|
|
2333
|
+
'muteStatus': this.state.voiceStatue ? 1 : 0,
|
|
2131
2334
|
'data': {
|
|
2132
2335
|
'sessionId': this.state.sessionId,
|
|
2133
2336
|
'userId': this.props.tellerAccount
|
|
@@ -2136,7 +2339,7 @@ class Video extends Component {
|
|
|
2136
2339
|
}, function (code, message, data) {
|
|
2137
2340
|
console.log(data)
|
|
2138
2341
|
})
|
|
2139
|
-
|
|
2342
|
+
setTimeout(() => {
|
|
2140
2343
|
let array = this.state.roomCustomerList;
|
|
2141
2344
|
let newArray = [...array];
|
|
2142
2345
|
newArray.push({
|
|
@@ -2166,10 +2369,28 @@ class Video extends Component {
|
|
|
2166
2369
|
if (config_param !== undefined) {
|
|
2167
2370
|
config_param.need_volume_analyser = false
|
|
2168
2371
|
console.log(config_param)
|
|
2169
|
-
|
|
2372
|
+
this.test_controller.Subscribe(config_param)
|
|
2373
|
+
|
|
2374
|
+
}
|
|
2375
|
+
} else if (feed.tag == 'projectionWhiteboard') {
|
|
2376
|
+
config_param = {
|
|
2377
|
+
subscribe_video_id: 'video20',
|
|
2378
|
+
subscribe_audio_id: 'audio20',
|
|
2379
|
+
subscribe_streamId_id: 'subscribe_streamId20',
|
|
2380
|
+
feedId_id: 'feedId20',
|
|
2381
|
+
feedId: feed.feedId
|
|
2382
|
+
}
|
|
2170
2383
|
|
|
2384
|
+
this.tabTitlesClick(
|
|
2385
|
+
{
|
|
2386
|
+
value: 'staffScreen',
|
|
2387
|
+
name: 'internal staff 投屏'
|
|
2388
|
+
}, 'add'
|
|
2389
|
+
)
|
|
2390
|
+
if (config_param !== undefined) {
|
|
2391
|
+
config_param.need_volume_analyser = false
|
|
2392
|
+
console.log(config_param)
|
|
2171
2393
|
this.test_controller.Subscribe(config_param)
|
|
2172
|
-
}, 1000)
|
|
2173
2394
|
|
|
2174
2395
|
}
|
|
2175
2396
|
} else {
|
|
@@ -2303,7 +2524,9 @@ class Video extends Component {
|
|
|
2303
2524
|
config_param.need_volume_analyser = true
|
|
2304
2525
|
console.log(config_param)
|
|
2305
2526
|
|
|
2306
|
-
|
|
2527
|
+
|
|
2528
|
+
this.test_controller.Subscribe(config_param)
|
|
2529
|
+
|
|
2307
2530
|
|
|
2308
2531
|
}
|
|
2309
2532
|
// })
|
|
@@ -2312,7 +2535,7 @@ class Video extends Component {
|
|
|
2312
2535
|
}
|
|
2313
2536
|
|
|
2314
2537
|
}
|
|
2315
|
-
|
|
2538
|
+
}, 2000);
|
|
2316
2539
|
};
|
|
2317
2540
|
// 推送“有新订阅”给与会者
|
|
2318
2541
|
this.test_controller.OnNewSubscribe = (subscriber, feed) => {
|
|
@@ -2352,6 +2575,11 @@ class Video extends Component {
|
|
|
2352
2575
|
this.tabTitlesClick('customerScreen', 'delect')
|
|
2353
2576
|
}
|
|
2354
2577
|
}
|
|
2578
|
+
if (item.value == 'staffScreen') {
|
|
2579
|
+
if (!document.getElementById("video20").name) {
|
|
2580
|
+
this.tabTitlesClick('staffScreen', 'delect')
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2355
2583
|
})
|
|
2356
2584
|
if (!document.getElementById("video1").name) {
|
|
2357
2585
|
this.state.isPIBIntranet[0].type = false
|
|
@@ -2784,7 +3012,7 @@ class Video extends Component {
|
|
|
2784
3012
|
let number = 0
|
|
2785
3013
|
for (var i = 0; i < 40; i++) {
|
|
2786
3014
|
|
|
2787
|
-
let energy = (dataArray[step * i] / 256.0) *
|
|
3015
|
+
let energy = (dataArray[step * i] / 256.0) * 100;
|
|
2788
3016
|
number = number + energy
|
|
2789
3017
|
ctx.beginPath();
|
|
2790
3018
|
ctx.fillStyle = this.props.voiceColor;
|
|
@@ -2795,7 +3023,6 @@ class Video extends Component {
|
|
|
2795
3023
|
let startY = y1 - height // 绘制起始点y
|
|
2796
3024
|
ctx.fillRect(startX, startY, width, height)
|
|
2797
3025
|
if(document.getElementById('publish_video1').name == sid && i == 39) {
|
|
2798
|
-
console.log(number / 40 / 70,number / 40)
|
|
2799
3026
|
this.state.analyserHeight.set(sid,number / 40 / 70)
|
|
2800
3027
|
this.state.analyserHeight = this.state.analyserHeight
|
|
2801
3028
|
}
|
|
@@ -3221,64 +3448,71 @@ class Video extends Component {
|
|
|
3221
3448
|
}
|
|
3222
3449
|
};
|
|
3223
3450
|
sharedScreen = () => {
|
|
3224
|
-
console.log('投屏')
|
|
3451
|
+
console.log('投屏', this.state.tabTitles.find(el=>el.value == 'staffScreen'))
|
|
3225
3452
|
if (this.isFileSuccuse()) {
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
streamShare
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
publish_config.publish_device = 2
|
|
3234
|
-
// publish_config.video_profile_type = 1
|
|
3235
|
-
publish_config.video_profile_type=100
|
|
3236
|
-
publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3237
|
-
publish_config.enableDesktopAudio=true
|
|
3238
|
-
publish_config.degradationType=2
|
|
3239
|
-
publish_config.sid = document.getElementById('video20').name
|
|
3240
|
-
this.test_controller.ChangeMediaStream(publish_config)
|
|
3241
|
-
this.state.isScreenSwitching = true
|
|
3242
|
-
} else {
|
|
3243
|
-
if (document.getElementById('video20').name) {
|
|
3244
|
-
publish_config.media_type = 1;
|
|
3245
|
-
publish_config.publish_device = 2;
|
|
3246
|
-
publish_config.video_profile_type=100
|
|
3247
|
-
publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3248
|
-
publish_config.enableDesktopAudio=true
|
|
3249
|
-
publish_config.degradationType=2
|
|
3250
|
-
publish_config.sid = document.getElementById('video20').name;
|
|
3251
|
-
this.test_controller.ChangeMediaStream(publish_config);
|
|
3252
|
-
} else {
|
|
3453
|
+
if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
|
|
3454
|
+
const publish_config = {};
|
|
3455
|
+
if(streamShare) {
|
|
3456
|
+
streamShare.getTracks().forEach(track => track.stop());
|
|
3457
|
+
}
|
|
3458
|
+
if (this.state.isSharedScreen) {
|
|
3459
|
+
const publish_config = {}
|
|
3253
3460
|
publish_config.media_type = 1
|
|
3254
3461
|
publish_config.publish_device = 2
|
|
3255
|
-
publish_config.
|
|
3256
|
-
publish_config.video_profile_type=100
|
|
3257
|
-
publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3462
|
+
publish_config.video_profile_type = 1
|
|
3463
|
+
// publish_config.video_profile_type=100
|
|
3464
|
+
// publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3258
3465
|
publish_config.enableDesktopAudio=true
|
|
3259
3466
|
publish_config.degradationType=2
|
|
3260
|
-
publish_config.
|
|
3261
|
-
publish_config
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3467
|
+
publish_config.sid = document.getElementById('video20').name
|
|
3468
|
+
this.test_controller.ChangeMediaStream(publish_config)
|
|
3469
|
+
this.state.isScreenSwitching = true
|
|
3470
|
+
} else {
|
|
3471
|
+
if (document.getElementById('video20').name) {
|
|
3472
|
+
publish_config.media_type = 1;
|
|
3473
|
+
publish_config.publish_device = 2;
|
|
3474
|
+
publish_config.video_profile_type = 1
|
|
3475
|
+
// publish_config.video_profile_type=100
|
|
3476
|
+
// publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3477
|
+
publish_config.enableDesktopAudio=true
|
|
3478
|
+
publish_config.degradationType=2
|
|
3479
|
+
publish_config.sid = document.getElementById('video20').name;
|
|
3480
|
+
this.test_controller.ChangeMediaStream(publish_config);
|
|
3481
|
+
} else {
|
|
3482
|
+
publish_config.media_type = 1
|
|
3483
|
+
publish_config.publish_device = 2
|
|
3484
|
+
publish_config.need_volume_analyser = true
|
|
3485
|
+
publish_config.video_profile_type = 1
|
|
3486
|
+
// publish_config.video_profile_type=100
|
|
3487
|
+
// publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
|
|
3488
|
+
publish_config.enableDesktopAudio=true
|
|
3489
|
+
publish_config.degradationType=2
|
|
3490
|
+
publish_config.publish_video_id = 'video20'
|
|
3491
|
+
publish_config.publish_streamId_id = 'subscribe_streamId20'
|
|
3492
|
+
publish_config.publish_tag = 'projectionWhiteboard'
|
|
3493
|
+
this.test_controller.Publish(publish_config)
|
|
3494
|
+
}
|
|
3495
|
+
// this.state.isSharedScreen = true
|
|
3496
|
+
// this.state.isScreenSwitching = false
|
|
3497
|
+
this.setState({
|
|
3498
|
+
screenName: '切换共享',
|
|
3499
|
+
isPDF: false
|
|
3500
|
+
})
|
|
3501
|
+
this.tabTitlesClick(
|
|
3502
|
+
{
|
|
3503
|
+
value: 'RMScreen',
|
|
3504
|
+
name: '共享内容'
|
|
3505
|
+
}, 'add'
|
|
3506
|
+
)
|
|
3507
|
+
if (!this.state.isPictureInPicture) {
|
|
3508
|
+
this.pictureInPicture()
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3279
3511
|
}
|
|
3280
|
-
|
|
3512
|
+
} else {
|
|
3513
|
+
this.messageClick('internal staff正在共享屏幕,请先关闭','error')
|
|
3281
3514
|
}
|
|
3515
|
+
|
|
3282
3516
|
}
|
|
3283
3517
|
};
|
|
3284
3518
|
suspend = () => {
|
|
@@ -3772,35 +4006,19 @@ class Video extends Component {
|
|
|
3772
4006
|
this.signCanvas.current.canvas.drawing.toDataURL('image/png').replace(/data.+?;base64,/, "")
|
|
3773
4007
|
)
|
|
3774
4008
|
}
|
|
3775
|
-
switchExternalAge = ()=>{
|
|
3776
|
-
if(this.state.isSharedScreen) {
|
|
3777
|
-
this.state.isSharedScreen = false
|
|
3778
|
-
this.setState({
|
|
3779
|
-
|
|
3780
|
-
screenName: '共享模式'
|
|
3781
|
-
});
|
|
3782
|
-
this.tabTitlesClick('RMScreen', 'delect')
|
|
3783
|
-
if (this.state.isPictureInPicture) {
|
|
3784
|
-
document.exitPictureInPicture()
|
|
3785
|
-
}
|
|
3786
|
-
}
|
|
3787
|
-
|
|
3788
|
-
this.navigatorClick()
|
|
3789
4009
|
|
|
3790
|
-
}
|
|
3791
4010
|
navigatorClick=()=>{
|
|
3792
4011
|
const that = this
|
|
3793
4012
|
const publish_config = {};
|
|
3794
4013
|
const canvas = document.createElement('canvas');
|
|
3795
4014
|
const videoMedia = document.getElementById('manedvideo');
|
|
3796
4015
|
const cobj = canvas.getContext('2d'); // 获取绘图环境
|
|
3797
|
-
const left =document.getElementById("
|
|
4016
|
+
const left =document.getElementById("whiteboardDIV").getBoundingClientRect().left;
|
|
3798
4017
|
const right = document.getElementById("whiteboardDIV").getBoundingClientRect().right
|
|
3799
4018
|
const top = document.getElementById("whiteboardDIV").getBoundingClientRect().top
|
|
3800
4019
|
const bottom = document.getElementById("whiteboardDIV").getBoundingClientRect().bottom
|
|
3801
|
-
const width = right - left
|
|
3802
|
-
const height = bottom - top
|
|
3803
|
-
const x = left - 20 > 0 ? left - 20 : 0
|
|
4020
|
+
const width = right - left + 50
|
|
4021
|
+
const height = bottom - top
|
|
3804
4022
|
canvas.width = width;
|
|
3805
4023
|
canvas.height = height;
|
|
3806
4024
|
videoMedia.addEventListener('play', (event) =>{
|
|
@@ -3809,7 +4027,7 @@ class Video extends Component {
|
|
|
3809
4027
|
loop()
|
|
3810
4028
|
function loop() {
|
|
3811
4029
|
if (!$this.paused && !$this.ended) {
|
|
3812
|
-
cobj.drawImage(videoMedia,
|
|
4030
|
+
cobj.drawImage(videoMedia, left, top, width, height, 0, 0,width, height,);
|
|
3813
4031
|
setTimeout(loop, 1000 / 10); // drawing at 30fps
|
|
3814
4032
|
}
|
|
3815
4033
|
}
|
|
@@ -3844,6 +4062,9 @@ class Video extends Component {
|
|
|
3844
4062
|
preferCurrentTab:true,
|
|
3845
4063
|
})
|
|
3846
4064
|
.then((stream) => {
|
|
4065
|
+
if(streamShare) {
|
|
4066
|
+
streamShare.getTracks().forEach(track => track.stop());
|
|
4067
|
+
}
|
|
3847
4068
|
videoMedia.srcObject = stream;
|
|
3848
4069
|
stream.getVideoTracks()[0].applyConstraints({
|
|
3849
4070
|
width: document.body.offsetWidth,
|
|
@@ -3862,6 +4083,7 @@ class Video extends Component {
|
|
|
3862
4083
|
}
|
|
3863
4084
|
switchExternal = () => {
|
|
3864
4085
|
if (this.isFileSuccuse()) {
|
|
4086
|
+
if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
|
|
3865
4087
|
if (!this.state.isWhiteboard) {
|
|
3866
4088
|
this.setState({
|
|
3867
4089
|
isWhiteboard: true
|
|
@@ -3881,12 +4103,12 @@ class Video extends Component {
|
|
|
3881
4103
|
document.exitPictureInPicture()
|
|
3882
4104
|
}
|
|
3883
4105
|
}
|
|
3884
|
-
this.navigatorClick()
|
|
3885
|
-
} else {
|
|
3886
|
-
this.messageClick('当前已经切换RM白板','success')
|
|
3887
|
-
|
|
3888
4106
|
}
|
|
3889
|
-
|
|
4107
|
+
|
|
4108
|
+
this.navigatorClick()
|
|
4109
|
+
} else {
|
|
4110
|
+
this.messageClick('internal staff正在共享屏幕,请先关闭','error')
|
|
4111
|
+
}
|
|
3890
4112
|
}
|
|
3891
4113
|
}
|
|
3892
4114
|
switchSelect = (value) => {
|
|
@@ -4190,7 +4412,7 @@ class Video extends Component {
|
|
|
4190
4412
|
{/* <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" /> */}
|
|
4191
4413
|
<div id="whiteboardDIV" style={{height: 'calc(100% - 33px)'}}>
|
|
4192
4414
|
|
|
4193
|
-
<div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
|
|
4415
|
+
<div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen' || this.state.isSelect == 'staffScreen') ? '' : 'none', }}>
|
|
4194
4416
|
<div className="videoDiv">
|
|
4195
4417
|
<video
|
|
4196
4418
|
id="video20"
|
|
@@ -4677,7 +4899,7 @@ class Video extends Component {
|
|
|
4677
4899
|
invitationClick={this.invitationClick}
|
|
4678
4900
|
customerFaceClick={this.customerFaceClick}
|
|
4679
4901
|
ocrClick={this.ocrClick}
|
|
4680
|
-
switchExternal={this.
|
|
4902
|
+
switchExternal={this.switchExternal}
|
|
4681
4903
|
inspection={this.inspection}
|
|
4682
4904
|
></Foot>
|
|
4683
4905
|
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
@@ -4827,7 +5049,7 @@ sessionId: "",
|
|
|
4827
5049
|
microphoneSize: 25,
|
|
4828
5050
|
fontSize: '14',
|
|
4829
5051
|
fontFamily: 'auto',
|
|
4830
|
-
menus: ['SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
|
|
5052
|
+
menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
|
|
4831
5053
|
customLeaveRoom: '客户离开房间',
|
|
4832
5054
|
meetingInfo: {
|
|
4833
5055
|
title: '--',
|