react_hsbc_teller 2.0.33 → 2.0.34

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": "2.0.33",
3
+ "version": "2.0.34",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -81,6 +81,29 @@ class API extends Server{
81
81
  throw err;
82
82
  }
83
83
  }
84
+ /**
85
+ * 用途:保存共享状态
86
+ * 返回http_code为200表示成功
87
+ * @method post
88
+ * @return {promise}
89
+ */
90
+ async editRmScreenStatus(params = {}){
91
+ try{
92
+ let result = await this.axios('post', '/hsbc/editRmScreenStatus', params);
93
+ if(result && result.code === 200){
94
+ return result.data||[];
95
+ }else{
96
+ let err = {
97
+ tip: '共享状态保存失败',
98
+ response: result,
99
+ data: params,
100
+ }
101
+ throw err;
102
+ }
103
+ }catch(err){
104
+ throw err;
105
+ }
106
+ }
84
107
  /**
85
108
  * 用途:敏感词检测
86
109
  * @url https://api.cangdu.org/shopro/data/products
@@ -8,7 +8,7 @@ export default class header extends Component {
8
8
  return(
9
9
  <div className="Hamburger">
10
10
  <div className="left-header">
11
- <div className="title">汇丰银行远程会议</div>
11
+ <div className="title">汇丰银行{this.props.recordMode==2?'分行':'远程'}会议</div>
12
12
  </div>
13
13
  </div>
14
14
  )
@@ -58,7 +58,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
58
58
  import axios from 'axios';
59
59
  import CryptoJS from "crypto-js";
60
60
 
61
- const SDK_VERISON = '2.0.33'
61
+ const SDK_VERISON = '2.0.34'
62
62
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
63
63
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
64
64
  const { Option } = Select;
@@ -2336,6 +2336,9 @@ class Video extends Component {
2336
2336
  this.state.imStatus = true
2337
2337
  this.saveLog('Join im room')
2338
2338
  console.log('加入IM房间')
2339
+
2340
+ // 如果重新加入房间,手动重置一下投屏状态
2341
+ this.setSharedScreenState(false)
2339
2342
  };
2340
2343
  // 加入房间失败
2341
2344
  this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
@@ -2494,9 +2497,10 @@ class Video extends Component {
2494
2497
  'sharedScreen': 1,
2495
2498
  'tellerId': this.props.tellerAccount
2496
2499
  })
2497
- if (this.state.screenName == '共享屏幕') {
2500
+ if (this.state.screenName == '切换共享') {
2498
2501
  this.state.isSharedScreen = true
2499
2502
  this.state.isScreenSwitching = false
2503
+ this.setSharedScreenState(true)
2500
2504
  }
2501
2505
  }
2502
2506
  if (sid == document.getElementById('publish_streamId1').name) {
@@ -2803,6 +2807,7 @@ class Video extends Component {
2803
2807
  'tellerId': this.props.tellerAccount
2804
2808
  })
2805
2809
  this.state.isSharedScreen = false
2810
+ this.setSharedScreenState(false)
2806
2811
  this.setState({
2807
2812
 
2808
2813
  screenName: '共享模式'
@@ -2928,6 +2933,9 @@ class Video extends Component {
2928
2933
  this.setState({
2929
2934
  ipadTag: '',
2930
2935
  })
2936
+ this.messageClick(('iPad 已断开'), 'error')
2937
+ this.saveLog('iPad leave room')
2938
+ return
2931
2939
  }
2932
2940
 
2933
2941
 
@@ -3261,6 +3269,7 @@ class Video extends Component {
3261
3269
  if (this.state.screenName == '切换共享') {
3262
3270
  this.state.isSharedScreen = true
3263
3271
  this.state.isScreenSwitching = false
3272
+ this.setSharedScreenState(true)
3264
3273
  }
3265
3274
  }
3266
3275
  };
@@ -3281,6 +3290,7 @@ class Video extends Component {
3281
3290
  this.test_controller.UnPublish(document.getElementById('video20').name)
3282
3291
  this.state.isSharedScreen = false
3283
3292
  this.state.isScreenSwitching = false
3293
+ this.setSharedScreenState(false)
3284
3294
  this.setState({
3285
3295
  screenName: '共享模式'
3286
3296
  });
@@ -3420,6 +3430,7 @@ class Video extends Component {
3420
3430
  }
3421
3431
  this.state.isSharedScreen = false
3422
3432
  this.state.isScreenSwitching = false
3433
+ this.setSharedScreenState(false)
3423
3434
  this.setState({
3424
3435
  screenName: '共享模式'
3425
3436
  });
@@ -3660,6 +3671,7 @@ class Video extends Component {
3660
3671
  screenName: '共享模式',
3661
3672
  })
3662
3673
  this.state.isSharedScreen = false
3674
+ this.setSharedScreenState(false)
3663
3675
  this.state.laveRoomSharedScreen = true
3664
3676
  // this.test_controller.UnPublish(document.getElementById('video20').name)
3665
3677
 
@@ -3673,6 +3685,7 @@ class Video extends Component {
3673
3685
  screenName: '共享模式',
3674
3686
  });
3675
3687
  this.state.isSharedScreen = false
3688
+ this.setSharedScreenState(false)
3676
3689
  this.state.laveRoomSharedScreen = true
3677
3690
  this.props.onLeaveRoom({
3678
3691
  code: LEAVE_TYPE.TELLER_EXIT,
@@ -4076,6 +4089,20 @@ class Video extends Component {
4076
4089
  }
4077
4090
  }
4078
4091
  }
4092
+ setSharedScreenState = async (state) => {
4093
+ const status = state? 'open' : 'close'
4094
+ try {
4095
+ let result = await API.editRmScreenStatus({
4096
+ roomId: this.state.channelId + '',
4097
+ status,
4098
+ staffId: this.props.tellerAccount,
4099
+ });
4100
+ } catch (err) {
4101
+ if(err.status == 502 || err.status== 404) {
4102
+ this.roomCallBack(2, '连接服务器失败','SYS-02')
4103
+ }
4104
+ }
4105
+ }
4079
4106
  isFileSuccuse = () => {
4080
4107
  if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
4081
4108
  this.messageClick('当前程序异常请先退出重开', 'error')
@@ -5385,6 +5412,7 @@ class Video extends Component {
5385
5412
  document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
5386
5413
  that.state.isSharedScreen = false
5387
5414
  that.state.isScreenSwitching = false
5415
+ that.setSharedScreenState(false)
5388
5416
  that.setState({
5389
5417
  screenName: '共享模式'
5390
5418
  });
@@ -5495,6 +5523,7 @@ class Video extends Component {
5495
5523
  }, 'add')
5496
5524
  if (this.state.isSharedScreen) {
5497
5525
  this.state.isSharedScreen = false
5526
+ this.setSharedScreenState(false)
5498
5527
  this.setState({
5499
5528
 
5500
5529
  screenName: '共享模式'
@@ -6415,7 +6444,7 @@ class Video extends Component {
6415
6444
  return (
6416
6445
  <div className="all" id="allHSBC">
6417
6446
  <Spin spinning={this.state.loading} tip="视频初始化中...">
6418
- <Header></Header>
6447
+ <Header recordMode={this.props.recordMode}></Header>
6419
6448
  <div className="health">
6420
6449
  <div className="healthVideo">
6421
6450
  <div className="projection" style={{ background: this.state.tabTitles.length > 0 ? '#f0f0f0' : '#ffffff' }}>