react_hsbc_teller 1.2.8 → 1.2.9

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.2.9",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -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={
@@ -386,30 +388,19 @@ class Video extends Component {
386
388
  fontSize: 16, // 字体⼤⼩
387
389
  url: '' // ⽔印图⽚ HTTP 地址
388
390
  },
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
391
  ];
401
392
  recordParam.tagPositions = [
402
393
  {
403
394
  tag: 'projectionWhiteboard',
404
395
  xPosition: 0,
405
- yPosition: 540,
406
- width: 960,
407
- height: 540
396
+ yPosition: 270,
397
+ width: 1280,
398
+ height: 720
408
399
  },
409
400
  {
410
401
  tag: 'VIDEO_SOURCE_SCREEN',
411
- xPosition: 0,
412
- yPosition: 180,
402
+ xPosition: 1280,
403
+ yPosition: 630,
413
404
  width: 640,
414
405
  height: 360
415
406
  },
@@ -417,86 +408,86 @@ class Video extends Component {
417
408
  tag: 'tag1',
418
409
  xPosition: 0,
419
410
  yPosition: 0,
420
- width: 240,
411
+ width: 310,
421
412
  height: 180
422
413
  },
423
414
  {
424
415
  tag: 'customer1',
425
- xPosition: 240,
416
+ xPosition: 320,
426
417
  yPosition: 0,
427
- width: 240,
418
+ width: 310,
428
419
  height: 180
429
420
  },
430
421
  {
431
422
  tag: 'customer2',
432
- xPosition: 480,
423
+ xPosition: 640,
433
424
  yPosition: 0,
434
- width: 240,
425
+ width: 310,
435
426
  height: 180
436
427
  },
437
428
  {
438
429
  tag: 'customer3',
439
- xPosition: 720,
430
+ xPosition: 960,
440
431
  yPosition: 0,
441
- width: 240,
432
+ width: 310,
442
433
  height: 180
443
434
  },
444
435
  {
445
436
  tag: 'customer4',
446
- xPosition: 960,
437
+ xPosition: 1280,
447
438
  yPosition: 0,
448
- width: 240,
439
+ width: 310,
449
440
  height: 180
450
441
  },
451
442
  {
452
443
  tag: 'customer5',
453
- xPosition: 1200,
444
+ xPosition: 1600,
454
445
  yPosition: 0,
455
- width: 240,
456
- height: 180
457
- },
458
- {
459
- tag: 'customer6',
460
- xPosition: 1440,
461
- yPosition: 0,
462
- width: 240,
463
- height: 180
464
- },
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,
446
+ width: 310,
491
447
  height: 180
492
448
  },
493
- {
494
- tag: 'customer11',
495
- xPosition: 1680,
496
- yPosition: 720,
497
- width: 240,
498
- height: 180
499
- }
449
+ // {
450
+ // tag: 'customer6',
451
+ // xPosition: 1440,
452
+ // yPosition: 0,
453
+ // width: 240,
454
+ // height: 180
455
+ // },
456
+ // {
457
+ // tag: 'customer7',
458
+ // xPosition: 1680,
459
+ // yPosition: 0,
460
+ // width: 240,
461
+ // height: 180
462
+ // },
463
+ // {
464
+ // tag: 'customer8',
465
+ // xPosition: 1680,
466
+ // yPosition: 180,
467
+ // width: 240,
468
+ // height: 180
469
+ // },
470
+ // {
471
+ // tag: 'customer9',
472
+ // xPosition: 1680,
473
+ // yPosition: 360,
474
+ // width: 240,
475
+ // height: 180
476
+ // },
477
+ // {
478
+ // tag: 'customer10',
479
+ // xPosition: 1680,
480
+ // yPosition: 540,
481
+ // width: 240,
482
+ // height: 180
483
+ // },
484
+ // {
485
+ // tag: 'customer11',
486
+ // xPosition: 1680,
487
+ // yPosition: 720,
488
+ // width: 240,
489
+ // height: 180
490
+ // }
500
491
  ]
501
492
  console.log('recordParam', recordParam);
502
493
  this.test_controller.StartRemoteRecord(filePath, recordParam, '')
