react_hsbc_teller 1.0.1 → 1.0.4

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.
@@ -41,13 +41,17 @@ class Video extends Component {
41
41
  cancel = axios.CancelToken.source()
42
42
  signCanvas = React.createRef();
43
43
  state = {
44
+ isScreenSwitching: false,
45
+ whiteboardWidth: '',
46
+ whiteboardHeight: '',
44
47
  laveRoomSharedScreen: false,
45
48
  isJoinRoom: false,
46
49
  sessionType: false,
47
50
  isWhiteboard: false,
48
51
  isSelect: '',
49
52
  loading: false,
50
- isModalVisibleSign: false,
53
+ // isModalVisibleSign: '',
54
+ isModalVisibleSign: this.props.isTranscribing,
51
55
  titleModal: '人脸识别',
52
56
  faceCustomerType: 1, // 1无感人脸,2ocr
53
57
  faceCustomerUid: '',
@@ -68,7 +72,6 @@ class Video extends Component {
68
72
  voiceImg: voiceImgOpen,
69
73
  voiceName: '静音',
70
74
  isCustomer: false,
71
- publishDevic: 1,
72
75
  isSharedScreen: false,
73
76
  isSuspend: false,
74
77
  audioed: false,
@@ -152,9 +155,10 @@ class Video extends Component {
152
155
  mtoken: this.state.rtoken
153
156
  });
154
157
  console.log(result);
158
+ this.state.imRoomId = result.imRoomId,
159
+ this.state.sessionId = result.sessionId,
155
160
  this.setState({
156
- imRoomId: result.imRoomId,
157
- sessionId: result.sessionId,
161
+
158
162
  loading: false,
159
163
  });
160
164
  let publish_config = {}
@@ -169,9 +173,7 @@ class Video extends Component {
169
173
  // eslint-disable-next-line no-undef
170
174
  if(this.state.imStatus) {
171
175
  joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
172
- this.setState({
173
- imJoinRoom:true
174
- })
176
+ this.state.imJoinRoom =true
175
177
  console.log('加入IM房间')
176
178
  }
177
179
  this.props.createRoomCallback({
@@ -187,10 +189,8 @@ class Video extends Component {
187
189
  })
188
190
  } catch (err) {
189
191
  console.error(err);
190
-
191
- this.setState({
192
- sessionType: false
193
- })
192
+
193
+ this.state.sessionType = false
194
194
  if(err.status == 502 || err.status== 404) {
195
195
  this.roomCallBack(2, '连接服务器失败','SYS-02')
196
196
  } else {
@@ -214,11 +214,9 @@ class Video extends Component {
214
214
  let result = await API.mpaasSig({ account: data.account, type: data.type });
215
215
  console.log(result);
216
216
  window.sessionStorage.setItem('alimpassSig', result.mpsSig);
217
- this.setState({
218
- workSpaceId: result.workSpaceId,
219
- appId: result.appId,
220
- bizName: result.bizName
221
- });
217
+ this.state.workSpaceId = result.workSpaceId,
218
+ this.state.appId = result.appId,
219
+ this.state.bizName = result.bizName
222
220
  // const data1={
223
221
  // hostname: 'im.uat.dsp.hsbcfts.com.cn',
224
222
  // webPort: '443',
@@ -325,8 +323,8 @@ class Video extends Component {
325
323
  enableServerRecording = () => {
326
324
  const filePath = 'recordId_' + new Date().valueOf();
327
325
  const recordParam = {};
328
- recordParam.width = 640;
329
- recordParam.height = 480;
326
+ recordParam.width = 1280;
327
+ recordParam.height = 720;
330
328
  recordParam.recordTotalStream = 0;
331
329
  recordParam.startTimeout = 10;
332
330
  recordParam.splitType = 0;
@@ -569,8 +567,8 @@ class Video extends Component {
569
567
  // 人脸识别
570
568
  facialRecognition = () => {
571
569
  if (this.isFileSuccuse()) {
570
+ this.state.faceCustomerType = 1
572
571
  this.setState({
573
- faceCustomerType: 1,
574
572
  titleModal: '人脸识别'
575
573
  })
576
574
  this.selectCustomer('facial')
@@ -578,8 +576,8 @@ class Video extends Component {
578
576
  };
579
577
  ocrClick = () => {
580
578
  if (this.isFileSuccuse()) {
579
+ this.state.faceCustomerType = 2
581
580
  this.setState({
582
- faceCustomerType: 2,
583
581
  titleModal: 'OCR识别'
584
582
  })
585
583
  this.selectCustomer('ocr')
@@ -873,18 +871,14 @@ class Video extends Component {
873
871
  //可获取画中画窗口的一些数据,如宽高等
874
872
  pictureInPictureVideo.style.display = 'block';
875
873
  pictureInPictureVideo.play();
876
- this.setState({
877
- isPictureInPicture: true
878
- })
874
+ this.state.isPictureInPicture = true
879
875
  });
880
876
 
881
877
  pictureInPictureVideo.addEventListener('leavepictureinpicture', (event) => {
882
878
  pictureInPictureVideo.srcObject = null;
883
879
  pictureInPictureVideo.style.display = "none";
884
880
  clearInterval(interval);
885
- this.setState({
886
- isPictureInPicture: false
887
- })
881
+ this.state.isPictureInPicture = false
888
882
  });
889
883
  }
890
884
  roomCallBack = (type, manege,code) => {
@@ -1141,14 +1135,10 @@ class Video extends Component {
1141
1135
  } else if (Mival.type == 2) {
1142
1136
  this.tabTitlesClick('RMWhiteboard', 'delect')
1143
1137
  if (this.state.isSharedScreen) {
1144
- this.setState({
1145
- isWhiteboard: false,
1146
- })
1138
+ this.state.isWhiteboard = false
1147
1139
  } else {
1148
1140
  this.test_controller.UnPublish(document.getElementById('video20').name)
1149
- this.setState({
1150
- isWhiteboard: false,
1151
- })
1141
+ this.state.isWhiteboard = false
1152
1142
  }
1153
1143
  }
1154
1144
 
@@ -1331,21 +1321,17 @@ class Video extends Component {
1331
1321
  window.IMOpenfire = msg =>{
1332
1322
  console.log('im登录', msg)
1333
1323
  if(!msg) {
1334
- this.setState({
1335
- sessionType: false
1336
- })
1324
+ this.state.sessionType = false
1337
1325
  this.roomCallBack(2, 'im建立连接失败',5)
1338
1326
  } else {
1339
- this.setState({
1340
- imStatus: msg
1341
- })
1342
- if(this.state.imRoomId && !this.state.imJoinRoom) {
1343
- joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
1344
- this.setState({
1345
- imJoinRoom:true
1346
- })
1347
- console.log('加入im房间')
1348
- }
1327
+ this.state.imStatus = msg
1328
+ setTimeout(() => {
1329
+ if(this.state.imRoomId && !this.state.imJoinRoom) {
1330
+ joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
1331
+ this.state.imJoinRoom =true
1332
+ console.log('IMOpenfire 加入im房间')
1333
+ }
1334
+ }, 200);
1349
1335
  }
1350
1336
 
1351
1337
  }
@@ -1456,9 +1442,7 @@ class Video extends Component {
1456
1442
  // 获取设备失败
1457
1443
  this.test_controller.OnGetDevicesFailed = (code, msg) => {
1458
1444
  console.log('获取设备失败', code, msg)
1459
- this.setState({
1460
- sessionType: false
1461
- })
1445
+ this.state.sessionType = false
1462
1446
  this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
1463
1447
  this.roomCallBack(2, '获取设备失败',1)
1464
1448
  };
@@ -1469,9 +1453,7 @@ class Video extends Component {
1469
1453
  };
1470
1454
  this.test_controller.OnConnectFailed = (code, msg) => {
1471
1455
  console.log('建立连接失败', code, msg)
1472
- this.setState({
1473
- sessionType: false
1474
- })
1456
+ this.state.sessionType = false
1475
1457
  this.roomCallBack(2, '连接失败',2)
1476
1458
  };
1477
1459
  // 断开连接回调
@@ -1486,9 +1468,7 @@ class Video extends Component {
1486
1468
  // 初始化房间失败
1487
1469
  this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
1488
1470
  console.log('初始化房间失败', err_code, err_msg)
1489
- this.setState({
1490
- sessionType: false
1491
- })
1471
+ this.state.sessionType = false
1492
1472
  this.roomCallBack(2, '初始化失败',3)
1493
1473
  };
1494
1474
  // 初始化成功回调
@@ -1506,18 +1486,14 @@ class Video extends Component {
1506
1486
 
1507
1487
  this.test_controller.OnCreateRoomSucc = (room_id, rtoken) => {
1508
1488
  console.log('创建房间成功', room_id, rtoken);
1509
- this.setState({
1510
- channelId: room_id,
1511
- rtoken: rtoken
1512
- });
1489
+ this.state.channelId = room_id,
1490
+ this.state.rtoken = rtoken
1513
1491
  this.createRoom()
1514
1492
  };
1515
1493
  // 创建房间失败
1516
1494
  this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
1517
1495
  console.log('创建房间失败', err_code, err_msg)
1518
- this.setState({
1519
- sessionType: false
1520
- })
1496
+ this.state.sessionType = false
1521
1497
  this.roomCallBack(2, '创建房间失败',7)
1522
1498
  };
1523
1499
  // 初始化⾳视频成功
@@ -1554,12 +1530,10 @@ class Video extends Component {
1554
1530
  // isJoinRoom: true
1555
1531
  // })
1556
1532
  // this.roomCallBack(2, '加入失败',-5)
1557
- this.setState({
1558
- channelId: '',
1559
- rtoken: '',
1560
- sessionId: '',
1561
- imRoomId: ''
1562
- });
1533
+ this.state.channelId = '',
1534
+ this.state.rtoken = '',
1535
+ this.state.sessionId = '',
1536
+ this.state.imRoomId = ''
1563
1537
 
1564
1538
  this.test_controller.Disconnect()
1565
1539
  let data = {
@@ -1572,9 +1546,7 @@ class Video extends Component {
1572
1546
  // 发布媒体流成功
1573
1547
  this.test_controller.OnPublishSucc = (sid) => {
1574
1548
  console.log('发布媒体流成功', sid)
1575
- this.setState({
1576
- sessionType: true
1577
- })
1549
+ this.state.sessionType = true
1578
1550
  if (sid == document.getElementById('video20').name) {
1579
1551
  callNimIM('sendCustomCmdMsg', {
1580
1552
  customId: this.state.imRoomId,
@@ -1612,9 +1584,7 @@ class Video extends Component {
1612
1584
  // 发布媒体流失败
1613
1585
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
1614
1586
  console.log('发布媒体流失败', sid, err_code, err_msg)
1615
- this.setState({
1616
- sessionType: false
1617
- })
1587
+ this.state.sessionType = false
1618
1588
  this.roomCallBack(2, '发布失败',4)
1619
1589
  };
1620
1590
  // 订阅媒体流成功
@@ -1644,9 +1614,7 @@ class Video extends Component {
1644
1614
  tag: itemOne.tag
1645
1615
  });
1646
1616
  console.log(array, newArray, this.state.roomCustomerList);
1647
- this.setState({
1648
- roomCustomerList: newArray
1649
- })
1617
+ this.state.roomCustomerList = newArray
1650
1618
  let config_param
1651
1619
  if (itemOne.tag == 'VIDEO_SOURCE_SCREEN') {
1652
1620
  config_param = {
@@ -1787,11 +1755,7 @@ class Video extends Component {
1787
1755
  this.test_controller.OnNewJoinerIn = (participant) => {
1788
1756
  console.log('新加⼊房间者', participant);
1789
1757
  // this.test_controller.ChangeStreamSize(document.getElementById('publish_video1').name, 5)
1790
- this.setState(
1791
- {
1792
- isCustomer: true
1793
- }
1794
- )
1758
+ this.state.isCustomer= true
1795
1759
  };
1796
1760
  // 推送“有新发布”给与会者
1797
1761
  this.test_controller.OnNewPublish = (feed) => {
@@ -1848,9 +1812,7 @@ class Video extends Component {
1848
1812
  tag: feed.tag
1849
1813
  });
1850
1814
  console.log(array, newArray, this.state.roomCustomerList);
1851
- this.setState({
1852
- roomCustomerList: newArray
1853
- })
1815
+ this.state.roomCustomerList = newArray
1854
1816
  let config_param
1855
1817
  if (feed.uid != this.state.tellerAccount) {
1856
1818
  if (feed.tag == 'VIDEO_SOURCE_SCREEN') {
@@ -2036,11 +1998,11 @@ class Video extends Component {
2036
1998
  'tellerId': this.props.tellerAccount
2037
1999
  })
2038
2000
  })
2001
+ this.state.sessionType = false
2002
+ this.state.isSharedScreen = false
2039
2003
  this.setState({
2040
- publishDevic: 1,
2041
- isSharedScreen: false,
2042
- screenName: '投屏',
2043
- sessionType: false
2004
+
2005
+ screenName: '投屏'
2044
2006
  });
2045
2007
  this.tabTitlesClick('RMScreen', 'delect')
2046
2008
  if (this.state.isPictureInPicture) {
@@ -2146,9 +2108,8 @@ class Video extends Component {
2146
2108
 
2147
2109
  if (this.state.roomCustomerList.length == 0) {
2148
2110
  // this.test_controller.ChangeStreamSize(document.getElementById('publish_video1').name, 3)
2149
- this.setState({
2150
- isCustomer: false
2151
- })
2111
+ this.state.isCustomer = false
2112
+
2152
2113
  }
2153
2114
  };
2154
2115
  // 推送“取消订阅”给与会者 OnUnSubscribe(unsubscriber,feed)
@@ -2179,9 +2140,7 @@ class Video extends Component {
2179
2140
  // 开始服务端录制成功
2180
2141
  this.test_controller.OnStartRemoteRecordSucc = (record_id) => {
2181
2142
  console.log('开始服务端录制成功', record_id);
2182
- this.setState({
2183
- recordId: record_id
2184
- });
2143
+ this.state.recordId = record_id
2185
2144
  };
2186
2145
  // 开始服务端录制失败
2187
2146
  this.test_controller.OnStartRemoteRecordFailed = (
@@ -2329,10 +2288,13 @@ class Video extends Component {
2329
2288
  // 切流成功通知
2330
2289
  this.test_controller.OnChangeMediaStreamSuccess = (sid) => {
2331
2290
  console.log('切流成功通知', sid);
2332
- this.messageClick('切换摄像头或麦克风成功','success')
2333
- this.setState({
2334
- isModalVisibleInspection: false
2335
- })
2291
+ if(this.state.isModalVisibleInspection) {
2292
+ this.messageClick('切换摄像头或麦克风成功','success')
2293
+ this.setState({
2294
+ isModalVisibleInspection: false
2295
+ })
2296
+ }
2297
+
2336
2298
  };
2337
2299
  // 切流失败通知
2338
2300
  this.test_controller.OnChangeMediaStreamFailed = (
@@ -2442,38 +2404,26 @@ class Video extends Component {
2442
2404
  ctx.fillRect(startX, startY, width, height)
2443
2405
  if(document.getElementById('publish_video1').name == sid) {
2444
2406
  this.state.analyserHeight.set(sid,energy/80)
2445
- this.setState({
2446
- analyserHeight: this.state.analyserHeight
2447
- })
2407
+ this.state.analyserHeight = this.state.analyserHeight
2448
2408
  }
2449
2409
 
2450
2410
  }
2451
2411
  requestAnimationFrame(this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser));
2452
2412
 
2453
2413
  this.state.analyserData.set(sid, analyser)
2454
- this.setState({
2455
- analyserData: this.state.analyserData
2456
- })
2414
+ this.state.analyserData = this.state.analyserData
2457
2415
  }
2458
2416
  // 停止共享
2459
2417
  this.test_controller.OnDesktopDisplayClosed = () => {
2460
2418
  console.log('OnDesktopDisplayClosed', this.state.isSharedScreen ,this.state.laveRoomSharedScreen)
2461
- // if(this.state.laveRoomSharedScreen) {
2462
- // if (this.state.roomCustomerList.length == 0 && this.state.sessionType) {
2463
- // this.finishSessionClick()
2464
- // }
2465
- // if (this.test_controller&&this.state.sessionType) {
2466
- // this.test_controller.LeaveRoom()
2467
- // this.test_controller.Disconnect()
2468
- // }
2469
- // if(this.state.imStatus) {
2470
- // disconnect();
2471
- // }
2472
- // } else {
2419
+ if(this.state.isScreenSwitching) {
2420
+ this.state.isScreenSwitching = false
2421
+ } else {
2473
2422
  if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
2474
2423
  this.sharedScreen()
2475
2424
  }
2476
- // }
2425
+ }
2426
+
2477
2427
 
2478
2428
  }
2479
2429
  }
@@ -2530,6 +2480,7 @@ class Video extends Component {
2530
2480
  this.test_controller.Disconnect()
2531
2481
  }
2532
2482
  if(this.state.imStatus) {
2483
+ console.log('disconnect断开连接')
2533
2484
  disconnect();
2534
2485
  }
2535
2486
 
@@ -2553,10 +2504,9 @@ class Video extends Component {
2553
2504
  this.timer && clearInterval(this.timer);
2554
2505
  if(this.state.isSharedScreen) {
2555
2506
  this.setState({
2556
- publishDevic: 1,
2557
- isSharedScreen: false,
2558
2507
  screenName: '投屏',
2559
2508
  })
2509
+ this.state.isSharedScreen = false
2560
2510
  this.state.laveRoomSharedScreen = true
2561
2511
  // this.test_controller.UnPublish(document.getElementById('video20').name)
2562
2512
  if (this.state.isPictureInPicture) {
@@ -2569,10 +2519,9 @@ class Video extends Component {
2569
2519
  })
2570
2520
  } else {
2571
2521
  this.setState({
2572
- publishDevic: 1,
2573
- isSharedScreen: false,
2574
2522
  screenName: '投屏',
2575
2523
  });
2524
+ this.state.isSharedScreen = false
2576
2525
  this.state.laveRoomSharedScreen = true
2577
2526
  this.props.onLeaveRoom({
2578
2527
  code: LEAVE_TYPE.TELLER_EXIT,
@@ -2591,12 +2540,10 @@ class Video extends Component {
2591
2540
  if (result.code == 200 && result.data.roomStatus == 1) {
2592
2541
  this.addToScript()
2593
2542
  } else {
2594
- this.setState({
2595
- channelId: '',
2596
- rtoken: '',
2597
- sessionId: '',
2598
- imRoomId: ''
2599
- });
2543
+ this.state.channelId = '',
2544
+ this.state.rtoken = '',
2545
+ this.state.sessionId = '',
2546
+ this.state.imRoomId = ''
2600
2547
  this.addToScript()
2601
2548
  // this.setState({
2602
2549
  // sessionType: false
@@ -2608,12 +2555,10 @@ class Video extends Component {
2608
2555
  // })
2609
2556
  }
2610
2557
  } catch (err) {
2611
- this.setState({
2612
- channelId: '',
2613
- rtoken: '',
2614
- sessionId: '',
2615
- imRoomId: ''
2616
- });
2558
+ this.state.channelId = '',
2559
+ this.state.rtoken = '',
2560
+ this.state.sessionId = '',
2561
+ this.state.imRoomId = ''
2617
2562
  this.addToScript()
2618
2563
  // this.setState({
2619
2564
  // sessionType: false
@@ -2633,8 +2578,8 @@ class Video extends Component {
2633
2578
  axios.get(this.props.resourcePath + "/beauty/beauty.js")
2634
2579
  .then(response => this.addToScriptClick()).catch(function (error) {
2635
2580
  console.log(error);
2581
+ that.state.sessionType = false
2636
2582
  that.setState({
2637
- sessionType: false,
2638
2583
  loading: false
2639
2584
  })
2640
2585
  that.roomCallBack(2, '加载资源失败','SYS-01')
@@ -2651,7 +2596,7 @@ class Video extends Component {
2651
2596
  this.props.resourcePath + "/beauty/backgroundBlur.js",
2652
2597
  this.props.resourcePath + "/adapter.js",
2653
2598
  this.props.resourcePath + "/getMediaInfo.js",
2654
- this.props.resourcePath + "/pdf.js",
2599
+ // this.props.resourcePath + "/pdf.js",
2655
2600
  this.props.resourcePath + "/EBML.js",
2656
2601
  this.props.resourcePath + "/mcu.js",
2657
2602
  this.props.resourcePath + "/meeting_desk_stream.js",
@@ -2784,8 +2729,9 @@ class Video extends Component {
2784
2729
  cameraClick = () => {
2785
2730
  if (this.isFileSuccuse()) {
2786
2731
  if (!this.state.audioed) {
2732
+ this.state.audioed = true,
2787
2733
  this.setState({
2788
- audioed: true,
2734
+
2789
2735
  cameraImg: cameraImgCloe
2790
2736
  });
2791
2737
  let sid = document.getElementById('publish_video1').name;
@@ -2806,8 +2752,8 @@ class Video extends Component {
2806
2752
  console.log(data)
2807
2753
  })
2808
2754
  } else if (this.state.audioed) {
2755
+ this.state.audioed = false,
2809
2756
  this.setState({
2810
- audioed: false,
2811
2757
  cameraImg: cameraImgOpen
2812
2758
  });
2813
2759
  let sid = document.getElementById('publish_video1').name;
@@ -2830,6 +2776,20 @@ class Video extends Component {
2830
2776
  }
2831
2777
  }
2832
2778
  };
2779
+ screenSwitching=()=>{
2780
+ if (this.isFileSuccuse()) {
2781
+ const publish_config = {};
2782
+ if (this.state.isSharedScreen) {
2783
+ const publish_config = {}
2784
+ publish_config.media_type = 1
2785
+ publish_config.publish_device = 2
2786
+ publish_config.video_profile_type = 1
2787
+ publish_config.sid = document.getElementById('video20').name
2788
+ this.test_controller.ChangeMediaStream(publish_config)
2789
+ this.state.isScreenSwitching = true
2790
+ }
2791
+ }
2792
+ }
2833
2793
  sharedScreen = () => {
2834
2794
  console.log('投屏')
2835
2795
  if (this.isFileSuccuse()) {
@@ -2848,9 +2808,9 @@ class Video extends Component {
2848
2808
  } else {
2849
2809
  this.test_controller.UnPublish(document.getElementById('video20').name)
2850
2810
  }
2811
+ this.state.isSharedScreen = false
2812
+ this.state.isScreenSwitching = false
2851
2813
  this.setState({
2852
- publishDevic: 1,
2853
- isSharedScreen: false,
2854
2814
  screenName: '投屏'
2855
2815
  });
2856
2816
  console.log(pictureInPictureVideo)
@@ -2862,22 +2822,22 @@ class Video extends Component {
2862
2822
  if (document.getElementById('video20').name) {
2863
2823
  publish_config.media_type = 1;
2864
2824
  publish_config.publish_device = 2;
2865
- publish_config.video_profile_type = 5;
2825
+ publish_config.video_profile_type = 1;
2866
2826
  publish_config.sid = document.getElementById('video20').name;
2867
2827
  this.test_controller.ChangeMediaStream(publish_config);
2868
2828
  } else {
2869
2829
  publish_config.media_type = 1
2870
2830
  publish_config.publish_device = 2
2871
2831
  publish_config.need_volume_analyser = true
2872
- publish_config.video_profile_type = 5
2832
+ publish_config.video_profile_type = 1
2873
2833
  publish_config.publish_video_id = 'video20'
2874
2834
  publish_config.publish_streamId_id = 'subscribe_streamId20'
2875
2835
  publish_config.publish_tag = 'projectionWhiteboard'
2876
2836
  this.test_controller.Publish(publish_config)
2877
2837
  }
2838
+ this.state.isSharedScreen = true
2839
+ this.state.isScreenSwitching = false
2878
2840
  this.setState({
2879
- publishDevic: 2,
2880
- isSharedScreen: true,
2881
2841
  screenName: '取消共享',
2882
2842
  isPDF: false
2883
2843
  })
@@ -3022,12 +2982,13 @@ class Video extends Component {
3022
2982
  })
3023
2983
  };
3024
2984
  invitationClick = () => {
2985
+ this.state.linkData = ''
3025
2986
  this.setState({
3026
2987
  isModalVisibleInvitation: true,
3027
2988
  employeeNumber: '',
3028
2989
  employeeName: '',
3029
2990
  employeeError: '',
3030
- linkData: ''
2991
+
3031
2992
  })
3032
2993
 
3033
2994
  }
@@ -3094,22 +3055,21 @@ class Video extends Component {
3094
3055
  sid = document.getElementById('video12').name;
3095
3056
  }
3096
3057
  console.log(sid)
3058
+ this.state.faceCustomerUid = item.customId,
3097
3059
  this.setState({
3098
3060
  clickedFacial: false,
3099
3061
  clickedOcr: false,
3100
- faceCustomerUid: item.customId,
3062
+
3101
3063
  isModalVisibleFacial: true,
3102
3064
  facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
3103
3065
  })
3104
3066
  }
3105
3067
  componentWillReceiveProps(props) {
3106
3068
  console.log('componentWillReceiveProps',props)
3107
- this.setState({
3108
- channelId: props.roomId,
3109
- rtoken: props.mtoken,
3110
- sessionId: props.sessionId,
3111
- imRoomId: props.imRoomId
3112
- });
3069
+ this.state.channelId = props.roomId,
3070
+ this.state.rtoken = props.mtoken,
3071
+ this.state.sessionId = props.sessionId,
3072
+ this.state.imRoomId = props.imRoomId
3113
3073
  }
3114
3074
  appGetUsername = async (sid) => {
3115
3075
  console.log(sid)
@@ -3249,9 +3209,8 @@ class Video extends Component {
3249
3209
  employeeError: result.data.staffName ? '' : '查无此人',
3250
3210
  })
3251
3211
  if(result.data.staffName){
3252
- this.setState({
3253
- linkData:'https://wp-staff-gateway.wealth-platform.uat.ali.cloud.cn.hsbc/meeting-ui/OHB/CN/HSBC?chnlID=OHB&locale=zh_CN&chnlCC=CN&chnlGMC=HSBC&targetFunc=supervisorMeeting&sourceFunc=rmMeeting&appointmentID='+ this.props.businessNumber + '&staffID='+this.state.employeeNumber+'&staffName='+ encodeURIComponent(result.data.staffName)
3254
- })
3212
+ this.state.linkData = 'https://wp-staff-gateway.wealth-platform.uat.ali.cloud.cn.hsbc/meeting-ui/OHB/CN/HSBC?chnlID=OHB&locale=zh_CN&chnlCC=CN&chnlGMC=HSBC&targetFunc=supervisorMeeting&sourceFunc=rmMeeting&appointmentID='+ this.props.businessNumber + '&staffID='+this.state.employeeNumber+'&staffName='+ encodeURIComponent(result.data.staffName)
3213
+
3255
3214
  }
3256
3215
  } else {
3257
3216
  this.messageClick('查询失败','error')
@@ -3285,16 +3244,21 @@ class Video extends Component {
3285
3244
  }
3286
3245
  }
3287
3246
  handleOkSign = () => {
3288
- this.counterSign({
3289
- file: this.signCanvas.current.canvas.drawing.toDataURL('image/png')
3247
+ this.setState({
3248
+ isModalVisibleSign: false,
3290
3249
  })
3250
+ console.log(this.signCanvas.current.canvas.drawing.toDataURL('image/png'))
3251
+ this.props.imgCallback(
3252
+ this.signCanvas.current.canvas.drawing.toDataURL('image/png').replace(/data.+?;base64,/, "")
3253
+ )
3254
+ // this.counterSign({
3255
+ // file: this.signCanvas.current.canvas.drawing.toDataURL('image/png')
3256
+ // })
3291
3257
  }
3292
3258
  switchExternal = () => {
3293
3259
  if (!this.state.isWhiteboard) {
3294
3260
  const publish_config = {};
3295
- this.setState({
3296
- isWhiteboard: true,
3297
- })
3261
+ this.state.isWhiteboard = true
3298
3262
  this.tabTitlesClick({
3299
3263
  value: 'RMWhiteboard',
3300
3264
  name: 'RM白板'
@@ -3372,11 +3336,19 @@ class Video extends Component {
3372
3336
  microphoneValue: event.target.value
3373
3337
  })
3374
3338
  }
3339
+ componentDidMount() {
3340
+ var box=document.getElementById("whiteboardDIV");
3341
+ if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
3342
+ this.state.whiteboardWidth = box.offsetWidth,
3343
+ this.state.whiteboardHeight = box.offsetHeight,
3344
+ console.log('whiteboardDIV', this.state.whiteboardHeight,this.state.whiteboardWidth)
3345
+ }
3346
+ }
3375
3347
  render() {
3376
3348
  const { meetingInfo } = this.props
3377
3349
  var pdfChildren
3378
3350
  if (this.props.children) {
3379
- pdfChildren = React.cloneElement(this.props.children, { width: 100, height: 100, id: 12 })
3351
+ pdfChildren = React.cloneElement(this.props.children, { width: this.state.whiteboardWidth, height: this.state.whiteboardHeight, show: this.state.isSelect == 'RMWhiteboard'})
3380
3352
  }
3381
3353
  const customerNameList = (
3382
3354
  <span className='labelClass'>
@@ -3478,7 +3450,7 @@ class Video extends Component {
3478
3450
  <div className="projection">
3479
3451
  {tabTitleList}
3480
3452
  <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" />
3481
- <div style={{height: this.state.tabTitles.length > 0 ? 'calc(100% - 33px)' : '100%'}}>
3453
+ <div id="whiteboardDIV" style={{height: this.state.tabTitles.length > 0 ? 'calc(100% - 33px)' : '100%'}}>
3482
3454
 
3483
3455
  <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
3484
3456
  <div className="videoDiv">
@@ -3538,7 +3510,7 @@ class Video extends Component {
3538
3510
  </div>
3539
3511
  <div className="wrapper" style={{ width: '20%', }}>
3540
3512
  <div
3541
- className={`itemed ${this.state.publishDevic == 4 ? '' : 'isBack'} `}
3513
+ className={`itemed`}
3542
3514
  >
3543
3515
  <div className="publishVideoDiv">
3544
3516
 
@@ -3930,6 +3902,7 @@ class Video extends Component {
3930
3902
  ocrClick={this.ocrClick}
3931
3903
  switchExternal={this.switchExternal}
3932
3904
  inspection={this.inspection}
3905
+ screenSwitching={this.screenSwitching}
3933
3906
  ></Foot>
3934
3907
  <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
3935
3908
  onCancel={this.handleCancel}>
@@ -4000,7 +3973,7 @@ class Video extends Component {
4000
3973
  }
4001
3974
 
4002
3975
  </Modal>
4003
- <Modal title="签字白板" closable={false} centered={true} visible={this.state.isModalVisibleSign} footer={
3976
+ <Modal title="签字白板" width={600} destroyOnClose={true} closable={false} centered={true} visible={this.state.isModalVisibleSign} footer={
4004
3977
  [
4005
3978
  <div key='okSign'>
4006
3979
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkSign}>确定</Button>
@@ -4071,6 +4044,7 @@ sessionId: "Fwua8kGB6",
4071
4044
  title: '--',
4072
4045
  host: '--',
4073
4046
  customers: ['--']
4074
- }
4047
+ },
4048
+ isTranscribing: false,
4075
4049
  }
4076
4050
  export default Video