react_hsbc_teller 2.0.70 → 2.0.71
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 +6 -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 +383 -14
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.71'
|
|
67
67
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
68
68
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
69
69
|
const { Option } = Select;
|
|
@@ -348,7 +348,12 @@ class Video extends Component {
|
|
|
348
348
|
faceDetectionTimer: null, // 人脸检测定时器
|
|
349
349
|
mediaErrorModalMessage: '',
|
|
350
350
|
transcribeErrorModalVisible: false, // 双录异常
|
|
351
|
-
transcribeErrorCode: ''
|
|
351
|
+
transcribeErrorCode: '',
|
|
352
|
+
presaleRecordId: '',
|
|
353
|
+
ipadsaleRecordId: '',
|
|
354
|
+
salePresaleRecordId: '',
|
|
355
|
+
supplesalePresaleRecordId: ''
|
|
356
|
+
|
|
352
357
|
};
|
|
353
358
|
// eslint-disable-next-line no-undef
|
|
354
359
|
test_controller = '';
|
|
@@ -406,7 +411,7 @@ class Video extends Component {
|
|
|
406
411
|
publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
|
|
407
412
|
publish_config.publish_video_id = 'publish_video1'
|
|
408
413
|
publish_config.publish_streamId_id = 'publish_streamId1'
|
|
409
|
-
publish_config.publish_tag = '
|
|
414
|
+
publish_config.publish_tag = 'tag1customer'
|
|
410
415
|
if (this.props.recordMode == 2) {
|
|
411
416
|
// 分行模式,只收音 不发布摄像头
|
|
412
417
|
publish_config.media_type = 2
|
|
@@ -560,7 +565,7 @@ class Video extends Component {
|
|
|
560
565
|
{
|
|
561
566
|
publish_video_id: 'publish_video1',
|
|
562
567
|
publish_streamId_id: 'publish_streamId1',
|
|
563
|
-
publish_tag: '
|
|
568
|
+
publish_tag: 'tag1customer'
|
|
564
569
|
},
|
|
565
570
|
// {
|
|
566
571
|
// publish_video_id: 'publish_video2',
|
|
@@ -629,6 +634,187 @@ class Video extends Component {
|
|
|
629
634
|
return data
|
|
630
635
|
}
|
|
631
636
|
}
|
|
637
|
+
// 开启音频录制
|
|
638
|
+
enableAudioRecording = (record_business_id, type) => {
|
|
639
|
+
console.log('enableAudioRecording', record_business_id, type)
|
|
640
|
+
// true开启
|
|
641
|
+
console.log(this.props.needPreSale, type == 'presale' && !this.props.needPreSale)
|
|
642
|
+
if(!(type == 'presale' && !this.props.needPreSale)){
|
|
643
|
+
const that = this
|
|
644
|
+
const SCALE = 1.5
|
|
645
|
+
this.rateAll().then((res) => {
|
|
646
|
+
console.log('开启音频录制', res)
|
|
647
|
+
let list = [
|
|
648
|
+
{
|
|
649
|
+
tag: 'projectionWhiteboard',
|
|
650
|
+
xPosition: 0,
|
|
651
|
+
yPosition: 175 * SCALE,
|
|
652
|
+
width: 1280,
|
|
653
|
+
height: 720
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
tag: 'tag1customer',
|
|
657
|
+
xPosition: 0,
|
|
658
|
+
yPosition: 0,
|
|
659
|
+
width: 213 * SCALE,
|
|
660
|
+
height: 175 * SCALE
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
tag: 'customer1',
|
|
664
|
+
xPosition: 213 * SCALE,
|
|
665
|
+
yPosition: 0,
|
|
666
|
+
width: 213 * SCALE,
|
|
667
|
+
height: 175 * SCALE
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
tag: 'customer2',
|
|
671
|
+
xPosition: 426 * SCALE,
|
|
672
|
+
yPosition: 0,
|
|
673
|
+
width: 213 * SCALE,
|
|
674
|
+
height: 175 * SCALE
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
tag: 'customer3',
|
|
678
|
+
xPosition: 639 * SCALE,
|
|
679
|
+
yPosition: 0,
|
|
680
|
+
width: 213 * SCALE,
|
|
681
|
+
height: 175 * SCALE
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
tag: 'customer4',
|
|
685
|
+
xPosition: 852 * SCALE,
|
|
686
|
+
yPosition: 0,
|
|
687
|
+
width: 213 * SCALE,
|
|
688
|
+
height: 175 * SCALE
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
tag: 'customer5',
|
|
692
|
+
xPosition: 1065 * SCALE,
|
|
693
|
+
yPosition: 0,
|
|
694
|
+
width: 213 * SCALE,
|
|
695
|
+
height: 175 * SCALE
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
tag: 'customer6',
|
|
699
|
+
xPosition: 1278 * SCALE,
|
|
700
|
+
yPosition: 0,
|
|
701
|
+
width: 213 * SCALE,
|
|
702
|
+
height: 175 * SCALE
|
|
703
|
+
},
|
|
704
|
+
]
|
|
705
|
+
Array.isArray(res) ?
|
|
706
|
+
res.map((item) => {
|
|
707
|
+
list.push({
|
|
708
|
+
tag: item.tag,
|
|
709
|
+
xPosition: 860 * SCALE,
|
|
710
|
+
yPosition: 235 * SCALE,
|
|
711
|
+
width: (420 * SCALE),
|
|
712
|
+
height: (420 * SCALE)
|
|
713
|
+
})
|
|
714
|
+
}) :
|
|
715
|
+
list.push({
|
|
716
|
+
tag: 'VIDEO_SOURCE_SCREEN',
|
|
717
|
+
xPosition: 860 * SCALE,
|
|
718
|
+
yPosition: 235 * SCALE,
|
|
719
|
+
width: (420 * SCALE),
|
|
720
|
+
height: (420 * SCALE)
|
|
721
|
+
})
|
|
722
|
+
// 开启业务录制的时候type传值,在后面加标识,全局的不加
|
|
723
|
+
const filePath = 'recordId_' + new Date().valueOf() + type;
|
|
724
|
+
const recordParam = {};
|
|
725
|
+
recordParam.width = 1280 * SCALE;
|
|
726
|
+
recordParam.height = 720 * SCALE;
|
|
727
|
+
recordParam.recordTotalStream = 0;
|
|
728
|
+
recordParam.startTimeout = 10;
|
|
729
|
+
recordParam.splitType = 1;
|
|
730
|
+
recordParam.endType = 1;
|
|
731
|
+
recordParam.crf = 26
|
|
732
|
+
recordParam.overlaps = [
|
|
733
|
+
{
|
|
734
|
+
tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
|
|
735
|
+
type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
736
|
+
id: 2, // ⽔印 ID
|
|
737
|
+
enable: true,
|
|
738
|
+
xPosition: 16 * SCALE, // x 轴位置
|
|
739
|
+
yPosition: 8 * SCALE, // y 轴位置
|
|
740
|
+
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
|
|
741
|
+
fontSize: 16 * SCALE, // 字体⼤⼩
|
|
742
|
+
url: '' // ⽔印图⽚ HTTP 地址
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
|
|
746
|
+
type: 1, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
747
|
+
id: 1, // ⽔印 ID
|
|
748
|
+
enable: true,
|
|
749
|
+
xPosition: 1080 * SCALE, // x 轴位置
|
|
750
|
+
yPosition: 10 * SCALE, // y 轴位置
|
|
751
|
+
text: '', // ⽔印⽂字
|
|
752
|
+
fontSize: 16 * SCALE, // 字体⼤⼩
|
|
753
|
+
url: '' // ⽔印图⽚ HTTP 地址
|
|
754
|
+
},
|
|
755
|
+
];
|
|
756
|
+
recordParam.tagPositions = list
|
|
757
|
+
recordParam.tagFilter = 'customer'
|
|
758
|
+
console.log('recordParam', recordParam);
|
|
759
|
+
// 开启音频录制,如果有业务id用,没用sessionid 用于在成功回调里去区分是音频还是正常
|
|
760
|
+
that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id ? record_business_id + '_' + type : this.state.sessionId + '_' + type)
|
|
761
|
+
|
|
762
|
+
})
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
}
|
|
766
|
+
// 开启ipad音频录制
|
|
767
|
+
enableIpadAudioRecording = (record_business_id) => {
|
|
768
|
+
const that = this
|
|
769
|
+
const filePath = 'recordId_' + new Date().valueOf() + '_ipadsale';
|
|
770
|
+
const recordParam = {};
|
|
771
|
+
recordParam.width = 1280;
|
|
772
|
+
recordParam.height = 720;
|
|
773
|
+
recordParam.recordTotalStream = 0;
|
|
774
|
+
recordParam.startTimeout = 10;
|
|
775
|
+
recordParam.splitType = 1;
|
|
776
|
+
recordParam.endType = 1;
|
|
777
|
+
recordParam.crf = 26
|
|
778
|
+
recordParam.overlaps = [
|
|
779
|
+
{
|
|
780
|
+
tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
|
|
781
|
+
type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
782
|
+
id: 2, // ⽔印 ID
|
|
783
|
+
enable: true,
|
|
784
|
+
xPosition: 16, // x 轴位置
|
|
785
|
+
yPosition: 8, // y 轴位置
|
|
786
|
+
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
|
|
787
|
+
fontSize: 16, // 字体⼤⼩
|
|
788
|
+
url: '' // ⽔印图⽚ HTTP 地址
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
tag: '', // 流 tag,如果不设置或为空,则为全局⽔印
|
|
792
|
+
type: 1, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
793
|
+
id: 1, // ⽔印 ID
|
|
794
|
+
enable: true,
|
|
795
|
+
xPosition: 1080, // x 轴位置
|
|
796
|
+
yPosition: 10, // y 轴位置
|
|
797
|
+
text: '', // ⽔印⽂字
|
|
798
|
+
fontSize: 16, // 字体⼤⼩
|
|
799
|
+
url: '' // ⽔印图⽚ HTTP 地址
|
|
800
|
+
},
|
|
801
|
+
];
|
|
802
|
+
recordParam.tagPositions = [{
|
|
803
|
+
tag: that.state.ipadTag,
|
|
804
|
+
xPosition: 0,
|
|
805
|
+
yPosition: 0,
|
|
806
|
+
width: 1280,
|
|
807
|
+
height: 720
|
|
808
|
+
},{
|
|
809
|
+
tag: 'tag1customer',
|
|
810
|
+
xPosition: 0,
|
|
811
|
+
yPosition: 0,
|
|
812
|
+
width: 0,
|
|
813
|
+
height: 0
|
|
814
|
+
}]
|
|
815
|
+
console.log('recordParam', recordParam);
|
|
816
|
+
that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id+'_ipadsale')
|
|
817
|
+
}
|
|
632
818
|
// 开启录制
|
|
633
819
|
enableServerRecording = (record_business_id, type) => {
|
|
634
820
|
const that = this
|
|
@@ -658,7 +844,7 @@ class Video extends Component {
|
|
|
658
844
|
// height: 350
|
|
659
845
|
// },
|
|
660
846
|
{
|
|
661
|
-
tag: '
|
|
847
|
+
tag: 'tag1customer',
|
|
662
848
|
xPosition: 0,
|
|
663
849
|
yPosition: 0,
|
|
664
850
|
width: 213 * SCALE,
|
|
@@ -768,7 +954,6 @@ class Video extends Component {
|
|
|
768
954
|
},
|
|
769
955
|
];
|
|
770
956
|
recordParam.tagPositions = list
|
|
771
|
-
// recordParam.tagFilter = 'customer1'
|
|
772
957
|
console.log('recordParam', recordParam);
|
|
773
958
|
that.test_controller.StartRemoteRecord(filePath, recordParam, record_business_id)
|
|
774
959
|
|
|
@@ -784,7 +969,7 @@ class Video extends Component {
|
|
|
784
969
|
recordParam.height = 720;
|
|
785
970
|
recordParam.recordTotalStream = 0;
|
|
786
971
|
recordParam.startTimeout = 10;
|
|
787
|
-
recordParam.splitType =
|
|
972
|
+
recordParam.splitType = 1;
|
|
788
973
|
recordParam.endType = 1;
|
|
789
974
|
recordParam.crf = 26
|
|
790
975
|
recordParam.overlaps = [
|
|
@@ -818,7 +1003,7 @@ class Video extends Component {
|
|
|
818
1003
|
width: 1280,
|
|
819
1004
|
height: 720
|
|
820
1005
|
},{
|
|
821
|
-
tag: '
|
|
1006
|
+
tag: 'tag1customer',
|
|
822
1007
|
xPosition: 0,
|
|
823
1008
|
yPosition: 0,
|
|
824
1009
|
width: 0,
|
|
@@ -1651,6 +1836,7 @@ class Video extends Component {
|
|
|
1651
1836
|
// 开启录制
|
|
1652
1837
|
this.saveLog('Start recording')
|
|
1653
1838
|
this.enableServerRecording()
|
|
1839
|
+
this.enableAudioRecording('','presale')
|
|
1654
1840
|
} else if (Mival.type == 2) {
|
|
1655
1841
|
// 关闭录制
|
|
1656
1842
|
this.saveLog('stop recording')
|
|
@@ -2001,9 +2187,22 @@ class Video extends Component {
|
|
|
2001
2187
|
this.state.businessId = Mival.id;
|
|
2002
2188
|
this.saveLog('Start business recording')
|
|
2003
2189
|
this.enableServerRecording(Mival.id, 'startBusinessRecording')
|
|
2190
|
+
// supplement 1 代表补录
|
|
2191
|
+
if(Mival.supplement == 1) {
|
|
2192
|
+
this.state.supplementWithRoomId = Mival.supplementWithRoomId
|
|
2193
|
+
this.enableAudioRecording(Mival.id,'supplesale')
|
|
2194
|
+
} else {
|
|
2195
|
+
// 开启业务录制的基础上关闭full录制音频,并开启业务录制音频
|
|
2196
|
+
if(this.state.presaleRecordId) {
|
|
2197
|
+
this.test_controller.StopRemoteRecord(this.state.presaleRecordId)
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
this.enableAudioRecording(Mival.id,'sale')
|
|
2201
|
+
}
|
|
2004
2202
|
// 这里加定时1秒后触发Ipad录制--阿里的胡子老师要求加的,解决录制的问题
|
|
2005
2203
|
setTimeout(() => {
|
|
2006
2204
|
if (this.state.ipadTag) this.enableIpadRecording(Mival.id)
|
|
2205
|
+
if (this.state.ipadTag) this.enableIpadAudioRecording(Mival.id)
|
|
2007
2206
|
}, 1000);
|
|
2008
2207
|
|
|
2009
2208
|
if (this.props.whetherDetectFace && this.props.recordMode != 2){
|
|
@@ -2465,7 +2664,7 @@ class Video extends Component {
|
|
|
2465
2664
|
publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
|
|
2466
2665
|
publish_config.publish_video_id = 'publish_video1'
|
|
2467
2666
|
publish_config.publish_streamId_id = 'publish_streamId1'
|
|
2468
|
-
publish_config.publish_tag = '
|
|
2667
|
+
publish_config.publish_tag = 'tag1customer'
|
|
2469
2668
|
if (this.props.recordMode == 2) {
|
|
2470
2669
|
// 分行模式,只收音 不发布摄像头
|
|
2471
2670
|
publish_config.media_type = 2
|
|
@@ -2543,8 +2742,8 @@ class Video extends Component {
|
|
|
2543
2742
|
// if (publish_device != 2) {
|
|
2544
2743
|
// return stream
|
|
2545
2744
|
// }
|
|
2546
|
-
if (publish_tag == '
|
|
2547
|
-
console.log('
|
|
2745
|
+
if (publish_tag == 'tag1customer') {
|
|
2746
|
+
console.log('tag1customer', stream)
|
|
2548
2747
|
let newStream = stream;
|
|
2549
2748
|
if (stream.getVideoTracks()[0]) {
|
|
2550
2749
|
if (this.state.beautyType || isSuccuseHs){
|
|
@@ -2964,6 +3163,7 @@ class Video extends Component {
|
|
|
2964
3163
|
// 如果已经开启了业务录制且ipad未在录制,立即开启ipad录制(ipad后加入)
|
|
2965
3164
|
if (this.state.businessId && !this.state.ipadRecordId) {
|
|
2966
3165
|
this.enableIpadRecording(this.state.businessId)
|
|
3166
|
+
this.enableIpadAudioRecording(this.state.businessId)
|
|
2967
3167
|
}
|
|
2968
3168
|
}
|
|
2969
3169
|
};
|
|
@@ -3241,13 +3441,33 @@ class Video extends Component {
|
|
|
3241
3441
|
const busId = Number(record_third_id.split('_')[0])
|
|
3242
3442
|
this.ipadRecordCallback('1', true, busId)
|
|
3243
3443
|
this.saveLog('mrtc OnStartIpadRecordSucc')
|
|
3444
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3445
|
+
// full录制的音频
|
|
3446
|
+
this.state.presaleRecordId = record_id
|
|
3447
|
+
this.audioPresaleRecordCallback('1', true)
|
|
3448
|
+
this.saveLog('mrtc OnStartPresaleRecordSucc')
|
|
3449
|
+
} else if (String(record_third_id).includes('_ipadsale')){
|
|
3450
|
+
// full录制的ipad音频
|
|
3451
|
+
this.state.ipadsaleRecordId = record_id
|
|
3452
|
+
this.audioIpadsaleRecordCallback('1', true)
|
|
3453
|
+
this.saveLog('mrtc OnStartIpadsaleRecordSucc')
|
|
3454
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3455
|
+
// 业务录制的音频
|
|
3456
|
+
this.state.salePresaleRecordId = record_id
|
|
3457
|
+
this.audioSalePresaleRecordCallback('1', true)
|
|
3458
|
+
this.saveLog('mrtc OnStartSalePresaleRecordSucc')
|
|
3459
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3460
|
+
// 补录业务录制的音频
|
|
3461
|
+
this.state.supplesalePresaleRecordId = record_id
|
|
3462
|
+
this.audiosuppleSalePresaleRecordCallback('1', true)
|
|
3463
|
+
this.saveLog('mrtc OnStartSuppleSalePresaleRecordSucc')
|
|
3244
3464
|
} else {
|
|
3245
3465
|
// 业务录制
|
|
3246
3466
|
this.state.businessRecordId = record_id
|
|
3247
3467
|
this.businessRecordCallback('1', true, record_third_id)
|
|
3248
3468
|
this.saveLog('mrtc OnStartRemoteBusinessRecordSucc, businessId=' + record_third_id)
|
|
3249
3469
|
}
|
|
3250
|
-
|
|
3470
|
+
// 判断是否是开启的音频录制 调用后台接口多isAudio --0否1是
|
|
3251
3471
|
if (this.state.isRecordingeErrorModalVisible) {
|
|
3252
3472
|
this.setState({
|
|
3253
3473
|
isRecordingeErrorModalVisible: false
|
|
@@ -3269,6 +3489,26 @@ class Video extends Component {
|
|
|
3269
3489
|
const busId = Number(record_third_id.split('_')[0])
|
|
3270
3490
|
this.ipadRecordCallback('1', false, busId)
|
|
3271
3491
|
this.saveLog('mrtc OnStartIpadRecordFailed, code='+err_code)
|
|
3492
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3493
|
+
// full录制的音频
|
|
3494
|
+
this.state.presaleRecordId = ''
|
|
3495
|
+
this.audioPresaleRecordCallback('1', false)
|
|
3496
|
+
this.saveLog('mrtc OnStartPresaleRecordFailed, code=' + err_code)
|
|
3497
|
+
} else if (String(record_third_id).includes('_ipadsale')){
|
|
3498
|
+
// 录制的ipad音频
|
|
3499
|
+
this.state.ipadsaleRecordId = ''
|
|
3500
|
+
this.audioIpadsaleRecordCallback('1', false)
|
|
3501
|
+
this.saveLog('mrtc OnStartIpadsaleRecordFailed, code=' + err_code)
|
|
3502
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3503
|
+
// 业务录制的音频
|
|
3504
|
+
this.state.salePresaleRecordId = ''
|
|
3505
|
+
this.audioSalePresaleRecordCallback('1', false)
|
|
3506
|
+
this.saveLog('mrtc OnStartSalePresaleRecordFailed, code=' + err_code)
|
|
3507
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3508
|
+
// 补录业务录制的音频
|
|
3509
|
+
this.state.supplesalePresaleRecordId = ''
|
|
3510
|
+
this.audiosuppleSalePresaleRecordCallback('1', false)
|
|
3511
|
+
this.saveLog('mrtc OnStartSuppleSalePresaleRecordFailed, code=' + err_code)
|
|
3272
3512
|
} else {
|
|
3273
3513
|
this.businessRecordCallback('1', false, record_third_id)
|
|
3274
3514
|
this.saveLog('mrtc OnStartRemoteBusinessRecordFailed, code='+err_code + ',businessId=' + record_third_id)
|
|
@@ -3292,6 +3532,26 @@ class Video extends Component {
|
|
|
3292
3532
|
this.ipadRecordCallback('2', true, busId)
|
|
3293
3533
|
this.saveLog('mrtc OnStopIpadRecordSucc, recordId='+recordId)
|
|
3294
3534
|
this.state.ipadRecordId = '';
|
|
3535
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3536
|
+
// full录制的音频
|
|
3537
|
+
this.state.presaleRecordId = ''
|
|
3538
|
+
this.audioPresaleRecordCallback('2', true)
|
|
3539
|
+
this.saveLog('mrtc OnStopPresaleRecordSucc, recordId='+recordId)
|
|
3540
|
+
} else if (String(record_third_id).includes('_ipadsale')){
|
|
3541
|
+
// 录制的ipad音频
|
|
3542
|
+
this.state.ipadsaleRecordId = ''
|
|
3543
|
+
this.audioIpadsaleRecordCallback('2', true)
|
|
3544
|
+
this.saveLog('mrtc OnStopIpadsaleRecordSucc, recordId='+recordId)
|
|
3545
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3546
|
+
// 业务录制的音频
|
|
3547
|
+
this.state.salePresaleRecordId = ''
|
|
3548
|
+
this.audioSalePresaleRecordCallback('2', true)
|
|
3549
|
+
this.saveLog('mrtc OnStopSalePresaleSucc, recordId='+recordId)
|
|
3550
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3551
|
+
// 补录业务录制的音频
|
|
3552
|
+
this.state.supplesalePresaleRecordId = ''
|
|
3553
|
+
this.audiosuppleSalePresaleRecordCallback('2', true)
|
|
3554
|
+
this.saveLog('mrtc OnStopSuppleSalePresaleRecordSucc, recordId='+recordId)
|
|
3295
3555
|
} else {
|
|
3296
3556
|
this.businessRecordCallback('2', true, record_third_id)
|
|
3297
3557
|
this.saveLog('mrtc OnStopRemoteBusinessRecordSucc, recordId='+recordId + ',businessId=' + record_third_id)
|
|
@@ -3318,6 +3578,26 @@ class Video extends Component {
|
|
|
3318
3578
|
const busId = Number(record_third_id.split('_')[0])
|
|
3319
3579
|
this.ipadRecordCallback('2', false, busId)
|
|
3320
3580
|
this.saveLog('mrtc OnStopIpadRecordFailed, err_code='+err_code)
|
|
3581
|
+
} else if (String(record_third_id).includes('_presale')){
|
|
3582
|
+
// full录制的音频
|
|
3583
|
+
this.state.presaleRecordId = ''
|
|
3584
|
+
this.audioPresaleRecordCallback('2', false)
|
|
3585
|
+
this.saveLog('mrtc OnStopPresaleRecordFailed, err_code='+err_code)
|
|
3586
|
+
} else if (String(record_third_id).includes('_ipadsale')){
|
|
3587
|
+
// 录制的ipad音频
|
|
3588
|
+
this.state.ipadsaleRecordId = ''
|
|
3589
|
+
this.audioIpadsaleRecordCallback('2', false)
|
|
3590
|
+
this.saveLog('mrtc OnStopIpadsaleRecordFailed, err_code='+err_code)
|
|
3591
|
+
} else if (String(record_third_id).includes('_sale')){
|
|
3592
|
+
// 业务录制的音频
|
|
3593
|
+
this.state.salePresaleRecordId = ''
|
|
3594
|
+
this.audioSalePresaleRecordCallback('2', false)
|
|
3595
|
+
this.saveLog('mrtc OnStopSalePresaleFailed, err_code='+err_code)
|
|
3596
|
+
} else if (String(record_third_id).includes('_supplesale')){
|
|
3597
|
+
// 补录业务录制的音频
|
|
3598
|
+
this.state.supplesalePresaleRecordId = ''
|
|
3599
|
+
this.audiosuppleSalePresaleRecordCallback('2', false)
|
|
3600
|
+
this.saveLog('mrtc OnStopSuppleSalePresaleRecordFailed, err_code='+err_code)
|
|
3321
3601
|
} else {
|
|
3322
3602
|
this.businessRecordCallback('2', false, record_third_id)
|
|
3323
3603
|
this.saveLog('mrtc OnStopRemoteBusinessRecordFailed, err_code='+err_code+',businessId=' + record_third_id)
|
|
@@ -3731,6 +4011,91 @@ class Video extends Component {
|
|
|
3731
4011
|
// duration: 10
|
|
3732
4012
|
})
|
|
3733
4013
|
}
|
|
4014
|
+
// full音频录制
|
|
4015
|
+
audioPresaleRecordCallback = async (type, status) => {
|
|
4016
|
+
try {
|
|
4017
|
+
let result = await API.videoRecordCallback({
|
|
4018
|
+
activityId: this.props.businessNumber,
|
|
4019
|
+
sessionId: this.state.sessionId,
|
|
4020
|
+
roomId: this.state.channelId + '',
|
|
4021
|
+
appId: this.state.appId,
|
|
4022
|
+
recordId: this.state.presaleRecordId,
|
|
4023
|
+
customerId: this.props.customerId,
|
|
4024
|
+
type: type,
|
|
4025
|
+
status: status,
|
|
4026
|
+
isAudio: '1'
|
|
4027
|
+
});
|
|
4028
|
+
console.log(result);
|
|
4029
|
+
} catch (err) {
|
|
4030
|
+
console.error(err);
|
|
4031
|
+
if (err.status == 502 || err.status == 404) {
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
// 业务音频录制
|
|
4036
|
+
audioIpadsaleRecordCallback = async (type, status) => {
|
|
4037
|
+
try {
|
|
4038
|
+
let result = await API.videoRecordCallback({
|
|
4039
|
+
activityId: this.props.businessNumber,
|
|
4040
|
+
sessionId: this.state.sessionId,
|
|
4041
|
+
roomId: this.state.channelId + '',
|
|
4042
|
+
appId: this.state.appId,
|
|
4043
|
+
recordId: this.state.ipadsaleRecordId,
|
|
4044
|
+
customerId: this.props.customerId,
|
|
4045
|
+
type: type,
|
|
4046
|
+
status: status,
|
|
4047
|
+
isAudio: '1'
|
|
4048
|
+
});
|
|
4049
|
+
console.log(result);
|
|
4050
|
+
} catch (err) {
|
|
4051
|
+
console.error(err);
|
|
4052
|
+
if (err.status == 502 || err.status == 404) {
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
4055
|
+
}
|
|
4056
|
+
// ipad音频录制
|
|
4057
|
+
audioSalePresaleRecordCallback = async (type, status) => {
|
|
4058
|
+
try {
|
|
4059
|
+
let result = await API.videoRecordCallback({
|
|
4060
|
+
activityId: this.props.businessNumber,
|
|
4061
|
+
sessionId: this.state.sessionId,
|
|
4062
|
+
roomId: this.state.channelId + '',
|
|
4063
|
+
appId: this.state.appId,
|
|
4064
|
+
recordId: this.state.salePresaleRecordId,
|
|
4065
|
+
customerId: this.props.customerId,
|
|
4066
|
+
type: type,
|
|
4067
|
+
status: status,
|
|
4068
|
+
isAudio: '1'
|
|
4069
|
+
});
|
|
4070
|
+
console.log(result);
|
|
4071
|
+
} catch (err) {
|
|
4072
|
+
console.error(err);
|
|
4073
|
+
if (err.status == 502 || err.status == 404) {
|
|
4074
|
+
}
|
|
4075
|
+
}
|
|
4076
|
+
}
|
|
4077
|
+
// 补录业务录制
|
|
4078
|
+
audiosuppleSalePresaleRecordCallback = async (type, status) => {
|
|
4079
|
+
try {
|
|
4080
|
+
let result = await API.videoRecordCallback({
|
|
4081
|
+
activityId: this.props.businessNumber,
|
|
4082
|
+
sessionId: this.state.sessionId,
|
|
4083
|
+
roomId: this.state.channelId + '',
|
|
4084
|
+
appId: this.state.appId,
|
|
4085
|
+
recordId: this.state.supplesalePresaleRecordId,
|
|
4086
|
+
customerId: this.props.customerId,
|
|
4087
|
+
type: type,
|
|
4088
|
+
status: status,
|
|
4089
|
+
isAudio: '1',
|
|
4090
|
+
supplementWithRoomId: this.state.supplementWithRoomId
|
|
4091
|
+
});
|
|
4092
|
+
console.log(result);
|
|
4093
|
+
} catch (err) {
|
|
4094
|
+
console.error(err);
|
|
4095
|
+
if (err.status == 502 || err.status == 404) {
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
}
|
|
3734
4099
|
// 全局录制
|
|
3735
4100
|
videoRecordCallback = async (type, status) => {
|
|
3736
4101
|
if (status) {
|
|
@@ -3751,7 +4116,8 @@ class Video extends Component {
|
|
|
3751
4116
|
recordId: this.state.recordId,
|
|
3752
4117
|
customerId: this.props.customerId,
|
|
3753
4118
|
type: type,
|
|
3754
|
-
status: status
|
|
4119
|
+
status: status,
|
|
4120
|
+
isFull: 1
|
|
3755
4121
|
});
|
|
3756
4122
|
console.log(result);
|
|
3757
4123
|
} catch (err) {
|
|
@@ -4695,7 +5061,9 @@ class Video extends Component {
|
|
|
4695
5061
|
}
|
|
4696
5062
|
this.saveLog('Start business recording')
|
|
4697
5063
|
if (!this.state.businessRecordId) this.enableServerRecording(this.state.businessId)
|
|
5064
|
+
if (!this.state.businessRecordId) this.enableAudioRecording(this.state.businessId,'presale')
|
|
4698
5065
|
if (!this.state.ipadRecordId && this.state.ipadTag) this.enableIpadRecording(this.state.businessId)
|
|
5066
|
+
if (!this.state.ipadRecordId && this.state.ipadTag) this.enableIpadAudioRecording(this.state.businessId)
|
|
4699
5067
|
clearTimeout(this.recordLoopPlayTimer)
|
|
4700
5068
|
}
|
|
4701
5069
|
handleOkLowPowerConfirm = () => {
|
|
@@ -7798,7 +8166,7 @@ Video.defaultProps = {
|
|
|
7798
8166
|
lightSensitivity: 1, // 光线敏感度系数,默认1
|
|
7799
8167
|
userSide: 2,
|
|
7800
8168
|
meetingDuration: null, // 会议时长,单位小时
|
|
7801
|
-
recordMode: 1, // 录制模式 1远程录制 2网点录制
|
|
8169
|
+
recordMode: 1, // 录制模式 1远程录制 2网点录制 在开启单独音频流的时候1-会有多个音频流单独录制,2-只需要RM
|
|
7802
8170
|
defaultBranchCode: "",// 员工网点缩写
|
|
7803
8171
|
customerId: "", //客户号
|
|
7804
8172
|
customerType: "", // 客户类型
|
|
@@ -7808,6 +8176,7 @@ Video.defaultProps = {
|
|
|
7808
8176
|
audioinputNameList: ['Microphone Array (Realtek High Definition Audio(SST))'], // 默认匹配的麦克风的名称列表
|
|
7809
8177
|
echoCancellation: true,
|
|
7810
8178
|
noiseSuppression: true,
|
|
8179
|
+
needPreSale: true, // 是否开启音频录制 默认true--只控制售前full
|
|
7811
8180
|
logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track?APIVersion=0.6.0&app=meeting-ui',
|
|
7812
8181
|
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
8182
|
}
|