react_hsbc_teller 1.2.7 → 1.3.0

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.7",
3
+ "version": "1.3.0",
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={
@@ -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,
445
+ xPosition: 1600,
454
446
  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,
447
+ width: 310,
491
448
  height: 180
492
449
  },
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
  // 人脸识别
@@ -2118,6 +2133,7 @@ class Video extends Component {
2118
2133
  // 推送“房间与会者列表”给新加⼊者
2119
2134
  this.test_controller.OnRoomAttendanceList = (participants) => {
2120
2135
  console.log('房间与会者列表', participants)
2136
+ setTimeout(() => {
2121
2137
  participants.map((item, index) => {
2122
2138
  if (item.uid != this.state.tellerAccount) {
2123
2139
  item.publish.map((itemOne, indexOne) => {
@@ -2146,6 +2162,21 @@ class Video extends Component {
2146
2162
  name: '客户投屏'
2147
2163
  }, 'add'
2148
2164
  )
2165
+ } else if (itemOne.tag == 'projectionWhiteboard') {
2166
+ config_param = {
2167
+ subscribe_video_id: 'video20',
2168
+ subscribe_audio_id: 'audio20',
2169
+ subscribe_streamId_id: 'subscribe_streamId20',
2170
+ feedId_id: 'feedId20',
2171
+ feedId: itemOne.feedId
2172
+ }
2173
+
2174
+ this.tabTitlesClick(
2175
+ {
2176
+ value: 'staffScreen',
2177
+ name: 'internal staff 投屏'
2178
+ }, 'add'
2179
+ )
2149
2180
  } else {
2150
2181
  if (!document.getElementById('video1').name) {
2151
2182
  config_param = {
@@ -2260,13 +2291,14 @@ class Video extends Component {
2260
2291
  if (config_param !== undefined) {
2261
2292
  config_param.need_volume_analyser = true
2262
2293
  console.log(config_param)
2263
- setTimeout(() => {
2294
+
2264
2295
  this.test_controller.Subscribe(config_param)
2265
- }, 2000);
2296
+
2266
2297
  }
2267
2298
  })
2268
2299
  }
2269
2300
  })
2301
+ }, 2000);
2270
2302
  };
2271
2303
  // 推送“新加⼊房间者”给与会者
2272
2304
  this.test_controller.OnNewJoinerIn = (participant) => {
@@ -2308,7 +2340,7 @@ class Video extends Component {
2308
2340
  }, function (code, message, data) {
2309
2341
  console.log(data)
2310
2342
  })
2311
-
2343
+ setTimeout(() => {
2312
2344
  let array = this.state.roomCustomerList;
2313
2345
  let newArray = [...array];
2314
2346
  newArray.push({
@@ -2338,10 +2370,28 @@ class Video extends Component {
2338
2370
  if (config_param !== undefined) {
2339
2371
  config_param.need_volume_analyser = false
2340
2372
  console.log(config_param)
2341
- setTimeout(() => {
2373
+ this.test_controller.Subscribe(config_param)
2342
2374
 
2375
+ }
2376
+ } else if (feed.tag == 'projectionWhiteboard') {
2377
+ config_param = {
2378
+ subscribe_video_id: 'video20',
2379
+ subscribe_audio_id: 'audio20',
2380
+ subscribe_streamId_id: 'subscribe_streamId20',
2381
+ feedId_id: 'feedId20',
2382
+ feedId: feed.feedId
2383
+ }
2384
+
2385
+ this.tabTitlesClick(
2386
+ {
2387
+ value: 'staffScreen',
2388
+ name: 'internal staff 投屏'
2389
+ }, 'add'
2390
+ )
2391
+ if (config_param !== undefined) {
2392
+ config_param.need_volume_analyser = false
2393
+ console.log(config_param)
2343
2394
  this.test_controller.Subscribe(config_param)
2344
- }, 1000)
2345
2395
 
2346
2396
  }
2347
2397
  } else {
@@ -2475,9 +2525,9 @@ class Video extends Component {
2475
2525
  config_param.need_volume_analyser = true
2476
2526
  console.log(config_param)
2477
2527
 
2478
- setTimeout(() => {
2528
+
2479
2529
  this.test_controller.Subscribe(config_param)
2480
- }, 2000);
2530
+
2481
2531
 
2482
2532
  }
2483
2533
  // })
@@ -2486,7 +2536,7 @@ class Video extends Component {
2486
2536
  }
2487
2537
 
2488
2538
  }
2489
-
2539
+ }, 2000);
2490
2540
  };
2491
2541
  // 推送“有新订阅”给与会者
2492
2542
  this.test_controller.OnNewSubscribe = (subscriber, feed) => {
@@ -2526,6 +2576,11 @@ class Video extends Component {
2526
2576
  this.tabTitlesClick('customerScreen', 'delect')
2527
2577
  }
2528
2578
  }
2579
+ if (item.value == 'staffScreen') {
2580
+ if (!document.getElementById("video20").name) {
2581
+ this.tabTitlesClick('staffScreen', 'delect')
2582
+ }
2583
+ }
2529
2584
  })
2530
2585
  if (!document.getElementById("video1").name) {
2531
2586
  this.state.isPIBIntranet[0].type = false
@@ -3394,64 +3449,71 @@ class Video extends Component {
3394
3449
  }
3395
3450
  };
3396
3451
  sharedScreen = () => {
3397
- console.log('投屏')
3452
+ console.log('投屏', this.state.tabTitles.find(el=>el.value == 'staffScreen'))
3398
3453
  if (this.isFileSuccuse()) {
3399
- const publish_config = {};
3400
- if(streamShare) {
3401
- streamShare.getTracks().forEach(track => track.stop());
3402
- }
3403
- if (this.state.isSharedScreen) {
3404
- const publish_config = {}
3405
- publish_config.media_type = 1
3406
- publish_config.publish_device = 2
3407
- // publish_config.video_profile_type = 1
3408
- publish_config.video_profile_type=100
3409
- publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3410
- publish_config.enableDesktopAudio=true
3411
- publish_config.degradationType=2
3412
- publish_config.sid = document.getElementById('video20').name
3413
- this.test_controller.ChangeMediaStream(publish_config)
3414
- this.state.isScreenSwitching = true
3415
- } else {
3416
- if (document.getElementById('video20').name) {
3417
- publish_config.media_type = 1;
3418
- publish_config.publish_device = 2;
3419
- publish_config.video_profile_type=100
3420
- publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3421
- publish_config.enableDesktopAudio=true
3422
- publish_config.degradationType=2
3423
- publish_config.sid = document.getElementById('video20').name;
3424
- this.test_controller.ChangeMediaStream(publish_config);
3425
- } else {
3454
+ if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
3455
+ const publish_config = {};
3456
+ if(streamShare) {
3457
+ streamShare.getTracks().forEach(track => track.stop());
3458
+ }
3459
+ if (this.state.isSharedScreen) {
3460
+ const publish_config = {}
3426
3461
  publish_config.media_type = 1
3427
3462
  publish_config.publish_device = 2
3428
- publish_config.need_volume_analyser = true
3429
- publish_config.video_profile_type=100
3430
- publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3463
+ publish_config.video_profile_type = 1
3464
+ // publish_config.video_profile_type=100
3465
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3431
3466
  publish_config.enableDesktopAudio=true
3432
3467
  publish_config.degradationType=2
3433
- publish_config.publish_video_id = 'video20'
3434
- publish_config.publish_streamId_id = 'subscribe_streamId20'
3435
- publish_config.publish_tag = 'projectionWhiteboard'
3436
- this.test_controller.Publish(publish_config)
3437
- }
3438
- // this.state.isSharedScreen = true
3439
- // this.state.isScreenSwitching = false
3440
- this.setState({
3441
- screenName: '切换共享',
3442
- isPDF: false
3443
- })
3444
- this.tabTitlesClick(
3445
- {
3446
- value: 'RMScreen',
3447
- name: '共享内容'
3448
- }, 'add'
3449
- )
3450
- if (!this.state.isPictureInPicture) {
3451
- this.pictureInPicture()
3468
+ publish_config.sid = document.getElementById('video20').name
3469
+ this.test_controller.ChangeMediaStream(publish_config)
3470
+ this.state.isScreenSwitching = true
3471
+ } else {
3472
+ if (document.getElementById('video20').name) {
3473
+ publish_config.media_type = 1;
3474
+ publish_config.publish_device = 2;
3475
+ publish_config.video_profile_type = 1
3476
+ // publish_config.video_profile_type=100
3477
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3478
+ publish_config.enableDesktopAudio=true
3479
+ publish_config.degradationType=2
3480
+ publish_config.sid = document.getElementById('video20').name;
3481
+ this.test_controller.ChangeMediaStream(publish_config);
3482
+ } else {
3483
+ publish_config.media_type = 1
3484
+ publish_config.publish_device = 2
3485
+ publish_config.need_volume_analyser = true
3486
+ publish_config.video_profile_type = 1
3487
+ // publish_config.video_profile_type=100
3488
+ // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3489
+ publish_config.enableDesktopAudio=true
3490
+ publish_config.degradationType=2
3491
+ publish_config.publish_video_id = 'video20'
3492
+ publish_config.publish_streamId_id = 'subscribe_streamId20'
3493
+ publish_config.publish_tag = 'projectionWhiteboard'
3494
+ this.test_controller.Publish(publish_config)
3495
+ }
3496
+ // this.state.isSharedScreen = true
3497
+ // this.state.isScreenSwitching = false
3498
+ this.setState({
3499
+ screenName: '切换共享',
3500
+ isPDF: false
3501
+ })
3502
+ this.tabTitlesClick(
3503
+ {
3504
+ value: 'RMScreen',
3505
+ name: '共享内容'
3506
+ }, 'add'
3507
+ )
3508
+ if (!this.state.isPictureInPicture) {
3509
+ this.pictureInPicture()
3510
+ }
3511
+
3452
3512
  }
3453
-
3513
+ } else {
3514
+ this.messageClick('internal staff正在共享屏幕,请先关闭','error')
3454
3515
  }
3516
+
3455
3517
  }
3456
3518
  };
3457
3519
  suspend = () => {
@@ -4022,6 +4084,7 @@ class Video extends Component {
4022
4084
  }
4023
4085
  switchExternal = () => {
4024
4086
  if (this.isFileSuccuse()) {
4087
+ if(!this.state.tabTitles.find(el=>el.value == 'staffScreen')) {
4025
4088
  if (!this.state.isWhiteboard) {
4026
4089
  this.setState({
4027
4090
  isWhiteboard: true
@@ -4044,6 +4107,9 @@ class Video extends Component {
4044
4107
  }
4045
4108
 
4046
4109
  this.navigatorClick()
4110
+ } else {
4111
+ this.messageClick('internal staff正在共享屏幕,请先关闭','error')
4112
+ }
4047
4113
  }
4048
4114
  }
4049
4115
  switchSelect = (value) => {
@@ -4347,7 +4413,7 @@ class Video extends Component {
4347
4413
  {/* <img style={sectionStyle} src={require("../../assets/img/placeholder_bg.png").default} alt="" /> */}
4348
4414
  <div id="whiteboardDIV" style={{height: 'calc(100% - 33px)'}}>
4349
4415
 
4350
- <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', }}>
4351
4417
  <div className="videoDiv">
4352
4418
  <video
4353
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;