react_hsbc_teller 2.0.71 → 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 +3 -0
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/video/video.jsx +3 -100
package/package.json
CHANGED
|
@@ -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;
|
|
@@ -350,7 +350,6 @@ class Video extends Component {
|
|
|
350
350
|
transcribeErrorModalVisible: false, // 双录异常
|
|
351
351
|
transcribeErrorCode: '',
|
|
352
352
|
presaleRecordId: '',
|
|
353
|
-
ipadsaleRecordId: '',
|
|
354
353
|
salePresaleRecordId: '',
|
|
355
354
|
supplesalePresaleRecordId: ''
|
|
356
355
|
|
|
@@ -361,7 +360,7 @@ class Video extends Component {
|
|
|
361
360
|
saveLog = (val) => {
|
|
362
361
|
axios({
|
|
363
362
|
method: 'get',
|
|
364
|
-
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,
|
|
365
364
|
|
|
366
365
|
}).then(res => {
|
|
367
366
|
|
|
@@ -763,58 +762,6 @@ class Video extends Component {
|
|
|
763
762
|
}
|
|
764
763
|
|
|
765
764
|
}
|
|
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
|
-
}
|
|
818
765
|
// 开启录制
|
|
819
766
|
enableServerRecording = (record_business_id, type) => {
|
|
820
767
|
const that = this
|
|
@@ -2202,7 +2149,6 @@ class Video extends Component {
|
|
|
2202
2149
|
// 这里加定时1秒后触发Ipad录制--阿里的胡子老师要求加的,解决录制的问题
|
|
2203
2150
|
setTimeout(() => {
|
|
2204
2151
|
if (this.state.ipadTag) this.enableIpadRecording(Mival.id)
|
|
2205
|
-
if (this.state.ipadTag) this.enableIpadAudioRecording(Mival.id)
|
|
2206
2152
|
}, 1000);
|
|
2207
2153
|
|
|
2208
2154
|
if (this.props.whetherDetectFace && this.props.recordMode != 2){
|
|
@@ -3163,7 +3109,6 @@ class Video extends Component {
|
|
|
3163
3109
|
// 如果已经开启了业务录制且ipad未在录制,立即开启ipad录制(ipad后加入)
|
|
3164
3110
|
if (this.state.businessId && !this.state.ipadRecordId) {
|
|
3165
3111
|
this.enableIpadRecording(this.state.businessId)
|
|
3166
|
-
this.enableIpadAudioRecording(this.state.businessId)
|
|
3167
3112
|
}
|
|
3168
3113
|
}
|
|
3169
3114
|
};
|
|
@@ -3446,11 +3391,6 @@ class Video extends Component {
|
|
|
3446
3391
|
this.state.presaleRecordId = record_id
|
|
3447
3392
|
this.audioPresaleRecordCallback('1', true)
|
|
3448
3393
|
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
3394
|
} else if (String(record_third_id).includes('_sale')){
|
|
3455
3395
|
// 业务录制的音频
|
|
3456
3396
|
this.state.salePresaleRecordId = record_id
|
|
@@ -3494,11 +3434,6 @@ class Video extends Component {
|
|
|
3494
3434
|
this.state.presaleRecordId = ''
|
|
3495
3435
|
this.audioPresaleRecordCallback('1', false)
|
|
3496
3436
|
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
3437
|
} else if (String(record_third_id).includes('_sale')){
|
|
3503
3438
|
// 业务录制的音频
|
|
3504
3439
|
this.state.salePresaleRecordId = ''
|
|
@@ -3537,11 +3472,6 @@ class Video extends Component {
|
|
|
3537
3472
|
this.state.presaleRecordId = ''
|
|
3538
3473
|
this.audioPresaleRecordCallback('2', true)
|
|
3539
3474
|
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
3475
|
} else if (String(record_third_id).includes('_sale')){
|
|
3546
3476
|
// 业务录制的音频
|
|
3547
3477
|
this.state.salePresaleRecordId = ''
|
|
@@ -3583,11 +3513,6 @@ class Video extends Component {
|
|
|
3583
3513
|
this.state.presaleRecordId = ''
|
|
3584
3514
|
this.audioPresaleRecordCallback('2', false)
|
|
3585
3515
|
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
3516
|
} else if (String(record_third_id).includes('_sale')){
|
|
3592
3517
|
// 业务录制的音频
|
|
3593
3518
|
this.state.salePresaleRecordId = ''
|
|
@@ -4033,27 +3958,6 @@ class Video extends Component {
|
|
|
4033
3958
|
}
|
|
4034
3959
|
}
|
|
4035
3960
|
// 业务音频录制
|
|
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
3961
|
audioSalePresaleRecordCallback = async (type, status) => {
|
|
4058
3962
|
try {
|
|
4059
3963
|
let result = await API.videoRecordCallback({
|
|
@@ -5063,7 +4967,6 @@ class Video extends Component {
|
|
|
5063
4967
|
if (!this.state.businessRecordId) this.enableServerRecording(this.state.businessId)
|
|
5064
4968
|
if (!this.state.businessRecordId) this.enableAudioRecording(this.state.businessId,'presale')
|
|
5065
4969
|
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)
|
|
5067
4970
|
clearTimeout(this.recordLoopPlayTimer)
|
|
5068
4971
|
}
|
|
5069
4972
|
handleOkLowPowerConfirm = () => {
|
|
@@ -8166,7 +8069,7 @@ Video.defaultProps = {
|
|
|
8166
8069
|
lightSensitivity: 1, // 光线敏感度系数,默认1
|
|
8167
8070
|
userSide: 2,
|
|
8168
8071
|
meetingDuration: null, // 会议时长,单位小时
|
|
8169
|
-
recordMode: 1, // 录制模式 1远程录制 2
|
|
8072
|
+
recordMode: 1, // 录制模式 1远程录制 2网点录制-分行 在开启单独音频流的时候1-会有多个音频流单独录制,2-只需要RM
|
|
8170
8073
|
defaultBranchCode: "",// 员工网点缩写
|
|
8171
8074
|
customerId: "", //客户号
|
|
8172
8075
|
customerType: "", // 客户类型
|