@@ -796,23 +787,46 @@ class Video extends Component {
796
787
  }
797
788
  messageClick=(value,valueOne)=>{
798
789
  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
- }
790
+ if(messageValue != value){
791
+ messageValue = value
792
+ dateTime = new Date().getTime()
793
+ if(valueOne == 'error') {
794
+ message.error({
795
+ content: value,
796
+ icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
797
+ className: 'errorClassName',
798
+ top: 200,
799
+ duration: 10
800
+ })
801
+ } else if(valueOne == 'success') {
802
+ message.success({
803
+ content: value,
804
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
805
+ className: 'successClassName',
806
+ top: 200,
807
+ duration: 10
808
+ })
809
+ }
810
+ } else if(((new Date().getTime()) - dateTime) / 1000 > 30){
811
+ dateTime = new Date().getTime()
812
+ if(valueOne == 'error') {
813
+ message.error({
814
+ content: value,
815
+ icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
816
+ className: 'errorClassName',
817
+ top: 200,
818
+ duration: 10
819
+ })
820
+ } else if(valueOne == 'success') {
821
+ message.success({
822
+ content: value,
823
+ icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
824
+ className: 'successClassName',
825
+ top: 200,
826
+ duration: 10
827
+ })
828
+ }
829
+ }
816
830
 
817
831
  }
818
832
  // 人脸识别
@@ -2147,6 +2161,21 @@ class Video extends Component {
2147
2161
  name: '客户投屏'
2148
2162
  }, 'add'
2149
2163
  )
