react_hsbc_teller 1.1.7 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "1.1.7",
3
+ "version": "1.2.0",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -24,7 +24,6 @@ class Demo extends Component {
24
24
  // baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
25
25
  // resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
26
26
  prohibitPrompt: '无客户',
27
- voiceColor: '#333',
28
27
  titleBackground: '#40a9ff',
29
28
  titleColor: '#faad14',
30
29
  microphoneSize: 50,
@@ -47,9 +47,6 @@ export default class foot extends Component {
47
47
  inspection = ()=>{
48
48
  this.props.inspection()
49
49
  }
50
- screenSwitching =()=>{
51
- this.props.screenSwitching()
52
- }
53
50
  switchExternal=()=>{
54
51
  this.props.switchExternal()
55
52
  }
@@ -164,14 +161,6 @@ export default class foot extends Component {
164
161
  </div>
165
162
  </div>
166
163
  </div>
167
- {/* <div className='footHover' onClick={this.screenSwitching.bind(this)}>
168
- <div className="one">
169
- <img className="imgClass" src={require("../../assets/img/inspection.png").default} alt="" />
170
- <div className="text">
171
- 切换投屏
172
- </div>
173
- </div>
174
- </div> */}
175
164
  </div>
176
165
  {defaultList}
177
166
 
@@ -173,11 +173,13 @@ class Video extends Component {
173
173
  publish_config.publish_tag = 'tag1'
174
174
  this.test_controller.Publish(publish_config)
175
175
  // eslint-disable-next-line no-undef
176
- if(this.state.imStatus) {
176
+ setTimeout(() => {
177
+ if(this.state.imStatus && !this.state.imJoinRoom) {
177
178
  joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
178
179
  this.state.imJoinRoom =true
179
180
  console.log('加入IM房间')
180
181
  }
182
+ })
181
183
  this.props.createRoomCallback({
182
184
  type: 1,
183
185
  errorManage: '',
@@ -244,8 +246,10 @@ class Video extends Component {
244
246
  // eslint-disable-next-line no-undef
245
247
  // initWebSocket('wss://im.uat.dsp.hsbcfts.com.cn:443/wealth/im/ws/')
246
248
  // initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + '15603' + '/ws/');
249
+ if(!this.state.imStatus){
250
+ initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
247
251
 
248
- initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
252
+ }
249
253
  const config_param = {};
250
254
  config_param.workspaceId = this.state.workSpaceId;
251
255
  config_param.uid = this.props.tellerAccount;
@@ -846,7 +850,8 @@ class Video extends Component {
846
850
  let analyser = this.state.analyserData.get(sid)
847
851
  aou(analyser)
848
852
  function aou(analyser){
849
- cancelAnimationFrame(microTimerMap.get(sid))
853
+ clearInterval(microTimerMap.get(sid))
854
+ // cancelAnimationFrame(microTimerMap.get(sid))
850
855
  if(analyser) {
851
856
 
852
857
  let dataArray = new Uint8Array(analyser.frequencyBinCount);
@@ -873,7 +878,13 @@ class Video extends Component {
873
878
  cobj.fillRect(startX, startY, width, height )
874
879
  }
875
880
  }
876
- microTimerMap.set(sid,requestAnimationFrame(aou.bind(this, analyser)) )
881
+ microTimerMap.set(sid,
882
+ setInterval(
883
+ aou.bind(this, analyser),
884
+ 300
885
+ )
886
+ // requestAnimationFrame(aou.bind(this, analyser))
887
+ )
877
888
  }
878
889
 
879
890
 
@@ -1064,7 +1075,10 @@ class Video extends Component {
1064
1075
  noVideoTwelve: true
1065
1076
  })
1066
1077
  }
1067
- this.pictureInPicture('Refresh')
1078
+ if(this.state.isPictureInPicture) {
1079
+ this.pictureInPicture('Refresh')
1080
+ }
1081
+
1068
1082
  }
1069
1083
  }
1070
1084
  else if (Mival.typeId == 3003) {
@@ -1140,7 +1154,9 @@ class Video extends Component {
1140
1154
  noVideoTwelve: false
1141
1155
  })
1142
1156
  }
1143
- this.pictureInPicture('Refresh')
1157
+ if(this.state.isPictureInPicture) {
1158
+ this.pictureInPicture('Refresh')
1159
+ }
1144
1160
  }
1145
1161
  }
1146
1162
  else if (Mival.typeId == 1220) {
@@ -1359,10 +1375,10 @@ class Video extends Component {
1359
1375
  window.IMOpenfire = msg =>{
1360
1376
  console.log('im登录', msg)
1361
1377
  if(msg.status == 'error') {
1362
- this.state.sessionType = false
1378
+ this.state.imStatus = false
1363
1379
  this.roomCallBack(2, 'im建立连接失败',5)
1364
1380
  } else if (msg.status == 'success') {
1365
- this.state.imStatus = msg
1381
+ this.state.imStatus = true
1366
1382
  setTimeout(() => {
1367
1383
  if(this.state.imRoomId && !this.state.imJoinRoom) {
1368
1384
  joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
@@ -1373,7 +1389,7 @@ class Video extends Component {
1373
1389
  } else if (msg.status == 'close') {
1374
1390
  if(!this.state.manualClose) {
1375
1391
  this.timer && clearInterval(this.timer);
1376
- this.state.sessionType = false
1392
+ this.state.imStatus = false
1377
1393
  console.log('IMOpenfireclose')
1378
1394
  this.roomCallBack(2, '账号重复登录',9)
1379
1395
 
@@ -1555,7 +1571,11 @@ class Video extends Component {
1555
1571
  this.test_controller.OnMediaClose = (code, sid) => {
1556
1572
  console.log(code, sid)
1557
1573
  if(code == 5003 || code == 5004 || code == 5005|| code == 5007|| code == 5009|| code == 5010 || code == 5011|| code == 5012) {
1574
+ if(sid == document.getElementById('publish_video1').name) {
1558
1575
  this.roomCallBack(2, '音视频异常关闭',8)
1576
+ } else {
1577
+ this.state.isScreenSwitching = false
1578
+ }
1559
1579
  }
1560
1580
  };
1561
1581
  // 加入房间成功
@@ -1586,7 +1606,6 @@ class Video extends Component {
1586
1606
  this.state.rtoken = '',
1587
1607
  this.state.sessionId = '',
1588
1608
  this.state.imRoomId = ''
1589
-
1590
1609
  this.test_controller.Disconnect()
1591
1610
  let data = {
1592
1611
  account: this.props.tellerAccount,
@@ -1609,7 +1628,7 @@ class Video extends Component {
1609
1628
  'tellerId': this.props.tellerAccount
1610
1629
  })
1611
1630
  });
1612
- if(this.state.screenName == '取消共享') {
1631
+ if(this.state.screenName == '切换共享') {
1613
1632
  this.state.isSharedScreen = true
1614
1633
  this.state.isScreenSwitching = false
1615
1634
  }
@@ -1622,7 +1641,7 @@ class Video extends Component {
1622
1641
  this.enterRoom()
1623
1642
  this.timer = setInterval(
1624
1643
  () => {
1625
- if(!this.state.voiceStatue) {
1644
+ if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0) {
1626
1645
  callNimIM('sendCustomCmdMsg', {
1627
1646
  customId: this.state.imRoomId,
1628
1647
  content: JSON.stringify({
@@ -1644,8 +1663,13 @@ class Video extends Component {
1644
1663
  // 发布媒体流失败
1645
1664
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
1646
1665
  console.log('发布媒体流失败', sid, err_code, err_msg)
1647
- this.state.sessionType = false
1648
- this.roomCallBack(2, '发布失败',4)
1666
+ if(sid == document.getElementById('publish_video1').name) {
1667
+ this.state.sessionType = false
1668
+ this.roomCallBack(2, '发布失败',4)
1669
+ } else {
1670
+ this.messageClick('投屏失败请重新投屏','error')
1671
+ }
1672
+
1649
1673
  };
1650
1674
  // 订阅媒体流成功
1651
1675
  this.test_controller.OnSubscribeSucc = (feed, sid) => {
@@ -2069,78 +2093,92 @@ class Video extends Component {
2069
2093
  if (!document.getElementById("video1").name) {
2070
2094
  this.setState({
2071
2095
  videoOneName: '',
2072
- voiceVideoOne: false
2096
+ voiceVideoOne: false,
2097
+ noVideoOne: false
2073
2098
  })
2074
2099
  }
2075
2100
  if (!document.getElementById("video2").name) {
2076
2101
  this.setState({
2077
2102
  videoTwoName: '',
2078
- voiceVideoTwo: false
2103
+ voiceVideoTwo: false,
2104
+ noVideoTwo: false
2079
2105
  })
2080
2106
  }
2081
2107
  if (!document.getElementById("video3").name) {
2082
2108
  this.setState({
2083
2109
  videoThreeName: '',
2084
- voiceVideoThree: false
2110
+ voiceVideoThree: false,
2111
+ noVideoThree: false
2085
2112
  })
2086
2113
  }
2087
2114
  if (!document.getElementById("video4").name) {
2088
2115
  this.setState({
2089
2116
  videoFourName: '',
2090
2117
  voiceVideoFour: false,
2118
+ noVideoFour: false
2091
2119
  })
2092
2120
  }
2093
2121
  if (!document.getElementById("video5").name) {
2094
2122
  this.setState({
2095
2123
  videoFiveName: '',
2096
- voiceVideoFive: false
2124
+ voiceVideoFive: false,
2125
+ noVideoFive: false
2097
2126
  })
2098
2127
  }
2099
2128
  if (!document.getElementById("video6").name) {
2100
2129
  this.setState({
2101
2130
  videoSixName: '',
2102
- voiceVideoSix: false
2131
+ voiceVideoSix: false,
2132
+ noVideoSix: false
2103
2133
  })
2104
2134
  }
2105
2135
 
2106
2136
  if (!document.getElementById("video7").name) {
2107
2137
  this.setState({
2108
2138
  videoSevenName: '',
2109
- voiceVideoSeven: false
2139
+ voiceVideoSeven: false,
2140
+ noVideoSeven: false
2110
2141
  })
2111
2142
  }
2112
2143
  if (!document.getElementById("video8").name) {
2113
2144
  this.setState({
2114
2145
  videoEightName: '',
2115
- voiceVideoEight: false
2146
+ voiceVideoEight: false,
2147
+ noVideoEight: false
2116
2148
  })
2117
2149
  }
2118
2150
  if (!document.getElementById("video9").name) {
2119
2151
  this.setState({
2120
2152
  videoNineName: '',
2121
- voiceVideoNine: false
2153
+ voiceVideoNine: false,
2154
+ noVideoNine: false
2122
2155
  })
2123
2156
  }
2124
2157
  if (!document.getElementById("video10").name) {
2125
2158
  this.setState({
2126
2159
  videoTenName: '',
2127
- voiceVideoTen: false
2160
+ voiceVideoTen: false,
2161
+ noVideoTen: false
2128
2162
  })
2129
2163
  }
2130
2164
  if (!document.getElementById("video11").name) {
2131
2165
  this.setState({
2132
2166
  videoElevenName: '',
2133
- voiceVideoEleven: false
2167
+ voiceVideoEleven: false,
2168
+ noVideoEleven: false
2134
2169
  })
2135
2170
  }
2136
2171
  if (!document.getElementById("video12").name) {
2137
2172
  this.setState({
2138
2173
  videoTwelveName: '',
2139
- voiceVideoTwelve: false
2174
+ voiceVideoTwelve: false,
2175
+ noVideoTwelve: false
2140
2176
  })
2141
2177
  }
2142
2178
  this.state.analyserData.delete(sid)
2143
- this.pictureInPicture('Refresh')
2179
+ if(this.state.isPictureInPicture) {
2180
+ this.pictureInPicture('Refresh')
2181
+ }
2144
2182
  };
2145
2183
  // 推送“取消发布”给与会者
2146
2184
  this.test_controller.OnUnPublish = (feed) => {
@@ -2335,7 +2373,7 @@ class Video extends Component {
2335
2373
  })
2336
2374
  }
2337
2375
  if (sid == document.getElementById('video20').name) {
2338
- if(this.state.screenName == '取消共享') {
2376
+ if(this.state.screenName == '切换共享') {
2339
2377
  this.state.isSharedScreen = true
2340
2378
  this.state.isScreenSwitching = false
2341
2379
  }
@@ -2353,7 +2391,19 @@ class Video extends Component {
2353
2391
  loading: false
2354
2392
  })
2355
2393
  this.messageClick('切换摄像头或麦克风失败,请先检查设备','error')
2356
- }
2394
+ } else if(this.state.screenName == '切换共享') {
2395
+ this.test_controller.UnPublish(document.getElementById('video20').name)
2396
+ this.state.isSharedScreen = false
2397
+ this.state.isScreenSwitching = false
2398
+ this.setState({
2399
+ screenName: '共享模式'
2400
+ });
2401
+ console.log(pictureInPictureVideo)
2402
+ this.tabTitlesClick('RMScreen', 'delect')
2403
+ if (this.state.isPictureInPicture) {
2404
+ document.exitPictureInPicture()
2405
+ }
2406
+ }
2357
2407
  };
2358
2408
  // 服务端录制初始化成功
2359
2409
  this.test_controller.OnInitRemoteRecordSucc = (
@@ -2363,21 +2413,21 @@ class Video extends Component {
2363
2413
  console.log('服务端录制初始化成功', record_id, record_third_id)
2364
2414
  };
2365
2415
  this.test_controller.OnVolumeAnalyser = (sid, analyser) => {
2366
- cancelAnimationFrame(this.state.OnVolumeAnalyserMap.get(sid))
2367
- let publish_sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name;
2368
- let subscribe_sid1 = document.getElementById('video1').name || document.getElementById('audio1').name;
2369
- let subscribe_sid2 = document.getElementById('video2').name || document.getElementById('audio2').name;
2370
- let subscribe_sid3 = document.getElementById('video3').name || document.getElementById('audio3').name;
2371
- let subscribe_sid4 = document.getElementById('video4').name || document.getElementById('audio4').name;
2372
- let subscribe_sid5 = document.getElementById('video5').name || document.getElementById('audio5').name;
2373
- let subscribe_sid6 = document.getElementById('video6').name || document.getElementById('audio6').name;
2374
-
2375
- let subscribe_sid7 = document.getElementById('video7').name || document.getElementById('audio7').name;
2376
- let subscribe_sid8 = document.getElementById('video8').name || document.getElementById('audio8').name;
2377
- let subscribe_sid9 = document.getElementById('video9').name || document.getElementById('audio9').name;
2378
- let subscribe_sid10 = document.getElementById('video10').name || document.getElementById('audio10').name;
2379
- let subscribe_sid11 = document.getElementById('video11').name || document.getElementById('audio11').name;
2380
- let subscribe_sid12 = document.getElementById('video12').name || document.getElementById('audio12').name;
2416
+ clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
2417
+ let publish_sid = (document.getElementById('publish_video1') ? document.getElementById('publish_video1').name : '') || (document.getElementById('publish_streamId1') ? document.getElementById('publish_streamId1').name : '');
2418
+ let subscribe_sid1 = (document.getElementById('video1') ? document.getElementById('video1').name : '') || (document.getElementById('audio1') ? document.getElementById('audio1').name : '');
2419
+ let subscribe_sid2 = (document.getElementById('video2') ? document.getElementById('video2').name : '') || (document.getElementById('audio2') ? document.getElementById('audio2').name : '');
2420
+ let subscribe_sid3 =(document.getElementById('video3') ? document.getElementById('video3').name : '') || (document.getElementById('audio3') ? document.getElementById('audio3').name : '');
2421
+ let subscribe_sid4 = (document.getElementById('video4') ? document.getElementById('video4').name : '') || (document.getElementById('audio4') ? document.getElementById('audio4').name : '');
2422
+ let subscribe_sid5 = (document.getElementById('video5') ? document.getElementById('video5').name : '') || (document.getElementById('audio5') ? document.getElementById('audio5').name : '');
2423
+ let subscribe_sid6 = (document.getElementById('video6') ? document.getElementById('video6').name : '') || (document.getElementById('audio6') ? document.getElementById('audio6').name : '');
2424
+
2425
+ let subscribe_sid7 = (document.getElementById('video7') ? document.getElementById('video7').name : '') || (document.getElementById('audio7') ? document.getElementById('audio7').name : '');
2426
+ let subscribe_sid8 = (document.getElementById('video8') ? document.getElementById('video8').name : '') || (document.getElementById('audio8') ? document.getElementById('audio8').name : '');
2427
+ let subscribe_sid9 = (document.getElementById('video9') ? document.getElementById('video9').name : '') || (document.getElementById('audio9') ? document.getElementById('audio9').name : '');
2428
+ let subscribe_sid10 = (document.getElementById('video10') ? document.getElementById('video10').name : '') || (document.getElementById('audio10') ? document.getElementById('audio10').name : '');
2429
+ let subscribe_sid11 = (document.getElementById('video11') ? document.getElementById('video11').name : '') || (document.getElementById('audio11') ? document.getElementById('audio11').name : '');
2430
+ let subscribe_sid12 = (document.getElementById('video12') ? document.getElementById('video12').name : '') || (document.getElementById('audio12') ? document.getElementById('audio12').name : '');
2381
2431
 
2382
2432
  let volumeView;
2383
2433
  switch (sid) {
@@ -2444,7 +2494,7 @@ class Video extends Component {
2444
2494
  }
2445
2495
 
2446
2496
  for (var i = 0; i < 40; i++) {
2447
- let energy = (dataArray[step * i] / 256.0) * 80;
2497
+ let energy = (dataArray[step * i] / 256.0) * 100;
2448
2498
  ctx.beginPath();
2449
2499
  ctx.fillStyle = this.props.voiceColor;
2450
2500
  const { x1, y1, x2, y2 } = drawArea
@@ -2454,13 +2504,17 @@ class Video extends Component {
2454
2504
  let startY = y1 - height // 绘制起始点y
2455
2505
  ctx.fillRect(startX, startY, width, height)
2456
2506
  if(document.getElementById('publish_video1').name == sid) {
2457
- this.state.analyserHeight.set(sid,energy/80)
2507
+ this.state.analyserHeight.set(sid,energy/25)
2458
2508
  this.state.analyserHeight = this.state.analyserHeight
2459
2509
  }
2460
2510
 
2461
2511
  }
2462
- this.state.OnVolumeAnalyserMap.set(sid,requestAnimationFrame(this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser)))
2463
- this.state.OnVolumeAnalyserMap = this.state.OnVolumeAnalyserMap
2512
+ this.state.OnVolumeAnalyserMap.set(sid,setInterval(
2513
+ this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser),
2514
+ 300
2515
+ ))
2516
+ this.state.OnVolumeAnalyserMap = this.state.OnVolumeAnalyserMap
2517
+ // requestAnimationFrame(this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser));
2464
2518
 
2465
2519
  this.state.analyserData.set(sid, analyser)
2466
2520
  this.state.analyserData = this.state.analyserData
@@ -2471,9 +2525,32 @@ class Video extends Component {
2471
2525
  if(this.state.isScreenSwitching) {
2472
2526
  this.state.isScreenSwitching = false
2473
2527
  } else {
2474
- if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
2475
- this.sharedScreen()
2528
+ // if (this.state.isWhiteboard) {
2529
+ // publish_config.publish_device = 4
2530
+ // publish_config.media_type = 1
2531
+ // publish_config.sid = document.getElementById('video20').name
2532
+ // publish_config.part_of_screen_id = 'touBoxItem'
2533
+ // publish_config.video_profile_type = 5
2534
+ // this.test_controller.ChangeMediaStream(publish_config);
2535
+ // this.setState({
2536
+ // isPDF: true,
2537
+ // })
2538
+ // } else {
2539
+ document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
2540
+ // }
2541
+ this.state.isSharedScreen = false
2542
+ this.state.isScreenSwitching = false
2543
+ this.setState({
2544
+ screenName: '共享模式'
2545
+ });
2546
+ console.log(pictureInPictureVideo)
2547
+ this.tabTitlesClick('RMScreen', 'delect')
2548
+ if (this.state.isPictureInPicture) {
2549
+ document.exitPictureInPicture()
2476
2550
  }
2551
+ // if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
2552
+ // this.sharedScreen()
2553
+ // }
2477
2554
  }
2478
2555
 
2479
2556
 
@@ -2548,6 +2625,10 @@ class Video extends Component {
2548
2625
  }
2549
2626
  }
2550
2627
  finishSession = () => {
2628
+ // clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
2629
+ this.state.OnVolumeAnalyserMap.forEach((value,key,map)=>{
2630
+ clearInterval(value)
2631
+ })
2551
2632
  this.timer && clearInterval(this.timer);
2552
2633
  if(this.state.isSharedScreen) {
2553
2634
  this.setState({
@@ -2776,7 +2857,7 @@ class Video extends Component {
2776
2857
  }
2777
2858
  };
2778
2859
  isFileSuccuse = () => {
2779
- if (!this.state.sessionId || this.state.isSuspend || !this.state.sessionType) {
2860
+ if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
2780
2861
  this.messageClick('当前程序异常请先退出重开','error')
2781
2862
  return false
2782
2863
  } else {
@@ -2833,9 +2914,13 @@ class Video extends Component {
2833
2914
  }
2834
2915
  }
2835
2916
  };
2836
- screenSwitching=()=>{
2917
+ sharedScreen = () => {
2918
+ console.log('投屏')
2837
2919
  if (this.isFileSuccuse()) {
2838
2920
  const publish_config = {};
2921
+ if(streamShare) {
2922
+ streamShare.getTracks().forEach(track => track.stop());
2923
+ }
2839
2924
  if (this.state.isSharedScreen) {
2840
2925
  const publish_config = {}
2841
2926
  publish_config.media_type = 1
@@ -2848,40 +2933,6 @@ class Video extends Component {
2848
2933
  publish_config.sid = document.getElementById('video20').name
2849
2934
  this.test_controller.ChangeMediaStream(publish_config)
2850
2935
  this.state.isScreenSwitching = true
2851
- }
2852
- }
2853
- }
2854
- sharedScreen = () => {
2855
- console.log('投屏')
2856
- if (this.isFileSuccuse()) {
2857
- const publish_config = {};
2858
- if(streamShare) {
2859
- streamShare.getTracks().forEach(track => track.stop());
2860
- }
2861
- if (this.state.isSharedScreen) {
2862
- // if (this.state.isWhiteboard) {
2863
- // publish_config.publish_device = 4
2864
- // publish_config.media_type = 1
2865
- // publish_config.sid = document.getElementById('video20').name
2866
- // publish_config.part_of_screen_id = 'touBoxItem'
2867
- // publish_config.video_profile_type = 5
2868
- // this.test_controller.ChangeMediaStream(publish_config);
2869
- // this.setState({
2870
- // isPDF: true,
2871
- // })
2872
- // } else {
2873
- this.test_controller.UnPublish(document.getElementById('video20').name)
2874
- // }
2875
- this.state.isSharedScreen = false
2876
- this.state.isScreenSwitching = false
2877
- this.setState({
2878
- screenName: '共享模式'
2879
- });
2880
- console.log(pictureInPictureVideo)
2881
- this.tabTitlesClick('RMScreen', 'delect')
2882
- if (this.state.isPictureInPicture) {
2883
- document.exitPictureInPicture()
2884
- }
2885
2936
  } else {
2886
2937
  if (document.getElementById('video20').name) {
2887
2938
  publish_config.media_type = 1;
@@ -2908,7 +2959,7 @@ class Video extends Component {
2908
2959
  // this.state.isSharedScreen = true
2909
2960
  // this.state.isScreenSwitching = false
2910
2961
  this.setState({
2911
- screenName: '取消共享',
2962
+ screenName: '切换共享',
2912
2963
  isPDF: false
2913
2964
  })
2914
2965
  this.tabTitlesClick(
@@ -3247,7 +3298,9 @@ class Video extends Component {
3247
3298
  videoTwelveName: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).tag == 'VIDEO_SOURCE_SCREEN' ? '共享屏幕' : data ? data : '客户12'
3248
3299
  })
3249
3300
  }
3250
- this.pictureInPicture('Refresh')
3301
+ if(this.state.isPictureInPicture) {
3302
+ this.pictureInPicture('Refresh')
3303
+ }
3251
3304
  } catch (err) {
3252
3305
  if(err.status == 502 || err.status== 404) {
3253
3306
  this.roomCallBack(2, '连接服务器失败','SYS-02')
@@ -4054,7 +4107,6 @@ class Video extends Component {
4054
4107
  ocrClick={this.ocrClick}
4055
4108
  switchExternal={this.switchExternalAge}
4056
4109
  inspection={this.inspection}
4057
- screenSwitching={this.screenSwitching}
4058
4110
  ></Foot>
4059
4111
  <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
4060
4112
  onCancel={this.handleCancel}>