react_hsbc_teller 1.2.5 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,7 @@ let pictureInPictureVideo
35
35
  let mix_stream
36
36
  let worker
37
37
  let streamShare
38
+ let muteJson = new Map()
38
39
  message.config({
39
40
  getContainer: ()=>document.getElementById('allHSBC')
40
41
  })
@@ -310,6 +311,7 @@ class Video extends Component {
310
311
  // 初始化视频
311
312
  ConnectMRTC = () => {
312
313
  this.test_controller.SetLocalCodecType("H264")
314
+ this.test_controller.SetPublishWeakBitrateLimit(200);
313
315
  const config_param = {};
314
316
  config_param.auto_publish_subscribe = 4;
315
317
  config_param.media_type = 1;
@@ -1442,7 +1444,9 @@ class Video extends Component {
1442
1444
 
1443
1445
  } else if (Mival.typeId == 3100) {
1444
1446
  if (Mival.data.sessionId == this.state.sessionId) {
1447
+ muteJson.set(Mival.data.userId, JSON.stringify(Mival))
1445
1448
  if (Mival.data.userId == this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid) {
1449
+ muteJson.delete(Mival.data.userId)
1446
1450
  if (Mival.muteStatus == 0) {
1447
1451
  this.setState({
1448
1452
  voiceVideoOne: false
@@ -1455,6 +1459,7 @@ class Video extends Component {
1455
1459
 
1456
1460
  }
1457
1461
  if (Mival.data.userId == (document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
1462
+ muteJson.delete(Mival.data.userId)
1458
1463
  if (Mival.muteStatus == 0) {
1459
1464
  this.setState({
1460
1465
  voiceVideoTwo: false
@@ -1467,6 +1472,7 @@ class Video extends Component {
1467
1472
 
1468
1473
  }
1469
1474
  if (Mival.data.userId == (document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
1475
+ muteJson.delete(Mival.data.userId)
1470
1476
  if (Mival.muteStatus == 0) {
1471
1477
  this.setState({
1472
1478
  voiceVideoThree: false
@@ -1479,6 +1485,7 @@ class Video extends Component {
1479
1485
 
1480
1486
  }
1481
1487
  if (Mival.data.userId == (document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
1488
+ muteJson.delete(Mival.data.userId)
1482
1489
  if (Mival.muteStatus == 0) {
1483
1490
  this.setState({
1484
1491
  voiceVideoFour: false
@@ -1491,6 +1498,7 @@ class Video extends Component {
1491
1498
 
1492
1499
  }
1493
1500
  if (Mival.data.userId == (document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
1501
+ muteJson.delete(Mival.data.userId)
1494
1502
  if (Mival.muteStatus == 0) {
1495
1503
  this.setState({
1496
1504
  voiceVideoFive: false
@@ -1503,6 +1511,7 @@ class Video extends Component {
1503
1511
 
1504
1512
  }
1505
1513
  if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
1514
+ muteJson.delete(Mival.data.userId)
1506
1515
  if (Mival.muteStatus == 0) {
1507
1516
  this.setState({
1508
1517
  voiceVideoSix: false
@@ -1515,31 +1524,8 @@ class Video extends Component {
1515
1524
 
1516
1525
  }
1517
1526
 
1518
- if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
1519
- if (Mival.muteStatus == 0) {
1520
- this.setState({
1521
- voiceVideoSix: false
1522
- })
1523
- } else if (Mival.muteStatus == 1) {
1524
- this.setState({
1525
- voiceVideoSix: true
1526
- })
1527
- }
1528
-
1529
- }
1530
- if (Mival.data.userId == (document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
1531
- if (Mival.muteStatus == 0) {
1532
- this.setState({
1533
- voiceVideoSix: false
1534
- })
1535
- } else if (Mival.muteStatus == 1) {
1536
- this.setState({
1537
- voiceVideoSix: true
1538
- })
1539
- }
1540
-
1541
- }
1542
1527
  if (Mival.data.userId == (document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
1528
+ muteJson.delete(Mival.data.userId)
1543
1529
  if (Mival.muteStatus == 0) {
1544
1530
  this.setState({
1545
1531
  voiceVideoSeven: false
@@ -1552,6 +1538,7 @@ class Video extends Component {
1552
1538
 
1553
1539
  }
1554
1540
  if (Mival.data.userId == (document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
1541
+ muteJson.delete(Mival.data.userId)
1555
1542
  if (Mival.muteStatus == 0) {
1556
1543
  this.setState({
1557
1544
  voiceVideoEight: false
@@ -1564,6 +1551,7 @@ class Video extends Component {
1564
1551
 
1565
1552
  }
1566
1553
  if (Mival.data.userId == (document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
1554
+ muteJson.delete(Mival.data.userId)
1567
1555
  if (Mival.muteStatus == 0) {
1568
1556
  this.setState({
1569
1557
  voiceVideoNine: false
@@ -1576,6 +1564,7 @@ class Video extends Component {
1576
1564
 
1577
1565
  }
1578
1566
  if (Mival.data.userId == (document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
1567
+ muteJson.delete(Mival.data.userId)
1579
1568
  if (Mival.muteStatus == 0) {
1580
1569
  this.setState({
1581
1570
  voiceVideoTen: false
@@ -1588,6 +1577,7 @@ class Video extends Component {
1588
1577
 
1589
1578
  }
1590
1579
  if (Mival.data.userId == (document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
1580
+ muteJson.delete(Mival.data.userId)
1591
1581
  if (Mival.muteStatus == 0) {
1592
1582
  this.setState({
1593
1583
  voiceVideoEleven: false
@@ -1600,6 +1590,7 @@ class Video extends Component {
1600
1590
 
1601
1591
  }
1602
1592
  if (Mival.data.userId == (document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
1593
+ muteJson.delete(Mival.data.userId)
1603
1594
  if (Mival.muteStatus == 0) {
1604
1595
  this.setState({
1605
1596
  voiceVideoTwelve: false
@@ -1872,6 +1863,12 @@ class Video extends Component {
1872
1863
  };
1873
1864
  this.mpaasSig(data);
1874
1865
  };
1866
+ this.test_controller.OnSendTextMsgSucc = (msgId)=>{
1867
+ console.log('发送成功',msgId)
1868
+ }
1869
+ this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
1870
+ console.log('发送失败',msgId,code, msg)
1871
+ }
1875
1872
  // 发布媒体流成功
1876
1873
  this.test_controller.OnPublishSucc = (sid) => {
1877
1874
  console.log('发布媒体流成功', sid)
@@ -1900,6 +1897,16 @@ class Video extends Component {
1900
1897
  this.timer = setInterval(
1901
1898
  () => {
1902
1899
  if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0.1) {
1900
+ // this.test_controller.SendTextMsg(JSON.stringify({
1901
+ // 'typeId': 3200,
1902
+ // 'decibelValue': this.state.analyserHeight.get(sid).toFixed(2),
1903
+ // "data": {
1904
+ // 'sessionId': this.state.sessionId,
1905
+ // 'userId': this.props.tellerAccount,
1906
+ // 'data': (new Date()).valueOf()
1907
+ // }
1908
+
1909
+ // }))
1903
1910
  callNimIM('sendCustomCmdMsg', {
1904
1911
  customId: this.state.imRoomId,
1905
1912
  content: JSON.stringify({
@@ -1907,7 +1914,8 @@ class Video extends Component {
1907
1914
  'decibelValue': this.state.analyserHeight.get(sid).toFixed(2),
1908
1915
  "data": {
1909
1916
  'sessionId': this.state.sessionId,
1910
- 'userId': this.props.tellerAccount
1917
+ 'userId': this.props.tellerAccount,
1918
+ 'data': (new Date()).valueOf()
1911
1919
  }
1912
1920
 
1913
1921
  })
@@ -1933,6 +1941,171 @@ class Video extends Component {
1933
1941
  this.test_controller.OnSubscribeSucc = (feed, sid) => {
1934
1942
  console.log('订阅媒体流成功', feed, sid);
1935
1943
  this.appGetUsername(sid)
1944
+ console.log(muteJson,muteJson.size)
1945
+ if(muteJson.size > 0) {
1946
+ let userId = ''
1947
+ if (muteJson.get(this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid)) {
1948
+ userId = this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid
1949
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
1950
+ this.setState({
1951
+ voiceVideoOne: false
1952
+ })
1953
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
1954
+ this.setState({
1955
+ voiceVideoOne: true
1956
+ })
1957
+ }
1958
+ muteJson.delete(userId)
1959
+ }
1960
+ if (muteJson.get(document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : '')) {
1961
+ userId = document.getElementById("feedId2").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid : ''
1962
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
1963
+ this.setState({
1964
+ voiceVideoTwo: false
1965
+ })
1966
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
1967
+ this.setState({
1968
+ voiceVideoTwo: true
1969
+ })
1970
+ }
1971
+ muteJson.delete(userId)
1972
+ }
1973
+ if (muteJson.get(document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : '')) {
1974
+ userId = document.getElementById("feedId3").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid : ''
1975
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
1976
+ this.setState({
1977
+ voiceVideoThree: false
1978
+ })
1979
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
1980
+ this.setState({
1981
+ voiceVideoThree: true
1982
+ })
1983
+ }
1984
+ muteJson.delete(userId)
1985
+ }
1986
+ if (muteJson.get(document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : '')) {
1987
+ userId = document.getElementById("feedId4").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid : ''
1988
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
1989
+ this.setState({
1990
+ voiceVideoFour: false
1991
+ })
1992
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
1993
+ this.setState({
1994
+ voiceVideoFour: true
1995
+ })
1996
+ }
1997
+ muteJson.delete(userId)
1998
+ }
1999
+ if (muteJson.get(document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : '')) {
2000
+ userId = document.getElementById("feedId5").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid : ''
2001
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2002
+ this.setState({
2003
+ voiceVideoFive: false
2004
+ })
2005
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2006
+ this.setState({
2007
+ voiceVideoFive: true
2008
+ })
2009
+ }
2010
+ muteJson.delete(userId)
2011
+ }
2012
+ if (muteJson.get(document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : '')) {
2013
+ userId = document.getElementById("feedId6").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid : ''
2014
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2015
+ this.setState({
2016
+ voiceVideoSix: false
2017
+ })
2018
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2019
+ this.setState({
2020
+ voiceVideoSix: true
2021
+ })
2022
+ }
2023
+ muteJson.delete(userId)
2024
+ }
2025
+ if (muteJson.get(document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : '')) {
2026
+ userId = document.getElementById("feedId7").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid : ''
2027
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2028
+ this.setState({
2029
+ voiceVideoSeven: false
2030
+ })
2031
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2032
+ this.setState({
2033
+ voiceVideoSeven: true
2034
+ })
2035
+ }
2036
+ muteJson.delete(userId)
2037
+ }
2038
+ if (muteJson.get(document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : '')) {
2039
+ userId = document.getElementById("feedId8").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid : ''
2040
+
2041
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2042
+ this.setState({
2043
+ voiceVideoEight: false
2044
+ })
2045
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2046
+ this.setState({
2047
+ voiceVideoEight: true
2048
+ })
2049
+ }
2050
+ muteJson.delete(userId)
2051
+ }
2052
+ if (muteJson.get(document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : '')) {
2053
+ userId = document.getElementById("feedId9").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid : ''
2054
+
2055
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2056
+ this.setState({
2057
+ voiceVideoNine: false
2058
+ })
2059
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2060
+ this.setState({
2061
+ voiceVideoNine: true
2062
+ })
2063
+ }
2064
+ muteJson.delete(userId)
2065
+ }
2066
+ if (muteJson.get(document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : '')) {
2067
+ userId = document.getElementById("feedId10").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid : ''
2068
+
2069
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2070
+ this.setState({
2071
+ voiceVideoTen: false
2072
+ })
2073
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2074
+ this.setState({
2075
+ voiceVideoTen: true
2076
+ })
2077
+ }
2078
+ muteJson.delete(userId)
2079
+ }
2080
+ if (muteJson.get(document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : '')) {
2081
+ userId = document.getElementById("feedId11").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid : ''
2082
+
2083
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2084
+ this.setState({
2085
+ voiceVideoEleven: false
2086
+ })
2087
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2088
+ this.setState({
2089
+ voiceVideoEleven: true
2090
+ })
2091
+ }
2092
+ muteJson.delete(userId)
2093
+ }
2094
+ if (muteJson.get(document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : '')) {
2095
+ userId = document.getElementById("feedId12").innerText ? this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid : ''
2096
+ if (JSON.parse(muteJson.get(userId)).muteStatus == 0) {
2097
+ this.setState({
2098
+ voiceVideoTwelve: false
2099
+ })
2100
+ } else if (JSON.parse(muteJson.get(userId)).muteStatus == 1) {
2101
+ this.setState({
2102
+ voiceVideoTwelve: true
2103
+ })
2104
+ }
2105
+ muteJson.delete(userId)
2106
+ }
2107
+ console.log(muteJson,muteJson.length)
2108
+ }
1936
2109
  };
1937
2110
  // 订阅媒体流失败
1938
2111
  this.test_controller.OnSubscribeFailed = (
@@ -1945,6 +2118,7 @@ class Video extends Component {
1945
2118
  // 推送“房间与会者列表”给新加⼊者
1946
2119
  this.test_controller.OnRoomAttendanceList = (participants) => {
1947
2120
  console.log('房间与会者列表', participants)
2121
+ setTimeout(() => {
1948
2122
  participants.map((item, index) => {
1949
2123
  if (item.uid != this.state.tellerAccount) {
1950
2124
  item.publish.map((itemOne, indexOne) => {
@@ -2087,11 +2261,14 @@ class Video extends Component {
2087
2261
  if (config_param !== undefined) {
2088
2262
  config_param.need_volume_analyser = true
2089
2263
  console.log(config_param)
2090
- this.test_controller.Subscribe(config_param)
2264
+
2265
+ this.test_controller.Subscribe(config_param)
2266
+
2091
2267
  }
2092
2268
  })
2093
2269
  }
2094
2270
  })
2271
+ }, 2000);
2095
2272
  };
2096
2273
  // 推送“新加⼊房间者”给与会者
2097
2274
  this.test_controller.OnNewJoinerIn = (participant) => {
@@ -2120,12 +2297,11 @@ class Video extends Component {
2120
2297
  })
2121
2298
  }, function (code, message, data) {
2122
2299
  })
2123
- if(this.state.voiceStatue) {
2124
2300
  callNimIM('sendCustomCmdMsg', {
2125
2301
  customId: this.state.imRoomId,
2126
2302
  content: JSON.stringify({
2127
2303
  'typeId': 1013,
2128
- 'muteStatus': 1,
2304
+ 'muteStatus': this.state.voiceStatue ? 1 : 0,
2129
2305
  'data': {
2130
2306
  'sessionId': this.state.sessionId,
2131
2307
  'userId': this.props.tellerAccount
@@ -2134,7 +2310,7 @@ class Video extends Component {
2134
2310
  }, function (code, message, data) {
2135
2311
  console.log(data)
2136
2312
  })
2137
- }
2313
+ setTimeout(() => {
2138
2314
  let array = this.state.roomCustomerList;
2139
2315
  let newArray = [...array];
2140
2316
  newArray.push({
@@ -2301,7 +2477,9 @@ class Video extends Component {
2301
2477
  config_param.need_volume_analyser = true
2302
2478
  console.log(config_param)
2303
2479
 
2304
- this.test_controller.Subscribe(config_param)
2480
+
2481
+ this.test_controller.Subscribe(config_param)
2482
+
2305
2483
 
2306
2484
  }
2307
2485
  // })
@@ -2310,7 +2488,7 @@ class Video extends Component {
2310
2488
  }
2311
2489
 
2312
2490
  }
2313
-
2491
+ }, 2000);
2314
2492
  };
2315
2493
  // 推送“有新订阅”给与会者
2316
2494
  this.test_controller.OnNewSubscribe = (subscriber, feed) => {
@@ -2782,7 +2960,7 @@ class Video extends Component {
2782
2960
  let number = 0
2783
2961
  for (var i = 0; i < 40; i++) {
2784
2962
 
2785
- let energy = (dataArray[step * i] / 256.0) * 80;
2963
+ let energy = (dataArray[step * i] / 256.0) * 100;
2786
2964
  number = number + energy
2787
2965
  ctx.beginPath();
2788
2966
  ctx.fillStyle = this.props.voiceColor;
@@ -2793,7 +2971,6 @@ class Video extends Component {
2793
2971
  let startY = y1 - height // 绘制起始点y
2794
2972
  ctx.fillRect(startX, startY, width, height)
2795
2973
  if(document.getElementById('publish_video1').name == sid && i == 39) {
2796
- console.log(number / 40 / 70,number / 40)
2797
2974
  this.state.analyserHeight.set(sid,number / 40 / 70)
2798
2975
  this.state.analyserHeight = this.state.analyserHeight
2799
2976
  }
@@ -2857,7 +3034,6 @@ class Video extends Component {
2857
3034
  } catch (err) {
2858
3035
  console.error(err);
2859
3036
  if(err.status == 502 || err.status== 404) {
2860
- this.roomCallBack(2, '连接服务器失败','SYS-02')
2861
3037
  }
2862
3038
  }
2863
3039
  }
@@ -3771,35 +3947,19 @@ class Video extends Component {
3771
3947
  this.signCanvas.current.canvas.drawing.toDataURL('image/png').replace(/data.+?;base64,/, "")
3772
3948
  )
3773
3949
  }
3774
- switchExternalAge = ()=>{
3775
- if(this.state.isSharedScreen) {
3776
- this.state.isSharedScreen = false
3777
- this.setState({
3778
-
3779
- screenName: '共享模式'
3780
- });
3781
- this.tabTitlesClick('RMScreen', 'delect')
3782
- if (this.state.isPictureInPicture) {
3783
- document.exitPictureInPicture()
3784
- }
3785
- }
3786
3950
 
3787
- this.navigatorClick()
3788
-
3789
- }
3790
3951
  navigatorClick=()=>{
3791
3952
  const that = this
3792
3953
  const publish_config = {};
3793
3954
  const canvas = document.createElement('canvas');
3794
3955
  const videoMedia = document.getElementById('manedvideo');
3795
3956
  const cobj = canvas.getContext('2d'); // 获取绘图环境
3796
- const left =document.getElementById("allHSBC").getBoundingClientRect().left;
3957
+ const left =document.getElementById("whiteboardDIV").getBoundingClientRect().left;
3797
3958
  const right = document.getElementById("whiteboardDIV").getBoundingClientRect().right
3798
3959
  const top = document.getElementById("whiteboardDIV").getBoundingClientRect().top
3799
3960
  const bottom = document.getElementById("whiteboardDIV").getBoundingClientRect().bottom
3800
- const width = right - left
3801
- const height = bottom - top + 10
3802
- const x = left - 20 > 0 ? left - 20 : 0
3961
+ const width = right - left + 50
3962
+ const height = bottom - top
3803
3963
  canvas.width = width;
3804
3964
  canvas.height = height;
3805
3965
  videoMedia.addEventListener('play', (event) =>{
@@ -3808,7 +3968,7 @@ class Video extends Component {
3808
3968
  loop()
3809
3969
  function loop() {
3810
3970
  if (!$this.paused && !$this.ended) {
3811
- cobj.drawImage(videoMedia, x, top, width, height, 0, 0,width, height,);
3971
+ cobj.drawImage(videoMedia, left, top, width, height, 0, 0,width, height,);
3812
3972
  setTimeout(loop, 1000 / 10); // drawing at 30fps
3813
3973
  }
3814
3974
  }
@@ -3843,6 +4003,9 @@ class Video extends Component {
3843
4003
  preferCurrentTab:true,
3844
4004
  })
3845
4005
  .then((stream) => {
4006
+ if(streamShare) {
4007
+ streamShare.getTracks().forEach(track => track.stop());
4008
+ }
3846
4009
  videoMedia.srcObject = stream;
3847
4010
  stream.getVideoTracks()[0].applyConstraints({
3848
4011
  width: document.body.offsetWidth,
@@ -3880,12 +4043,9 @@ class Video extends Component {
3880
4043
  document.exitPictureInPicture()
3881
4044
  }
3882
4045
  }
3883
- this.navigatorClick()
3884
- } else {
3885
- this.messageClick('当前已经切换RM白板','success')
3886
-
3887
4046
  }
3888
-
4047
+
4048
+ this.navigatorClick()
3889
4049
  }
3890
4050
  }
3891
4051
  switchSelect = (value) => {
@@ -4196,6 +4356,7 @@ class Video extends Component {
4196
4356
  autoPlay
4197
4357
  muted={true}
4198
4358
  className="videoTab"
4359
+ disablePictureInPicture
4199
4360
  />
4200
4361
  <audio id="audio20" autoPlay />
4201
4362
  <label style={{ display: 'none' }} id="feedId20" type="text" />
@@ -4215,6 +4376,7 @@ class Video extends Component {
4215
4376
  autoPlay
4216
4377
  muted={true}
4217
4378
  className="videoTab"
4379
+ disablePictureInPicture
4218
4380
  />
4219
4381
  <audio id="audio21" autoPlay />
4220
4382
  <label style={{ display: 'none' }} id="feedId21" type="text" />
@@ -4265,18 +4427,21 @@ class Video extends Component {
4265
4427
  className={`publishVideoClass`}
4266
4428
  autoPlay
4267
4429
  muted={true}
4430
+ disablePictureInPicture
4268
4431
  />
4269
4432
  <label style={{ display: 'none' }} id="publish_streamId1" type="text" />
4270
4433
 
4271
4434
  <div id="publish_video_div" className={`tellerTitle titleSamlle`}>
4435
+ <div>
4272
4436
  {
4273
4437
  this.state.voiceStatue && <img
4274
4438
  alt=""
4275
4439
  src={require("../../assets/img/jingyin.png").default}
4276
- className="imgClassVoice voiceClass"
4440
+ className="voiceClass"
4277
4441
  />
4278
4442
  }
4279
4443
  <canvas style={{ display: (!this.state.voiceStatue) ? '' : 'none',width: '25px',height:'25px',marginTop: '4px' }} className="canvasClass" id="publish_volumeView" width="40" height="70"></canvas>
4444
+ </div>
4280
4445
  <div className='titleName' style={{ color: this.props.titleColor, fontSize: this.props.fontSize + 'px', fontFamily: this.props.fontFamily }}>{this.state.titleNameRm}</div>
4281
4446
  </div>
4282
4447
  </div>
@@ -4298,6 +4463,7 @@ class Video extends Component {
4298
4463
  id="video1"
4299
4464
  autoPlay
4300
4465
  muted={true}
4466
+ disablePictureInPicture
4301
4467
  className={`video1 ${this.state.noVideoOne ? 'isNoVideo' : ''}`}
4302
4468
  />
4303
4469
  <audio id="audio1" autoPlay />
@@ -4326,6 +4492,7 @@ class Video extends Component {
4326
4492
  <video
4327
4493
  id="video2"
4328
4494
  autoPlay
4495
+ disablePictureInPicture
4329
4496
  muted={true}
4330
4497
  className={`video ${this.state.noVideoTwo ? 'isNoVideo' : ''}`}
4331
4498
  />
@@ -4354,6 +4521,7 @@ class Video extends Component {
4354
4521
  id="video3"
4355
4522
  autoPlay
4356
4523
  muted={true}
4524
+ disablePictureInPicture
4357
4525
  className={`video ${this.state.noVideoThree ? 'isNoVideo' : ''}`}
4358
4526
  />
4359
4527
  <audio id="audio3" autoPlay />
@@ -4380,6 +4548,7 @@ class Video extends Component {
4380
4548
  id="video4"
4381
4549
  autoPlay
4382
4550
  muted={true}
4551
+ disablePictureInPicture
4383
4552
  className={`video ${this.state.noVideoFour ? 'isNoVideo' : ''}`}
4384
4553
  />
4385
4554
  <audio id="audio4" autoPlay />
@@ -4407,6 +4576,7 @@ class Video extends Component {
4407
4576
  id="video5"
4408
4577
  autoPlay
4409
4578
  muted={true}
4579
+ disablePictureInPicture
4410
4580
  className={`video ${this.state.noVideoFive ? 'isNoVideo' : ''}`}
4411
4581
  />
4412
4582
  <audio id="audio5" autoPlay />
@@ -4433,6 +4603,7 @@ class Video extends Component {
4433
4603
  id="video6"
4434
4604
  autoPlay
4435
4605
  muted={true}
4606
+ disablePictureInPicture
4436
4607
  className={`video ${this.state.noVideoSix ? 'isNoVideo' : ''}`}
4437
4608
  />
4438
4609
  <audio id="audio6" autoPlay />
@@ -4471,6 +4642,7 @@ class Video extends Component {
4471
4642
  id="video7"
4472
4643
  autoPlay
4473
4644
  muted={true}
4645
+ disablePictureInPicture
4474
4646
  className={`video ${this.state.noVideoSeven ? 'isNoVideo' : ''}`}
4475
4647
  />
4476
4648
  <audio id="audio7" autoPlay />
@@ -4500,6 +4672,7 @@ class Video extends Component {
4500
4672
  id="video8"
4501
4673
  autoPlay
4502
4674
  muted={true}
4675
+ disablePictureInPicture
4503
4676
  className={`video ${this.state.noVideoEight ? 'isNoVideo' : ''}`}
4504
4677
  />
4505
4678
  <audio id="audio8" autoPlay />
@@ -4526,6 +4699,7 @@ class Video extends Component {
4526
4699
  id="video9"
4527
4700
  autoPlay
4528
4701
  muted={true}
4702
+ disablePictureInPicture
4529
4703
  className={`video ${this.state.noVideoNine ? 'isNoVideo' : ''}`}
4530
4704
  />
4531
4705
  <audio id="audio9" autoPlay />
@@ -4554,6 +4728,7 @@ class Video extends Component {
4554
4728
  id="video10"
4555
4729
  autoPlay
4556
4730
  muted={true}
4731
+ disablePictureInPicture
4557
4732
  className={`video ${this.state.noVideoTen ? 'isNoVideo' : ''}`}
4558
4733
  />
4559
4734
  <audio id="audio10" autoPlay />
@@ -4580,6 +4755,7 @@ class Video extends Component {
4580
4755
  id="video11"
4581
4756
  autoPlay
4582
4757
  muted={true}
4758
+ disablePictureInPicture
4583
4759
  className={`video ${this.state.noVideoEleven ? 'isNoVideo' : ''}`}
4584
4760
  />
4585
4761
  <audio id="audio11" autoPlay />
@@ -4607,6 +4783,7 @@ class Video extends Component {
4607
4783
  id="video12"
4608
4784
  autoPlay
4609
4785
  muted={true}
4786
+ disablePictureInPicture
4610
4787
  className={`video ${this.state.noVideoTwelve ? 'isNoVideo' : ''}`}
4611
4788
  />
4612
4789
  <audio id="audio12" autoPlay />
@@ -4659,7 +4836,7 @@ class Video extends Component {
4659
4836
  invitationClick={this.invitationClick}
4660
4837
  customerFaceClick={this.customerFaceClick}
4661
4838
  ocrClick={this.ocrClick}
4662
- switchExternal={this.switchExternalAge}
4839
+ switchExternal={this.switchExternal}
4663
4840
  inspection={this.inspection}
4664
4841
  ></Foot>
4665
4842
  <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
@@ -4809,7 +4986,7 @@ sessionId: "",
4809
4986
  microphoneSize: 25,
4810
4987
  fontSize: '14',
4811
4988
  fontFamily: 'auto',
4812
- menus: ['SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
4989
+ menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
4813
4990
  customLeaveRoom: '客户离开房间',
4814
4991
  meetingInfo: {
4815
4992
  title: '--',
@@ -13,9 +13,9 @@
13
13
  float: right
14
14
  }
15
15
  .imgClassVoice{
16
- width: 1.563rem;
17
- height: 1.563rem;
18
- margin-top: 0.25rem;
16
+ width: 25Px;
17
+ height: 24Px;
18
+ margin-bottom: 4Px;
19
19
  }
20
20
  .sharedScreen{
21
21
  font-size: 10px;
@@ -298,10 +298,9 @@
298
298
  }
299
299
  }
300
300
  .voiceClass{
301
- // position: absolute;
302
- // bottom: 0;
303
- // left: 0;
304
- // transform: rotateY(180deg);
301
+ width: 25Px;
302
+ height: 25.3Px;
303
+ margin-bottom: 1Px;
305
304
  }
306
305
  .cameraAnMicrophone{
307
306
  margin: 10px 20px;