2164
+ } else if (itemOne.tag == 'projectionWhiteboard') {
2165
+ config_param = {
2166
+ subscribe_video_id: 'video20',
2167
+ subscribe_audio_id: 'audio20',
2168
+ subscribe_streamId_id: 'subscribe_streamId20',
2169
+ feedId_id: 'feedId20',
2170
+ feedId: itemOne.feedId
2171
+ }
2172
+
2173
+ this.tabTitlesClick(
2174
+ {
2175
+ value: 'staffScreen',
2176
+ name: 'internal staff 投屏'
2177
+ }, 'add'
2178
+ )
2150
2179
  } else {
2151
2180
  if (!document.getElementById('video1').name) {
2152
2181
  config_param = {
@@ -2340,10 +2369,28 @@ class Video extends Component {
2340
2369
  if (config_param !== undefined) {
2341
2370
  config_param.need_volume_analyser = false
2342
2371
  console.log(config_param)
2343
- setTimeout(() => {
2372
+ this.test_controller.Subscribe(config_param)
2373
+
2374
+ }
2375
+ } else if (feed.tag == 'projectionWhiteboard') {
2376
+ config_param = {
2377
+ subscribe_video_id: 'video20',
2378
+ subscribe_audio_id: 'audio20',
2379
+ subscribe_streamId_id: 'subscribe_streamId20',
2380
+ feedId_id: 'feedId20',
2381
+ feedId: feed.feedId
2382
+ }
2344
2383
 
2384
+ this.tabTitlesClick(
2385
+ {
2386
+ value: 'staffScreen',
2387
+ name: 'internal staff 投屏'
2388
+ }, 'add'
2389
+ )
2390
+ if (config_param !== undefined) {
2391
+ config_param.need_volume_analyser = false
2392
+ console.log(config_param)
2345
2393
  this.test_controller.Subscribe(config_param)
2346
- }, 1000)
2347
2394
 
2348
2395
  }
2349
2396
  } else {
@@ -2528,6 +2575,11 @@ class Video extends Component {
2528
2575
  this.tabTitlesClick('customerScreen', 'delect')
2529
2576
  }
2530
2577
  }
2578
+ if (item.value == 'staffScreen') {
2579
+ if (!document.getElementById("video20").name) {
2580
+ this.tabTitlesClick('staffScreen', 'delect')
2581
+ }
2582
+ }
2531
2583
  })
2532
2584
  if (!document.getElementById("video1").name) {
2533
2585
  this.state.isPIBIntranet[0].type = false
@@ -3396,64 +3448,71 @@ class Video extends Component {
3396
3448
  }
3397
3449
  };
3398
3450
  sharedScreen = () => {
3399
- console.log('投屏')
3451
+ console.log('投屏', this.state.tabTitles.find(el=>el.value == 'staffScreen'))
3400
3452
  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 {
3453
+ if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
3454
+ const publish_config = {};
3455
+ if(streamShare) {
3456
+ streamShare.getTracks().forEach(track => track.stop());
3457
+ }
3458
+ if (this.state.isSharedScreen) {
3459
+ const publish_config = {}
3428
3460
  publish_config.media_type = 1
3429
3461
  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}
3462
+ publish_config.video_profile_type = 1
3463
+ // publish_config.video_profile_type=100
3464
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3433
3465
  publish_config.enableDesktopAudio=true
3434
3466
  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()
3467
+ publish_config.sid = document.getElementById('video20').name
3468
+ this.test_controller.ChangeMediaStream(publish_config)
3469
+ this.state.isScreenSwitching = true
3470
+ } else {
3471
+ if (document.getElementById('video20').name) {
3472
+ publish_config.media_type = 1;
3473
+ publish_config.publish_device = 2;
3474
+ publish_config.video_profile_type = 1
3475
+ // publish_config.video_profile_type=100
3476
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3477
+ publish_config.enableDesktopAudio=true
3478
+ publish_config.degradationType=2
3479
+ publish_config.sid = document.getElementById('video20').name;
3480
+ this.test_controller.ChangeMediaStream(publish_config);
3481
+ } else {
3482
+ publish_config.media_type = 1
3483
+ publish_config.publish_device = 2
3484
+ publish_config.need_volume_analyser = true
3485
+ publish_config.video_profile_type = 1
3486
+ // publish_config.video_profile_type=100
3487
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3488
+ publish_config.enableDesktopAudio=true
3489
+ publish_config.degradationType=2
3490
+ publish_config.publish_video_id = 'video20'
3491
+ publish_config.publish_streamId_id = 'subscribe_streamId20'
3492
+ publish_config.publish_tag = 'projectionWhiteboard'
3493
+ this.test_controller.Publish(publish_config)
3494
+ }
3495
+ // this.state.isSharedScreen = true
3496
+ // this.state.isScreenSwitching = false
3497
+ this.setState({
3498
+ screenName: '切换共享',
3499
+ isPDF: false
3500
+ })
3501
+ this.tabTitlesClick(
3502
+ {
3503
+ value: 'RMScreen',
3504
+ name: '共享内容'
3505
+ }, 'add'
3506
+ )
3507
+ if (!this.state.isPictureInPicture) {
3508
+ this.pictureInPicture()
3509
+ }
3510
+
3454
3511
  }
3455
-
3512
+ } else {
3513
+ this.messageClick('internal staff正在共享屏幕,请先关闭','error')
3456
3514
  }
3515
+
3457
3516
  }
3458
3517
  };
3459
3518
  suspend = () => {
@@ -4024,6 +4083,7 @@ class Video extends Component {
4024
4083
  }
4025
4084
  switchExternal = () => {
4026
4085
  if (this.isFileSuccuse()) {
4086
+ if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
4027
4087
  if (!this.state.isWhiteboard) {
4028
4088
  this.setState({
4029
4089
  isWhiteboard: true
@@ -4046,6 +4106,9 @@ class Video extends Component {
4046
4106
  }
4047
4107
 
4048
4108
  this.navigatorClick()
4109
+ } else {
4110
+ this.messageClick('internal staff正在共享屏幕,请先关闭','error')
4111
+ }
4049
4112
  }
4050
4113
  }
4051
4114
  switchSelect = (value) => {
@@ -4349,7 +4412,7 @@ class Video extends Component {
4349
4412
  {/* <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" /> */}
4350
4413
  <div id="whiteboardDIV" style={{height: 'calc(100% - 33px)'}}>
4351
4414
 
4352
- <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen') ? '' : 'none', }}>
4415
+ <div className="videoDiv" style={{ display: (this.state.isSelect == 'RMScreen' || this.state.isSelect == 'staffScreen') ? '' : 'none', }}>
4353
4416
  <div className="videoDiv">
4354
4417
  <video
4355
4418
  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;