react_hsbc_teller 1.2.8 → 1.3.1

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.2.8",
3
+ "version": "1.3.1",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -94,7 +94,7 @@ export default class foot extends Component {
94
94
  <div className="one">
95
95
  <img className="imgClass" src={require("../../assets/img/switchExternal.png").default} alt="" />
96
96
  <div className="text">
97
- 白板
97
+ 远程签署
98
98
  </div>
99
99
  </div>
100
100
  </div>
@@ -10,7 +10,7 @@ width: 100%;
10
10
  }
11
11
  .total{
12
12
  display: inline-flex;
13
- width: 33%;
13
+ width: 25%;
14
14
  height: 100%;
15
15
  align-items: center;
16
16
  // margin: 10px 0;
@@ -46,9 +46,11 @@ line-height: 11px;
46
46
  }
47
47
  .totalTwo{
48
48
  justify-content: center;
49
+ width: 50%;
49
50
  }
50
51
  .totalThree{
51
52
  // margin-top: 10px;
53
+ width: 25%;
52
54
  justify-content: flex-end;
53
55
  }
54
56
  .buttonClass{
@@ -36,6 +36,8 @@ let mix_stream
36
36
  let worker
37
37
  let streamShare
38
38
  let muteJson = new Map()
39
+ let dateTime = 0
40
+ let messageValue = ''
39
41
  message.config({
40
42
  getContainer: ()=>document.getElementById('allHSBC')
41
43
  })
@@ -265,7 +267,7 @@ class Video extends Component {
265
267
  let result = await API.mpaasSig({ account: data.account, type: data.type });
266
268
  console.log(result);
267
269
  window.sessionStorage.setItem('alimpassSig', result.mpsSig);
268
- this.state.workSpaceId = result.workSpaceId,
270
+ this.state.workSpaceId = result.workspaceId,
269
271
  this.state.appId = result.appId,
270
272
  this.state.bizName = result.bizName
271
273
  // const data1={
@@ -374,6 +376,7 @@ class Video extends Component {
374
376
  recordParam.startTimeout = 10;
375
377
  recordParam.splitType = 0;
376
378
  recordParam.endType = 1;
379
+ recordParam.crf = 30
377
380
  recordParam.overlaps = [
378
381
  {
379
382
  tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
@@ -386,30 +389,19 @@ class Video extends Component {
386
389
  fontSize: 16, // 字体⼤⼩
387
390
  url: '' // ⽔印图⽚ HTTP 地址
388
391
  },
389
- {
390
- tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
391
- type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
392
- id: 2, // ⽔印 ID
393
- enable: true,
394
- xPosition: 10, // x 轴位置
395
- yPosition: 50, // y 轴位置
396
- text: this.state.contentDress, // ⽔印⽂字
397
- fontSize: 16, // 字体⼤⼩
398
- url: '' // ⽔印图⽚ HTTP 地址
399
- }
400
392
  ];
401
393
  recordParam.tagPositions = [
402
394
  {
403
395
  tag: 'projectionWhiteboard',
404
396
  xPosition: 0,
405
- yPosition: 540,
406
- width: 960,
407
- height: 540
397
+ yPosition: 270,
398
+ width: 1280,
399
+ height: 720
408
400
  },
409
401
  {
410
402
  tag: 'VIDEO_SOURCE_SCREEN',
411
- xPosition: 0,
412
- yPosition: 180,
403
+ xPosition: 1280,
404
+ yPosition: 630,
413
405
  width: 640,
414
406
  height: 360
415
407
  },
@@ -417,86 +409,86 @@ class Video extends Component {
417
409
  tag: 'tag1',
418
410
  xPosition: 0,
419
411
  yPosition: 0,
420
- width: 240,
412
+ width: 310,
421
413
  height: 180
422
414
  },
423
415
  {
424
416
  tag: 'customer1',
425
- xPosition: 240,
417
+ xPosition: 320,
426
418
  yPosition: 0,
427
- width: 240,
419
+ width: 310,
428
420
  height: 180
429
421
  },
430
422
  {
431
423
  tag: 'customer2',
432
- xPosition: 480,
424
+ xPosition: 640,
433
425
  yPosition: 0,
434
- width: 240,
426
+ width: 310,
435
427
  height: 180
436
428
  },
437
429
  {
438
430
  tag: 'customer3',
439
- xPosition: 720,
431
+ xPosition: 960,
440
432
  yPosition: 0,
441
- width: 240,
433
+ width: 310,
442
434
  height: 180
443
435
  },
444
436
  {
445
437
  tag: 'customer4',
446
- xPosition: 960,
438
+ xPosition: 1280,
447
439
  yPosition: 0,
448
- width: 240,
440
+ width: 310,
449
441
  height: 180
450
442
  },
451
443
  {
452
444
  tag: 'customer5',
453
- xPosition: 1200,
454
- yPosition: 0,
455
- width: 240,
456
- height: 180
457
- },
458
- {
459
- tag: 'customer6',
460
- xPosition: 1440,
445
+ xPosition: 1600,
461
446
  yPosition: 0,
462
- width: 240,
447
+ width: 310,
463
448
  height: 180
464
449
  },
465
- {
466
- tag: 'customer7',
467
- xPosition: 1680,
468
- yPosition: 0,
469
- width: 240,
470
- height: 180
471
- },
472
- {
473
- tag: 'customer8',
474
- xPosition: 1680,
475
- yPosition: 180,
476
- width: 240,
477
- height: 180
478
- },
479
- {
480
- tag: 'customer9',
481
- xPosition: 1680,
482
- yPosition: 360,
483
- width: 240,
484
- height: 180
485
- },
486
- {
487
- tag: 'customer10',
488
- xPosition: 1680,
489
- yPosition: 540,
490
- width: 240,
491
- height: 180
492
- },
493
- {
494
- tag: 'customer11',
495
- xPosition: 1680,
496
- yPosition: 720,
497
- width: 240,
498
- height: 180
499
- }
450
+ // {
451
+ // tag: 'customer6',
452
+ // xPosition: 1440,
453
+ // yPosition: 0,
454
+ // width: 240,
455
+ // height: 180
456
+ // },
457
+ // {
458
+ // tag: 'customer7',
459
+ // xPosition: 1680,
460
+ // yPosition: 0,
461
+ // width: 240,
462
+ // height: 180
463
+ // },
464
+ // {
465
+ // tag: 'customer8',
466
+ // xPosition: 1680,
467
+ // yPosition: 180,
468
+ // width: 240,
469
+ // height: 180
470
+ // },
471
+ // {
472
+ // tag: 'customer9',
473
+ // xPosition: 1680,
474
+ // yPosition: 360,
475
+ // width: 240,
476
+ // height: 180
477
+ // },
478
+ // {
479
+ // tag: 'customer10',
480
+ // xPosition: 1680,
481
+ // yPosition: 540,
482
+ // width: 240,
483
+ // height: 180
484
+ // },
485
+ // {
486
+ // tag: 'customer11',
487
+ // xPosition: 1680,
488
+ // yPosition: 720,
489
+ // width: 240,
490
+ // height: 180
491
+ // }
500
492
  ]
501
493
  console.log('recordParam', recordParam);
502
494
  this.test_controller.StartRemoteRecord(filePath, recordParam, '')
@@ -796,23 +788,46 @@ class Video extends Component {
796
788
  }
797
789
  messageClick=(value,valueOne)=>{
798
790
  console.log(value,valueOne)
799
- if(valueOne == 'error') {
800
- message.error({
801
- content: value,
802
- icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
803
- className: 'errorClassName',
804
- top: 200,
805
- duration: 10
806
- })
807
- } else if(valueOne == 'success') {
808
- message.success({
809
- content: value,
810
- icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
811
- className: 'successClassName',
812
- top: 200,
813
- duration: 10
814
- })
815
- }
791
+ if(messageValue != value){
792
+ messageValue = value
793
+ dateTime = new Date().getTime()
794
+ if(valueOne == 'error') {
795
+ message.error({
796
+ content: value,
797
+ icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
798
+ className: 'errorClassName',
799
+ top: 200,
800
+ duration: 10
801
+ })
802
+ } else if(valueOne == 'success') {
803
+ message.success({
804
+ content: value,
805
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
806
+ className: 'successClassName',
807
+ top: 200,
808
+ duration: 10
809
+ })
810
+ }
811
+ } else if(((new Date().getTime()) - dateTime) / 1000 > 30){
812
+ dateTime = new Date().getTime()
813
+ if(valueOne == 'error') {
814
+ message.error({
815
+ content: value,
816
+ icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
817
+ className: 'errorClassName',
818
+ top: 200,
819
+ duration: 10
820
+ })
821
+ } else if(valueOne == 'success') {
822
+ message.success({
823
+ content: value,
824
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
825
+ className: 'successClassName',
826
+ top: 200,
827
+ duration: 10
828
+ })
829
+ }
830
+ }
816
831
 
817
832
  }
818
833
  // 人脸识别
@@ -837,6 +852,7 @@ class Video extends Component {
837
852
  endSessionValue = () => {
838
853
  if(streamShare) {
839
854
  streamShare.getTracks().forEach(track => track.stop());
855
+ streamShare=''
840
856
  }
841
857
  this.finishSession()
842
858
 
@@ -1424,6 +1440,7 @@ class Video extends Component {
1424
1440
  } else if (Mival.type == 2) {
1425
1441
  if(streamShare) {
1426
1442
  streamShare.getTracks().forEach(track => track.stop());
1443
+ streamShare = ''
1427
1444
  }
1428
1445
  this.tabTitlesClick('RMWhiteboard', 'delect')
1429
1446
  if (this.state.isSharedScreen) {
@@ -2147,6 +2164,21 @@ class Video extends Component {
2147
2164
  name: '客户投屏'
2148
2165
  }, 'add'
2149
2166
  )
2167
+ } else if (itemOne.tag == 'projectionWhiteboard') {
2168
+ config_param = {
2169
+ subscribe_video_id: 'video20',
2170
+ subscribe_audio_id: 'audio20',
2171
+ subscribe_streamId_id: 'subscribe_streamId20',
2172
+ feedId_id: 'feedId20',
2173
+ feedId: itemOne.feedId
2174
+ }
2175
+
2176
+ this.tabTitlesClick(
2177
+ {
2178
+ value: 'staffScreen',
2179
+ name: 'internal staff 投屏'
2180
+ }, 'add'
2181
+ )
2150
2182
  } else {
2151
2183
  if (!document.getElementById('video1').name) {
2152
2184
  config_param = {
@@ -2340,10 +2372,28 @@ class Video extends Component {
2340
2372
  if (config_param !== undefined) {
2341
2373
  config_param.need_volume_analyser = false
2342
2374
  console.log(config_param)
2343
- setTimeout(() => {
2375
+ this.test_controller.Subscribe(config_param)
2376
+
2377
+ }
2378
+ } else if (feed.tag == 'projectionWhiteboard') {
2379
+ config_param = {
2380
+ subscribe_video_id: 'video20',
2381
+ subscribe_audio_id: 'audio20',
2382
+ subscribe_streamId_id: 'subscribe_streamId20',
2383
+ feedId_id: 'feedId20',
2384
+ feedId: feed.feedId
2385
+ }
2344
2386
 
2387
+ this.tabTitlesClick(
2388
+ {
2389
+ value: 'staffScreen',
2390
+ name: 'internal staff 投屏'
2391
+ }, 'add'
2392
+ )
2393
+ if (config_param !== undefined) {
2394
+ config_param.need_volume_analyser = false
2395
+ console.log(config_param)
2345
2396
  this.test_controller.Subscribe(config_param)
2346
- }, 1000)
2347
2397
 
2348
2398
  }
2349
2399
  } else {
@@ -2528,6 +2578,11 @@ class Video extends Component {
2528
2578
  this.tabTitlesClick('customerScreen', 'delect')
2529
2579
  }
2530
2580
  }
2581
+ if (item.value == 'staffScreen') {
2582
+ if (!document.getElementById("video20").name) {
2583
+ this.tabTitlesClick('staffScreen', 'delect')
2584
+ }
2585
+ }
2531
2586
  })
2532
2587
  if (!document.getElementById("video1").name) {
2533
2588
  this.state.isPIBIntranet[0].type = false
@@ -2989,36 +3044,31 @@ class Video extends Component {
2989
3044
  // 停止共享
2990
3045
  this.test_controller.OnDesktopDisplayClosed = () => {
2991
3046
  console.log('OnDesktopDisplayClosed', this.state.isSharedScreen ,this.state.laveRoomSharedScreen)
2992
- if(this.state.isScreenSwitching) {
2993
- this.state.isScreenSwitching = false
3047
+
3048
+ if(this.state.isScreenSwitching) {
3049
+ this.state.isScreenSwitching = false
3050
+ } else {
3051
+ if(!streamShare) {
3052
+ document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
2994
3053
  } else {
2995
- // if (this.state.isWhiteboard) {
2996
- // publish_config.publish_device = 4
2997
- // publish_config.media_type = 1
2998
- // publish_config.sid = document.getElementById('video20').name
2999
- // publish_config.part_of_screen_id = 'touBoxItem'
3000
- // publish_config.video_profile_type = 5
3001
- // this.test_controller.ChangeMediaStream(publish_config);
3002
- // this.setState({
3003
- // isPDF: true,
3004
- // })
3005
- // } else {
3006
- document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
3054
+ console.log('白板')
3055
+ }
3056
+ this.state.isSharedScreen = false
3057
+ this.state.isScreenSwitching = false
3058
+ this.setState({
3059
+ screenName: '共享模式'
3060
+ });
3061
+ console.log(pictureInPictureVideo)
3062
+ this.tabTitlesClick('RMScreen', 'delect')
3063
+ if (this.state.isPictureInPicture) {
3064
+ document.exitPictureInPicture()
3065
+ }
3066
+ // if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
3067
+ // this.sharedScreen()
3007
3068
  // }
3008
- this.state.isSharedScreen = false
3009
- this.state.isScreenSwitching = false
3010
- this.setState({
3011
- screenName: '共享模式'
3012
- });
3013
- console.log(pictureInPictureVideo)
3014
- this.tabTitlesClick('RMScreen', 'delect')
3015
- if (this.state.isPictureInPicture) {
3016
- document.exitPictureInPicture()
3017
3069
  }
3018
- // if (!this.state.laveRoomSharedScreen && this.state.isSharedScreen) {
3019
- // this.sharedScreen()
3020
- // }
3021
- }
3070
+
3071
+
3022
3072
 
3023
3073
 
3024
3074
  };
@@ -3396,64 +3446,72 @@ class Video extends Component {
3396
3446
  }
3397
3447
  };
3398
3448
  sharedScreen = () => {
3399
- console.log('投屏')
3449
+ console.log('投屏', this.state.tabTitles.find(el=>el.value == 'staffScreen'))
3400
3450
  if (this.isFileSuccuse()) {
3401
- const publish_config = {};
3402
- if(streamShare) {
3403
- streamShare.getTracks().forEach(track => track.stop());
3404
- }
3405
- if (this.state.isSharedScreen) {
3406
- const publish_config = {}
3407
- publish_config.media_type = 1
3408
- publish_config.publish_device = 2
3409
- // publish_config.video_profile_type = 1
3410
- publish_config.video_profile_type=100
3411
- publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3412
- publish_config.enableDesktopAudio=true
3413
- publish_config.degradationType=2
3414
- publish_config.sid = document.getElementById('video20').name
3415
- this.test_controller.ChangeMediaStream(publish_config)
3416
- this.state.isScreenSwitching = true
3417
- } else {
3418
- if (document.getElementById('video20').name) {
3419
- publish_config.media_type = 1;
3420
- publish_config.publish_device = 2;
3421
- publish_config.video_profile_type=100
3422
- publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3423
- publish_config.enableDesktopAudio=true
3424
- publish_config.degradationType=2
3425
- publish_config.sid = document.getElementById('video20').name;
3426
- this.test_controller.ChangeMediaStream(publish_config);
3427
- } else {
3451
+ if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
3452
+ const publish_config = {};
3453
+ if(streamShare) {
3454
+ streamShare.getTracks().forEach(track => track.stop());
3455
+ streamShare = ''
3456
+ }
3457
+ if (this.state.isSharedScreen) {
3458
+ const publish_config = {}
3428
3459
  publish_config.media_type = 1
3429
3460
  publish_config.publish_device = 2
3430
- publish_config.need_volume_analyser = true
3431
- publish_config.video_profile_type=100
3432
- publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3461
+ publish_config.video_profile_type = 1
3462
+ // publish_config.video_profile_type=100
3463
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3433
3464
  publish_config.enableDesktopAudio=true
3434
3465
  publish_config.degradationType=2
3435
- publish_config.publish_video_id = 'video20'
3436
- publish_config.publish_streamId_id = 'subscribe_streamId20'
3437
- publish_config.publish_tag = 'projectionWhiteboard'
3438
- this.test_controller.Publish(publish_config)
3439
- }
3440
- // this.state.isSharedScreen = true
3441
- // this.state.isScreenSwitching = false
3442
- this.setState({
3443
- screenName: '切换共享',
3444
- isPDF: false
3445
- })
3446
- this.tabTitlesClick(
3447
- {
3448
- value: 'RMScreen',
3449
- name: '共享内容'
3450
- }, 'add'
3451
- )
3452
- if (!this.state.isPictureInPicture) {
3453
- this.pictureInPicture()
3466
+ publish_config.sid = document.getElementById('video20').name
3467
+ this.test_controller.ChangeMediaStream(publish_config)
3468
+ this.state.isScreenSwitching = true
3469
+ } else {
3470
+ if (document.getElementById('video20').name) {
3471
+ publish_config.media_type = 1;
3472
+ publish_config.publish_device = 2;
3473
+ publish_config.video_profile_type = 1
3474
+ // publish_config.video_profile_type=100
3475
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3476
+ publish_config.enableDesktopAudio=true
3477
+ publish_config.degradationType=2
3478
+ publish_config.sid = document.getElementById('video20').name;
3479
+ this.test_controller.ChangeMediaStream(publish_config);
3480
+ } else {
3481
+ publish_config.media_type = 1
3482
+ publish_config.publish_device = 2
3483
+ publish_config.need_volume_analyser = true
3484
+ publish_config.video_profile_type = 1
3485
+ // publish_config.video_profile_type=100
3486
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3487
+ publish_config.enableDesktopAudio=true
3488
+ publish_config.degradationType=2
3489
+ publish_config.publish_video_id = 'video20'
3490
+ publish_config.publish_streamId_id = 'subscribe_streamId20'
3491
+ publish_config.publish_tag = 'projectionWhiteboard'
3492
+ this.test_controller.Publish(publish_config)
3493
+ }
3494
+ // this.state.isSharedScreen = true
3495
+ // this.state.isScreenSwitching = false
3496
+ this.setState({
3497
+ screenName: '切换共享',
3498
+ isPDF: false
3499
+ })
3500
+ this.tabTitlesClick(
3501
+ {
3502
+ value: 'RMScreen',
3503
+ name: '共享内容'
3504
+ }, 'add'
3505
+ )
3506
+ if (!this.state.isPictureInPicture) {
3507
+ this.pictureInPicture()
3508
+ }
3509
+
3454
3510
  }
3455
-
3511
+ } else {
3512
+ this.messageClick('internal staff正在共享屏幕,请先关闭','error')
3456
3513
  }
3514
+
3457
3515
  }
3458
3516
  };
3459
3517
  suspend = () => {
@@ -4005,6 +4063,7 @@ class Video extends Component {
4005
4063
  .then((stream) => {
4006
4064
  if(streamShare) {
4007
4065
  streamShare.getTracks().forEach(track => track.stop());
4066
+ streamShare = ''
4008
4067
  }
4009
4068
  videoMedia.srcObject = stream;
4010
4069
  stream.getVideoTracks()[0].applyConstraints({
@@ -4014,6 +4073,7 @@ class Video extends Component {
4014
4073
  streamShare = stream
4015
4074
  stream.getVideoTracks()[0].onended = async ()=>{
4016
4075
  //单击停止共享按钮后,触发这个事件
4076
+ streamShare = ''
4017
4077
  if(document.getElementById('video20').name&&!this.state.isSharedScreen) {
4018
4078
  that.test_controller.UnPublish(document.getElementById('video20').name)
4019
4079
  }
@@ -4024,6 +4084,7 @@ class Video extends Component {
4024
4084
  }
4025
4085
  switchExternal = () => {
4026
4086
  if (this.isFileSuccuse()) {
4087
+ if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
4027
4088
  if (!this.state.isWhiteboard) {
4028
4089
  this.setState({
4029
4090
  isWhiteboard: true
@@ -4046,6 +4107,9 @@ class Video extends Component {
4046
4107
  }
4047
4108
 
4048
4109
  this.navigatorClick()
4110
+ } else {
4111
+ this.messageClick('internal staff正在共享屏幕,请先关闭','error')
4112
+ }
4049
4113
  }
4050
4114
  }
4051
4115
  switchSelect = (value) => {
@@ -4349,7 +4413,7 @@ class Video extends Component {
4349
4413
  {/* <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" /> */}
4350
4414
  <div id="whiteboardDIV" style={{height: 'calc(100% - 33px)'}}>
4351
4415
 
4352
- <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
4416
+ <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen' || this.state.isSelect == 'staffScreen') ? '' : 'none', }}>
4353
4417
  <div className="videoDiv">
4354
4418
  <video
4355
4419
  id="video20"
@@ -272,7 +272,7 @@
272
272
  // top: 0;
273
273
  // left: 0;
274
274
  .selectSee{
275
- width: 92px;
275
+ max-width: 8rem;
276
276
  height: 32px;
277
277
  text-align: center;
278
278
  background: #303D46;
@@ -282,7 +282,7 @@
282
282
  font-size: 14px;
283
283
  }
284
284
  .noSelest{
285
- width: 92px;
285
+ max-width: 8rem;
286
286
  height: 32px;
287
287
  text-align: center;
288
288
  background: #D7D8D6;