react_hsbc_teller 2.0.70 → 2.0.72
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/README.md +9 -0
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/demo/demo.js +5 -3
- package/packages/pages/video/video.jsx +287 -15
package/package.json
CHANGED
package/packages/demo/demo.js
CHANGED
|
@@ -15,7 +15,7 @@ class Demo extends Component {
|
|
|
15
15
|
// sessionId: '',
|
|
16
16
|
pdfRendering: false,
|
|
17
17
|
isVideo: false,
|
|
18
|
-
tellerAccount: '
|
|
18
|
+
tellerAccount: '20250528',
|
|
19
19
|
// callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
|
|
20
20
|
callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
|
|
21
21
|
businessNumber: '123',
|
|
@@ -26,7 +26,7 @@ class Demo extends Component {
|
|
|
26
26
|
// resourcePath:'http://121.196.19.70:8027/',
|
|
27
27
|
roomServerUrl: 'wss://uat.mpaas.investments.hsbc.com.hk:31000/mpaas/mrtc/ws',
|
|
28
28
|
// roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
|
|
29
|
-
baseURL:'https://
|
|
29
|
+
baseURL:'https://uat.mpaas.investments.hsbc.com.hk:31000/wealth/zuul/api/leimon-counter-api',
|
|
30
30
|
resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
|
|
31
31
|
prohibitPrompt: '无客户',
|
|
32
32
|
titleBackground: '#40a9ff',
|
|
@@ -42,7 +42,8 @@ class Demo extends Component {
|
|
|
42
42
|
customerId: "testCustomerId", //客户号
|
|
43
43
|
salesBranchCode: 'salesBranchCode', //网点编号(分行号)
|
|
44
44
|
financialOffice: "defaultOfficeId", // 理财室
|
|
45
|
-
audioinputNameList: ['默认值 - 外部麦克风 (Realtek(R) Audio)']
|
|
45
|
+
audioinputNameList: ['默认值 - 外部麦克风 (Realtek(R) Audio)'],
|
|
46
|
+
needPreSale: false
|
|
46
47
|
}
|
|
47
48
|
componentWillMount() {
|
|
48
49
|
if(window.localStorage.getItem('sessionId') && window.localStorage.getItem('sessionId') != 'null' && window.localStorage.getItem('sessionId') != 'undefined') {
|
|
@@ -213,6 +214,7 @@ userExit =(val)=>{
|
|
|
213
214
|
this.state.isVideo ?
|
|
214
215
|
<div>
|
|
215
216
|
<HSBC
|
|
217
|
+
needPreSale={this.state.needPreSale}
|
|
216
218
|
isOpenSound={true}
|
|
217
219
|
shareMask={this.state.shareMask}
|
|
218
220
|
pdfRendering={this.state.pdfRendering}
|
|
@@ -63,7 +63,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
|
|
|
63
63
|
import axios from 'axios';
|
|
64
64
|
import CryptoJS from "crypto-js";
|
|
65
65
|
|
|
66
|
-
const SDK_VERISON = '2.0.
|
|
66
|
+
const SDK_VERISON = '2.0.72'
|
|
67
67
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
68
68
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
69
69
|
const { Option } = Select;
|
|
@@ -348,7 +348,11 @@ class Video extends Component {
|
|
|
348
348
|
faceDetectionTimer: null, // 人脸检测定时器
|
|
349
349
|
mediaErrorModalMessage: '',
|
|
350
350
|
transcribeErrorModalVisible: false, // 双录异常
|
|
351
|
-
transcribeErrorCode: ''
|
|
351
|
+
transcribeErrorCode: '',
|
|
352
|
+
presaleRecordId: '',
|
|
353
|
+
salePresaleRecordId: '',
|
|
354
|
+
supplesalePresaleRecordId: ''
|
|
355
|
+
|
|
352
356
|
};
|
|
353
357
|
// eslint-disable-next-line no-undef
|
|
354
358
|
test_controller = '';
|
|
@@ -356,7 +360,7 @@ class Video extends Component {
|
|
|
356
360
|
saveLog = (val) => {
|
|
357
361
|
axios({
|
|
358
362
|
method: 'get',
|
|
359
|
-
baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller='+ SDK_VERISON +'&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
|
|
363
|
+
baseURL: this.props.logUrl + '&message=SDK:' + encodeURIComponent(val) + '&react_hsbc_teller='+ SDK_VERISON +'&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
|
|
360
364
|
|
|
361
365
|
}).then(res => {
|
|
362
366
|
|
|
@@ -406,7 +410,7 @@ class Video extends Component {
|
|
|
406
410
|
publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
|
|
407
411
|
publish_config.publish_video_id = 'publish_video1'
|
|
408
412
|
publish_config.publish_streamId_id = 'publish_streamId1'
|
|
409
|
-
publish_config.publish_tag = '
|
|
413
|
+
publish_config.publish_tag = 'tag1customer'
|
|
410
414
|
if (this.props.recordMode == 2) {
|
|
411
415
|
// 分行模式,只收音 不发布摄像头
|
|
412
416
|
publish_config.media_type = 2
|
|
@@ -560,7 +564,7 @@ class Video extends Component {
|
|
|
560
564
|
{
|
|
561
565
|
publish_video_id: 'publish_video1',
|
|
562
566
|
publish_streamId_id: 'publish_streamId1',
|
|
563
|
-
publish_tag: '
|
|
567
|
+
publish_tag: 'tag1customer'
|
|
564
568
|
},
|
|
565
569
|
// {
|
|
566
570
|
// publish_video_id: 'publish_video2',
|
|
@@ -629,6 +633,135 @@ class Video extends Component {
|
|
|
629
633
|
return data
|
|
630
634
|
}
|
|
631
635
|
}
|
|
636
|
+
// 开启音频录制
|
|
637
|
+
enableAudioRecording = (record_business_id, type) => {
|
|
638
|
+
console.log('enableAudioRecording', record_business_id, type)
|
|
639
|
+
// true开启
|
|
640
|
+
console.log(this.props.needPreSale, type == 'presale' && !this.props.needPreSale)
|
|
641
|
+
if(!(type == 'presale' && !this.props.needPreSale)){
|
|
642
|
+
const that = this
|
|
643
|
+
const SCALE = 1.5
|
|
644
|
+
this.rateAll().then((res) => {
|
|
645
|
+
console.log('开启音频录制', res)
|
|
646
|
+
let list = [
|
|
647
|
+
{
|
|
648
|
+
tag: 'projectionWhiteboard',
|
|
649
|
+
xPosition: 0,
|
|
650
|
+
yPosition: 175 * SCALE,
|
|
651
|
+
width: 1280,
|
|
652
|
+
height: 720
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
tag: 'tag1customer',
|
|
656
|
+
xPosition: 0,
|
|
657
|
+
yPosition: 0,
|
|
658
|
+
width: 213 * SCALE,
|
|
659
|
+
height: 175 * SCALE
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
tag: 'customer1',
|
|
663
|
+
xPosition: 213 * SCALE,
|
|
664
|
+
yPosition: 0,
|
|
665
|
+
width: 213 * SCALE,
|
|
666
|
+
height: 175 * SCALE
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
tag: 'customer2',
|
|
670
|
+
xPosition: 426 * SCALE,
|
|
671
|
+
yPosition: 0,
|
|
672
|
+
width: 213 * SCALE,
|
|
673
|
+
height: 175 * SCALE
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
tag: 'customer3',
|
|
677
|
+
xPosition: 639 * SCALE,
|
|
678
|
+
yPosition: 0,
|
|
679
|
+
width: 213 * SCALE,
|
|
680
|
+
height: 175 * SCALE
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
tag: 'customer4',
|
|
684
|
+
xPosition: 852 * SCALE,
|
|
685
|
+
yPosition: 0,
|
|
686
|
+
width: 213 * SCALE,
|
|
687
|
+
height: 175 * SCALE
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
tag: 'customer5',
|
|
691
|
+
xPosition: 1065 * SCALE,
|
|
692
|
+
yPosition: 0,
|
|
693
|
+
width: 213 * SCALE,
|
|
694
|
+
height: 175 * SCALE
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
tag: 'customer6',
|
|
698
|
+
xPosition: 1278 * SCALE,
|
|
699
|
+
yPosition: 0,
|
|
700
|
+
width: 213 * SCALE,
|
|
701
|
+
height: 175 * SCALE
|
|
702
|
+
},
|
|
703
|
+
]
|
|
704
|
+
Array.isArray(res) ?
|
|
705
|
+
res.map((item) => {
|
|
706
|
+
list.push({
|
|
707
|
+
tag: item.tag,
|
|
708
|
+
xPosition: 860 * SCALE,
|
|
709
|
+
yPosition: 235 * SCALE,
|
|
710
|
+
width: (420 * SCALE),
|
|
711
|
+
height: (420 * SCALE)
|
|
712
|
+
})
|
|
713
|
+
}) :
|
|
714
|
+
list.push({
|
|
715
|
+
tag: 'VIDEO_SOURCE_SCREEN',
|
|
716
|
+
xPosition: 860 * SCALE,
|
|
717
|
+
yPosition: 235 * SCALE,
|
|
718
|
+
width: (420 * SCALE),
|
|
719
|
+
height: (420 * SCALE)
|
|
720
|
+
})
|
|
721
|
+
// 开启业务录制的时候type传值,在后面加标识,全局的不加
|
|
722
|
+
const filePath = 'recordId_' + new Date().valueOf() + type;
|
|
723
|
+
const recordParam = {};
|
|
724
|
+
recordParam.width = 1280 * SCALE;
|
|
725
|
+
recordParam.height = 720 * SCALE;
|
|
726
|
+
recordParam.recordTotalStream = 0;
|
|
727
|
+
recordParam.startTimeout = 10;
|
|
728
|
+
recordParam.splitType = 1;
|
|
729
|
+
recordParam.endType = 1;
|
|
730
|
+
recordParam.crf = 26
|
|
731
|
+
recordParam.overlaps = [
|
|
732
|
+
{
|
|
733
|
+
tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
|
|
734
|
+
type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
735
|
+
id: 2, // ⽔印 ID
|
|
736
|
+
enable: true,
|
|
737
|
+
xPosition: 16 * SCALE, // x 轴位置
|
|
738
|
+
yPosition: 8 * SCALE, // y 轴位置
|
|
739
|
+
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
|
|
740
|
+
fontSize: 16 * SCALE, // 字体⼤⼩
|
|
741
|
+
url: '' // ⽔印图⽚ HTTP 地址
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
|
|
745
|
+
type: 1, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
746
|
+
id: 1, // ⽔印 ID
|
|
747
|
+
enable: true,
|
|
748
|
+
xPosition: 1080 * SCALE, // x 轴位置
|
|
749
|
+
yPosition: 10 * SCALE, // y 轴位置
|
|
750
|
+
text: '', // ⽔印⽂字
|
|
751
|
+
fontSize: 16 * SCALE, // 字体⼤⼩
|
|
752
|
+
url: '' // ⽔印图⽚ HTTP 地址
|
|
753
|
+
},
|
|
754
|
+
];
|
|
755
|
+
recordParam.tagPositions = list
|
|
756
|
+
recordParam.tagFilter = 'customer'
|
|
757
|
+
console.log('recordParam', recordParam);
|
|
758
|
+
// 开启音频录制,如果有业务id用,没用sessionid 用于在成功回调里去区分是音频还是正常
|
|
759
|
+
that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id ? record_business_id + '_' + type : this.state.sessionId + '_' + type)
|
|
760
|
+
|
|
761
|
+
})
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
}
|
|
632
765
|
// 开启录制
|
|
633
766
|
enableServerRecording = (record_business_id, type) => {
|
|
634
767
|
const that = this
|
|
@@ -658,7 +791,7 @@ class Video extends Component {
|
|
|
658
791
|
// height: 350
|
|
659
792
|
// },
|
|
660
793
|
{
|
|
661
|
-
tag: '
|
|
794
|
+
tag: 'tag1customer',
|
|
662
795
|
xPosition: 0,
|
|
663
796
|
yPosition: 0,
|
|
664
797
|
width: 213 * SCALE,
|
|
@@ -768,7 +901,6 @@ class Video extends Component {
|
|
|
768
901
|
},
|
|
769
902
|
];
|
|
770
903
|
recordParam.tagPositions = list
|
|
771
|
-
// recordParam.tagFilter = 'customer1'
|
|
772
904
|
console.log('recordParam', recordParam);
|
|
773
905
|
that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id)
|
|
774
906
|
|
|
@@ -784,7 +916,7 @@ class Video extends Component {
|
|
|
784
916
|
recordParam.height = 720;
|
|
785
917
|
recordParam.recordTotalStream = 0;
|
|
786
918
|
recordParam.startTimeout = 10;
|
|
787
|
-
recordParam.splitType =
|
|
919
|
+
recordParam.splitType = 1;
|
|
788
920
|
recordParam.endType = 1;
|
|
789
921
|
recordParam.crf = 26
|
|
790
922
|
recordParam.overlaps = [
|
|
@@ -818,7 +950,7 @@ class Video extends Component {
|
|
|
818
950
|
width: 1280,
|
|
819
951
|
height: 720
|
|
820
952
|
},{
|
|
821
|
-
tag: '
|
|
953
|
+
tag: 'tag1customer',
|
|
822
954
|
xPosition: 0,
|
|
823
955
|
yPosition: 0,
|
|
824
956
|
width: 0,
|
|
@@ -1651,6 +1783,7 @@ class Video extends Component {
|
|
|
1651
1783
|
// 开启录制
|
|
1652
1784
|
this.saveLog('Start recording')
|
|
1653
1785
|
this.enableServerRecording()
|
|
1786
|
+
this.enableAudioRecording('','presale')
|
|
1654
1787
|
} else if (Mival.type == 2) {
|
|
1655
1788
|
// 关闭录制
|
|
1656
1789
|
this.saveLog('stop recording')
|
|
@@ -2001,6 +2134,18 @@ class Video extends Component {
|
|
|
2001
2134
|
this.state.businessId = Mival.id;
|
|
2002
2135
|
this.saveLog('Start business recording')
|
|
2003
2136
|
this.enableServerRecording(Mival.id, 'startBusinessRecording')
|
|
2137
|
+
// supplement 1 代表补录
|
|
2138
|
+
if(Mival.supplement == 1) {
|
|
2139
|
+
this.state.supplementWithRoomId = Mival.supplementWithRoomId
|
|
2140
|
+
this.enableAudioRecording(Mival.id,'supplesale')
|
|
2141
|
+
} else {
|
|
2142
|
+
// 开启业务录制的基础上关闭full录制音频,并开启业务录制音频
|
|
2143
|
+
if(this.state.presaleRecordId) {
|
|
2144
|
+
this.test_controller.StopRemoteRecord(this.state.presaleRecordId)
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
this.enableAudioRecording(Mival.id,'sale')
|
|
2148
|
+
}
|
|
2004
2149
|
// 这里加定时1秒后触发Ipad录制--阿里的胡子老师要求加的,解决录制的问题
|
|
2005
2150
|
setTimeout(() => {
|
|
2006
2151
|
if (this.state.ipadTag) this.enableIpadRecording(Mival.id)
|
|
@@ -2465,7 +2610,7 @@ class Video extends Component {
|
|
|
2465
2610
|
publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
|
|
2466
2611
|
publish_config.publish_video_id = 'publish_video1'
|
|
2467
2612
|
publish_config.publish_streamId_id = 'publish_streamId1'
|
|
2468
|
-
publish_config.publish_tag = '
|
|
2613
|
+
publish_config.publish_tag = 'tag1customer'
|
|
2469
2614
|
if (this.props.recordMode == 2) {
|
|
2470
2615
|
// 分行模式,只收音 不发布摄像头
|
|
2471
2616
|
publish_config.media_type = 2
|
|
@@ -2543,8 +2688,8 @@ class Video extends Component {
|
|
|
2543
2688
|
// if (publish_device != 2) {
|
|
2544
2689
|
// return stream
|
|
2545
2690
|
// }
|
|
2546
|
-
if (publish_tag == '
|
|
2547
|
-
console.log('
|
|
2691
|
+
if (publish_tag == 'tag1customer') {
|
|
2692
|
+
console.log('tag1customer', stream)
|
|
2548
2693
|
let newStream = stream;
|
|
2549
2694
|
if (stream.getVideoTracks()[0]) {
|
|
2550
2695
|
if (this.state.beautyType || isSuccuseHs){
|
|
@@ -3241,13 +3386,28 @@ class Video extends Component {
|
|
|
3241
3386
|
const busId = Number(record_third_id.split('_')[0])
|
|
3242
3387
|
this.ipadRecordCallback('1', true, busId)
|
|
3243
3388
|
this.saveLog('mrtc OnStartIpadRecordSucc')
|
|
3389
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3390
|
+
// full录制的音频
|
|
3391
|
+
this.state.presaleRecordId = record_id
|
|
3392
|
+
this.audioPresaleRecordCallback('1', true)
|
|
3393
|
+
this.saveLog('mrtc OnStartPresaleRecordSucc')
|
|
3394
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3395
|
+
// 业务录制的音频
|
|
3396
|
+
this.state.salePresaleRecordId = record_id
|
|
3397
|
+
this.audioSalePresaleRecordCallback('1', true)
|
|
3398
|
+
this.saveLog('mrtc OnStartSalePresaleRecordSucc')
|
|
3399
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3400
|
+
// 补录业务录制的音频
|
|
3401
|
+
this.state.supplesalePresaleRecordId = record_id
|
|
3402
|
+
this.audiosuppleSalePresaleRecordCallback('1', true)
|
|
3403
|
+
this.saveLog('mrtc OnStartSuppleSalePresaleRecordSucc')
|
|
3244
3404
|
} else {
|
|
3245
3405
|
// 业务录制
|
|
3246
3406
|
this.state.businessRecordId = record_id
|
|
3247
3407
|
this.businessRecordCallback('1', true, record_third_id)
|
|
3248
3408
|
this.saveLog('mrtc OnStartRemoteBusinessRecordSucc, businessId=' + record_third_id)
|
|
3249
3409
|
}
|
|
3250
|
-
|
|
3410
|
+
// 判断是否是开启的音频录制 调用后台接口多isAudio --0否1是
|
|
3251
3411
|
if (this.state.isRecordingeErrorModalVisible) {
|
|
3252
3412
|
this.setState({
|
|
3253
3413
|
isRecordingeErrorModalVisible: false
|
|
@@ -3269,6 +3429,21 @@ class Video extends Component {
|
|
|
3269
3429
|
const busId = Number(record_third_id.split('_')[0])
|
|
3270
3430
|
this.ipadRecordCallback('1', false, busId)
|
|
3271
3431
|
this.saveLog('mrtc OnStartIpadRecordFailed, code='+err_code)
|
|
3432
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3433
|
+
// full录制的音频
|
|
3434
|
+
this.state.presaleRecordId = ''
|
|
3435
|
+
this.audioPresaleRecordCallback('1', false)
|
|
3436
|
+
this.saveLog('mrtc OnStartPresaleRecordFailed, code=' + err_code)
|
|
3437
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3438
|
+
// 业务录制的音频
|
|
3439
|
+
this.state.salePresaleRecordId = ''
|
|
3440
|
+
this.audioSalePresaleRecordCallback('1', false)
|
|
3441
|
+
this.saveLog('mrtc OnStartSalePresaleRecordFailed, code=' + err_code)
|
|
3442
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3443
|
+
// 补录业务录制的音频
|
|
3444
|
+
this.state.supplesalePresaleRecordId = ''
|
|
3445
|
+
this.audiosuppleSalePresaleRecordCallback('1', false)
|
|
3446
|
+
this.saveLog('mrtc OnStartSuppleSalePresaleRecordFailed, code=' + err_code)
|
|
3272
3447
|
} else {
|
|
3273
3448
|
this.businessRecordCallback('1', false, record_third_id)
|
|
3274
3449
|
this.saveLog('mrtc OnStartRemoteBusinessRecordFailed, code='+err_code + ',businessId=' + record_third_id)
|
|
@@ -3292,6 +3467,21 @@ class Video extends Component {
|
|
|
3292
3467
|
this.ipadRecordCallback('2', true, busId)
|
|
3293
3468
|
this.saveLog('mrtc OnStopIpadRecordSucc, recordId='+recordId)
|
|
3294
3469
|
this.state.ipadRecordId = '';
|
|
3470
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3471
|
+
// full录制的音频
|
|
3472
|
+
this.state.presaleRecordId = ''
|
|
3473
|
+
this.audioPresaleRecordCallback('2', true)
|
|
3474
|
+
this.saveLog('mrtc OnStopPresaleRecordSucc, recordId='+recordId)
|
|
3475
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3476
|
+
// 业务录制的音频
|
|
3477
|
+
this.state.salePresaleRecordId = ''
|
|
3478
|
+
this.audioSalePresaleRecordCallback('2', true)
|
|
3479
|
+
this.saveLog('mrtc OnStopSalePresaleSucc, recordId='+recordId)
|
|
3480
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3481
|
+
// 补录业务录制的音频
|
|
3482
|
+
this.state.supplesalePresaleRecordId = ''
|
|
3483
|
+
this.audiosuppleSalePresaleRecordCallback('2', true)
|
|
3484
|
+
this.saveLog('mrtc OnStopSuppleSalePresaleRecordSucc, recordId='+recordId)
|
|
3295
3485
|
} else {
|
|
3296
3486
|
this.businessRecordCallback('2', true, record_third_id)
|
|
3297
3487
|
this.saveLog('mrtc OnStopRemoteBusinessRecordSucc, recordId='+recordId + ',businessId=' + record_third_id)
|
|
@@ -3318,6 +3508,21 @@ class Video extends Component {
|
|
|
3318
3508
|
const busId = Number(record_third_id.split('_')[0])
|
|
3319
3509
|
this.ipadRecordCallback('2', false, busId)
|
|
3320
3510
|
this.saveLog('mrtc OnStopIpadRecordFailed, err_code='+err_code)
|
|
3511
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3512
|
+
// full录制的音频
|
|
3513
|
+
this.state.presaleRecordId = ''
|
|
3514
|
+
this.audioPresaleRecordCallback('2', false)
|
|
3515
|
+
this.saveLog('mrtc OnStopPresaleRecordFailed, err_code='+err_code)
|
|
3516
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3517
|
+
// 业务录制的音频
|
|
3518
|
+
this.state.salePresaleRecordId = ''
|
|
3519
|
+
this.audioSalePresaleRecordCallback('2', false)
|
|
3520
|
+
this.saveLog('mrtc OnStopSalePresaleFailed, err_code='+err_code)
|
|
3521
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3522
|
+
// 补录业务录制的音频
|
|
3523
|
+
this.state.supplesalePresaleRecordId = ''
|
|
3524
|
+
this.audiosuppleSalePresaleRecordCallback('2', false)
|
|
3525
|
+
this.saveLog('mrtc OnStopSuppleSalePresaleRecordFailed, err_code='+err_code)
|
|
3321
3526
|
} else {
|
|
3322
3527
|
this.businessRecordCallback('2', false, record_third_id)
|
|
3323
3528
|
this.saveLog('mrtc OnStopRemoteBusinessRecordFailed, err_code='+err_code+',businessId=' + record_third_id)
|
|
@@ -3731,6 +3936,70 @@ class Video extends Component {
|
|
|
3731
3936
|
// duration: 10
|
|
3732
3937
|
})
|
|
3733
3938
|
}
|
|
3939
|
+
// full音频录制
|
|
3940
|
+
audioPresaleRecordCallback = async (type, status) => {
|
|
3941
|
+
try {
|
|
3942
|
+
let result = await API.videoRecordCallback({
|
|
3943
|
+
activityId: this.props.businessNumber,
|
|
3944
|
+
sessionId: this.state.sessionId,
|
|
3945
|
+
roomId: this.state.channelId + '',
|
|
3946
|
+
appId: this.state.appId,
|
|
3947
|
+
recordId: this.state.presaleRecordId,
|
|
3948
|
+
customerId: this.props.customerId,
|
|
3949
|
+
type: type,
|
|
3950
|
+
status: status,
|
|
3951
|
+
isAudio: '1'
|
|
3952
|
+
});
|
|
3953
|
+
console.log(result);
|
|
3954
|
+
} catch (err) {
|
|
3955
|
+
console.error(err);
|
|
3956
|
+
if (err.status == 502 || err.status == 404) {
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
// 业务音频录制
|
|
3961
|
+
audioSalePresaleRecordCallback = async (type, status) => {
|
|
3962
|
+
try {
|
|
3963
|
+
let result = await API.videoRecordCallback({
|
|
3964
|
+
activityId: this.props.businessNumber,
|
|
3965
|
+
sessionId: this.state.sessionId,
|
|
3966
|
+
roomId: this.state.channelId + '',
|
|
3967
|
+
appId: this.state.appId,
|
|
3968
|
+
recordId: this.state.salePresaleRecordId,
|
|
3969
|
+
customerId: this.props.customerId,
|
|
3970
|
+
type: type,
|
|
3971
|
+
status: status,
|
|
3972
|
+
isAudio: '1'
|
|
3973
|
+
});
|
|
3974
|
+
console.log(result);
|
|
3975
|
+
} catch (err) {
|
|
3976
|
+
console.error(err);
|
|
3977
|
+
if (err.status == 502 || err.status == 404) {
|
|
3978
|
+
}
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3981
|
+
// 补录业务录制
|
|
3982
|
+
audiosuppleSalePresaleRecordCallback = async (type, status) => {
|
|
3983
|
+
try {
|
|
3984
|
+
let result = await API.videoRecordCallback({
|
|
3985
|
+
activityId: this.props.businessNumber,
|
|
3986
|
+
sessionId: this.state.sessionId,
|
|
3987
|
+
roomId: this.state.channelId + '',
|
|
3988
|
+
appId: this.state.appId,
|
|
3989
|
+
recordId: this.state.supplesalePresaleRecordId,
|
|
3990
|
+
customerId: this.props.customerId,
|
|
3991
|
+
type: type,
|
|
3992
|
+
status: status,
|
|
3993
|
+
isAudio: '1',
|
|
3994
|
+
supplementWithRoomId: this.state.supplementWithRoomId
|
|
3995
|
+
});
|
|
3996
|
+
console.log(result);
|
|
3997
|
+
} catch (err) {
|
|
3998
|
+
console.error(err);
|
|
3999
|
+
if (err.status == 502 || err.status == 404) {
|
|
4000
|
+
}
|
|
4001
|
+
}
|
|
4002
|
+
}
|
|
3734
4003
|
// 全局录制
|
|
3735
4004
|
videoRecordCallback = async (type, status) => {
|
|
3736
4005
|
if (status) {
|
|
@@ -3751,7 +4020,8 @@ class Video extends Component {
|
|
|
3751
4020
|
recordId: this.state.recordId,
|
|
3752
4021
|
customerId: this.props.customerId,
|
|
3753
4022
|
type: type,
|
|
3754
|
-
status: status
|
|
4023
|
+
status: status,
|
|
4024
|
+
isFull: 1
|
|
3755
4025
|
});
|
|
3756
4026
|
console.log(result);
|
|
3757
4027
|
} catch (err) {
|
|
@@ -4695,6 +4965,7 @@ class Video extends Component {
|
|
|
4695
4965
|
}
|
|
4696
4966
|
this.saveLog('Start business recording')
|
|
4697
4967
|
if (!this.state.businessRecordId) this.enableServerRecording(this.state.businessId)
|
|
4968
|
+
if (!this.state.businessRecordId) this.enableAudioRecording(this.state.businessId,'presale')
|
|
4698
4969
|
if (!this.state.ipadRecordId && this.state.ipadTag) this.enableIpadRecording(this.state.businessId)
|
|
4699
4970
|
clearTimeout(this.recordLoopPlayTimer)
|
|
4700
4971
|
}
|
|
@@ -7798,7 +8069,7 @@ Video.defaultProps = {
|
|
|
7798
8069
|
lightSensitivity: 1, // 光线敏感度系数,默认1
|
|
7799
8070
|
userSide: 2,
|
|
7800
8071
|
meetingDuration: null, // 会议时长,单位小时
|
|
7801
|
-
recordMode: 1, // 录制模式 1远程录制 2
|
|
8072
|
+
recordMode: 1, // 录制模式 1远程录制 2网点录制-分行 在开启单独音频流的时候1-会有多个音频流单独录制,2-只需要RM
|
|
7802
8073
|
defaultBranchCode: "",// 员工网点缩写
|
|
7803
8074
|
customerId: "", //客户号
|
|
7804
8075
|
customerType: "", // 客户类型
|
|
@@ -7808,6 +8079,7 @@ Video.defaultProps = {
|
|
|
7808
8079
|
audioinputNameList: ['Microphone Array (Realtek High Definition Audio(SST))'], // 默认匹配的麦克风的名称列表
|
|
7809
8080
|
echoCancellation: true,
|
|
7810
8081
|
noiseSuppression: true,
|
|
8082
|
+
needPreSale: true, // 是否开启音频录制 默认true--只控制售前full
|
|
7811
8083
|
logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track?APIVersion=0.6.0&app=meeting-ui',
|
|
7812
8084
|
internalUrl: 'https://wp-staff-gateway.wealth-platform.uat.ali.cloud.cn.hsbc/meeting-ui/OHB/CN/HSBC?chnlID=OHB&locale=zh_CN&chnlCC=CN&chnlGMC=HSBC&targetFunc=supervisorMeeting&sourceFunc=rmMeeting'
|
|
7813
8085
|
}
|