react_hsbc_teller 2.0.97 → 2.0.99

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.97",
3
+ "version": "2.0.99",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -51,7 +51,7 @@ sessionId
51
51
  financialOffice: "defaultOfficeId", // 理财室
52
52
  audioinputNameList: ['默认值 - 外部麦克风 (Realtek(R) Audio)'],
53
53
  needPreSale: true,
54
- needIpad: false,
54
+ needIpad: true,
55
55
  }
56
56
  componentWillMount() {
57
57
  // if(window.localStorage.getItem('sessionId') && window.localStorage.getItem('sessionId') != 'null' && window.localStorage.getItem('sessionId') != 'undefined') {
@@ -66,7 +66,7 @@ import axios from 'axios';
66
66
  import CryptoJS from "crypto-js";
67
67
 
68
68
 
69
- const SDK_VERISON = '2.0.97'
69
+ const SDK_VERISON = '2.0.99'
70
70
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
71
71
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
72
72
  const { Option } = Select;
@@ -1392,19 +1392,23 @@ class Video extends Component {
1392
1392
  };
1393
1393
  // 画中画
1394
1394
  pictureInPicture = (val) => {
1395
- if (this.isFileSuccuse()) {
1396
- if (this.state.isPictureInPicture) {
1397
- if (!val) {
1398
- document.exitPictureInPicture()
1395
+ // recordMode 为1 或者needIpad 为true 时,才支持画中画
1396
+ if(this.props.recordMode == '1' || this.props.needIpad) {
1397
+ if (this.isFileSuccuse()) {
1398
+ if (this.state.isPictureInPicture) {
1399
+ if (!val) {
1400
+ document.exitPictureInPicture()
1401
+ } else {
1402
+ this.pictureInPictureClick('update')
1403
+ }
1399
1404
  } else {
1400
- this.pictureInPictureClick('update')
1401
- }
1402
- } else {
1403
- if (!val) {
1404
- this.pictureInPictureClick('add')
1405
+ if (!val) {
1406
+ this.pictureInPictureClick('add')
1407
+ }
1405
1408
  }
1406
1409
  }
1407
1410
  }
1411
+
1408
1412
  };
1409
1413
  pictureInPictureClick = (val) => {
1410
1414
  let interval
@@ -1975,10 +1979,10 @@ class Video extends Component {
1975
1979
  isWhiteboard: false
1976
1980
  })
1977
1981
  } else {
1978
- if (document.getElementById('video20').name) {
1982
+ if (document.getElementById('video20').name || this.state.publishScreenSid) {
1979
1983
  this.saveLog('unPublish share, reason: receive stop whiteboard message 1218')
1980
1984
  console.log('unPublish share, reason: receive stop whiteboard message 1218')
1981
- this.test_controller.UnPublish(document.getElementById('video20').name)
1985
+ this.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
1982
1986
  if(this.state.drawCanvasInterval) clearInterval(this.state.drawCanvasInterval)
1983
1987
  }
1984
1988
  this.setState({
@@ -3934,6 +3938,7 @@ class Video extends Component {
3934
3938
  }
3935
3939
  if (sid == document.getElementById('video20').name) {
3936
3940
  if (this.state.screenName == '切换共享') {
3941
+ this.state.publishScreenSid = sid
3937
3942
  this.state.isSharedScreen = true
3938
3943
  this.state.isScreenSwitching = false
3939
3944
  this.setSharedScreenState(true)
@@ -3958,7 +3963,7 @@ class Video extends Component {
3958
3963
  } else if (this.state.screenName == '切换共享') {
3959
3964
  this.saveLog('unPublish share, reason: trigger OnChangeMediaStreamFailed')
3960
3965
  console.log('unPublish share, reason: trigger OnChangeMediaStreamFailed')
3961
- this.test_controller.UnPublish(document.getElementById('video20').name)
3966
+ this.test_controller.UnPublish(document.getElementById('video20').name || sid)
3962
3967
  this.state.isSharedScreen = false
3963
3968
  this.state.isScreenSwitching = false
3964
3969
  this.setSharedScreenState(false)
@@ -4109,14 +4114,18 @@ class Video extends Component {
4109
4114
  // 停止共享
4110
4115
  this.test_controller.OnDesktopDisplayClosed = () => {
4111
4116
  console.log('OnDesktopDisplayClosed', this.state.isSharedScreen, this.state.laveRoomSharedScreen, streamShare)
4112
-
4113
4117
  if (this.state.isScreenSwitching) {
4114
4118
  this.state.isScreenSwitching = false
4115
4119
  } else {
4116
4120
  if (!streamShare) {
4121
+ let shareSid = (document.getElementById('video20') && document.getElementById('video20').name) ? document.getElementById('video20').name : this.state.publishScreenSid
4117
4122
  this.saveLog('unPublish share, reason: trigger OnDesktopDisplayClosed, manually click stop or stream onended')
4123
+ this.saveLog('OnDesktopDisplayClosed: publishScreenSid:' + this.state.publishScreenSid + '---' + document.getElementById('video20') + '---' + document.getElementById('video20').name + '----' + 'shareSid:' + shareSid)
4118
4124
  console.log('unPublish share, reason: trigger OnDesktopDisplayClosed, manually click stop or stream onended')
4119
- document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
4125
+ console.log('OnDesktopDisplayClosed: publishScreenSid:' + this.state.publishScreenSid + '---' + document.getElementById('video20') + '---' + document.getElementById('video20').name + '----' + 'shareSid:' + shareSid)
4126
+ if(shareSid) {
4127
+ this.test_controller.UnPublish(shareSid)
4128
+ }
4120
4129
  } else {
4121
4130
  console.log('白板')
4122
4131
  }
@@ -4988,7 +4997,7 @@ class Video extends Component {
4988
4997
  if (this.state.isSharedScreen) {
4989
4998
  this.saveLog('unPublish share, reason: change screen content')
4990
4999
  console.log('unPublish share, reason: change screen content')
4991
- this.test_controller.UnPublish(document.getElementById('video20').name)
5000
+ this.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
4992
5001
  this.state.shareLock = true;
4993
5002
  setTimeout(() => {
4994
5003
  publish_config.media_type = 1
@@ -5027,10 +5036,10 @@ class Video extends Component {
5027
5036
  // this.test_controller.ChangeMediaStream(publish_config)
5028
5037
  // this.state.isScreenSwitching = true
5029
5038
  } else {
5030
- if (document.getElementById('video20').name) {
5039
+ if (document.getElementById('video20').name || this.state.publishScreenSid) {
5031
5040
  this.saveLog('unPublish share, reason: change screen content')
5032
5041
  console.log('unPublish share, reason: change screen content')
5033
- this.test_controller.UnPublish(document.getElementById('video20').name)
5042
+ this.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
5034
5043
  this.state.shareLock = true;
5035
5044
  setTimeout(() => {
5036
5045
  publish_config.media_type = 1
@@ -6286,12 +6295,12 @@ class Video extends Component {
6286
6295
 
6287
6296
  this.state.drawCanvasInterval = setInterval($this.drawFunction , 1000/ 20);
6288
6297
 
6289
- if (document.getElementById('video20').name) {
6298
+ if (document.getElementById('video20').name || this.state.publishScreenSid) {
6290
6299
  // 代表已经有了进行切流
6291
6300
  publish_config.publish_device = 5
6292
6301
  publish_config.media_type = 1
6293
6302
  publish_config.degradationType = 2
6294
- publish_config.sid = document.getElementById('video20').name
6303
+ publish_config.sid = document.getElementById('video20').name || this.state.publishScreenSid
6295
6304
  publish_config.stream = canvas.captureStream(10)
6296
6305
  publish_config.video_profile_type = 1
6297
6306
  this.test_controller.ChangeMediaStream(publish_config);
@@ -6338,18 +6347,18 @@ class Video extends Component {
6338
6347
  stream.getVideoTracks()[0].onended = async () => {
6339
6348
  //单击停止共享按钮后,触发这个事件
6340
6349
  streamShare = ''
6341
- if (document.getElementById('video20').name && !this.state.isSharedScreen) {
6350
+ if ((document.getElementById('video20').name || this.state.publishScreenSid) && !this.state.isSharedScreen) {
6342
6351
  console.log('unPublish share, reason: click stop sharing whiteboard or stream onended')
6343
6352
  that.saveLog('unPublish share, reason: click stop sharing whiteboard or stream onended')
6344
- that.test_controller.UnPublish(document.getElementById('video20').name)
6353
+ that.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
6345
6354
  }
6346
6355
  }
6347
6356
 
6348
6357
  // 关闭当前共享屏幕
6349
- if (document.getElementById('video20') && document.getElementById('video20').name) {
6358
+ if ((document.getElementById('video20') && document.getElementById('video20').name) || this.state.publishScreenSid) {
6350
6359
  console.log('unPublish share, reason: going to share whiteboard, shared screen needs to be stopped')
6351
6360
  that.saveLog('unPublish share, reason: going to share whiteboard, shared screen needs to be stopped')
6352
- that.test_controller.UnPublish(document.getElementById('video20').name)
6361
+ that.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
6353
6362
  }
6354
6363
  that.state.isSharedScreen = false
6355
6364
  that.state.isScreenSwitching = false
@@ -7583,7 +7592,7 @@ class Video extends Component {
7583
7592
 
7584
7593
  </ul>
7585
7594
  </div>
7586
- {!this.state.loading && this.state.sessionType && this.state.sessionId && this.props.recordMode == 2?
7595
+ {!this.state.loading && this.state.sessionType && this.state.sessionId && (this.props.recordMode == 2 && this.props.needIpad)?
7587
7596
  <div className='QRCode'>
7588
7597
  <QRCode
7589
7598
  value={JSON.stringify({
@@ -8294,7 +8303,7 @@ class Video extends Component {
8294
8303
  </div>
8295
8304
  </Panel>
8296
8305
  {
8297
- this.props.recordMode == 2 &&
8306
+ this.props.recordMode == 2 && this.props.needIpad &&
8298
8307
  <Panel header={<span>双录iPad设备 - {this.state.ipadTag? '合格':'未开启'} {this.state.ipadTag? <img src={IconSuccess} />: <img src={IconFail} />}</span>} key="6" className={this.state.ipadTag? '':'panel-error'}>
8299
8308
  <p className="envClass">{this.state.ipadTag? 'iPad设备已加入':'请使用双录iPAD扫描以下会议二维码或输入会议号,开启双录'}</p>
8300
8309
  <div className='QRCode flex' style={{display: this.state.ipadTag? 'none':''}}>