react_hsbc_teller 2.0.47 → 2.0.48
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/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/assets/mp3/ipad_media_close.mp3 +0 -0
- package/packages/assets/mp3/share_stop_audio.mp3 +0 -0
- package/packages/demo/demo.js +1 -0
- package/packages/pages/foot/foot.jsx +3 -2
- package/packages/pages/video/video.jsx +280 -32
- package/packages/utils/asrController.js +13 -0
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
package/packages/demo/demo.js
CHANGED
|
@@ -208,6 +208,7 @@ userExit =(val)=>{
|
|
|
208
208
|
whetherDetectFace={true}
|
|
209
209
|
whetherDetectLight={true}
|
|
210
210
|
whetherNeedAsr={true}
|
|
211
|
+
screenSharedInterval={6}
|
|
211
212
|
prohibitPrompt={this.state.prohibitPrompt}
|
|
212
213
|
voiceColor={this.state.voiceColor}
|
|
213
214
|
titleBackground={this.state.titleBackground}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import './foot.less'
|
|
3
|
+
import { debounce } from '../../utils/utils';
|
|
3
4
|
import Popover from "antd/lib/popover";
|
|
4
5
|
import 'antd/lib/popover/style'
|
|
5
6
|
export default class foot extends Component {
|
|
@@ -115,7 +116,7 @@ export default class foot extends Component {
|
|
|
115
116
|
</div>
|
|
116
117
|
}
|
|
117
118
|
{
|
|
118
|
-
item == 'BOARD'&&<div className='footHover' onClick={this.switchExternal.bind(this)}>
|
|
119
|
+
item == 'BOARD'&&<div className='footHover' onClick={debounce(this.switchExternal.bind(this), 300)}>
|
|
119
120
|
<div className="one">
|
|
120
121
|
<img className="imgClass" src={require("../../assets/img/switchExternal.png").default} alt="" />
|
|
121
122
|
<div className="text">
|
|
@@ -125,7 +126,7 @@ export default class foot extends Component {
|
|
|
125
126
|
</div>
|
|
126
127
|
}
|
|
127
128
|
{
|
|
128
|
-
item == 'SHARE' && <div className="one" onClick={this.sharedScreen.bind(this)}>
|
|
129
|
+
item == 'SHARE' && <div className="one" onClick={debounce(this.sharedScreen.bind(this), 300)}>
|
|
129
130
|
<img className="imgClass" src={require("../../assets/img/Projection_screen.png").default} alt="" />
|
|
130
131
|
<div className="text">
|
|
131
132
|
{screenName}
|
|
@@ -26,12 +26,14 @@ import ipadLeaveMeeting from '../../assets/mp3/ipad_leave_meeting.mp3'
|
|
|
26
26
|
import recordErrorAudio from '../../assets/mp3/record_error.mp3'
|
|
27
27
|
import IpadLeaveAudio from '../../assets/mp3/ipad_leave_error.mp3';
|
|
28
28
|
import IpadLowPowerAudio from '../../assets/mp3/ipad_low_power.mp3';
|
|
29
|
+
import ipadMediaCloseAudio from '../../assets/mp3/ipad_media_close.mp3';
|
|
29
30
|
import MediaErrorAudio from '../../assets/mp3/media_error.mp3';
|
|
30
31
|
import internalJoin from '../../assets/mp3/internalJoin.mp3'
|
|
31
32
|
import internalLeft from '../../assets/mp3/internalLeft.mp3'
|
|
32
33
|
import leftMetting from '../../assets/mp3/leftmeeting.mp3'
|
|
33
34
|
import networkWeakAudio from '../../assets/mp3/networkweak.mp3'
|
|
34
35
|
import PIPictureClosedAudio from '../../assets/mp3/pip_close.mp3'
|
|
36
|
+
import screenSharedIntervalAudio from '../../assets/mp3/share_stop_audio.mp3'
|
|
35
37
|
import errorPng from '../../assets/img/tooltips2_fail.png'
|
|
36
38
|
import Modal from "antd/lib/modal";
|
|
37
39
|
import 'antd/lib/modal/style'
|
|
@@ -61,7 +63,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
|
|
|
61
63
|
import axios from 'axios';
|
|
62
64
|
import CryptoJS from "crypto-js";
|
|
63
65
|
|
|
64
|
-
const SDK_VERISON = '2.0.
|
|
66
|
+
const SDK_VERISON = '2.0.48'
|
|
65
67
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
66
68
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
67
69
|
const { Option } = Select;
|
|
@@ -82,6 +84,7 @@ const POINT_TYPE = {
|
|
|
82
84
|
expDark: '曝光、背光',
|
|
83
85
|
fcd: '人脸变化检测',
|
|
84
86
|
padConnected: 'ipad已连接',
|
|
87
|
+
cancelShare: '取消投屏',
|
|
85
88
|
conFail: '媒体流服务断开'
|
|
86
89
|
}
|
|
87
90
|
const RECORD_DEVICE_NAME = 'screen-capture-recorder'
|
|
@@ -745,7 +748,7 @@ class Video extends Component {
|
|
|
745
748
|
enable: true,
|
|
746
749
|
xPosition: 16 * SCALE, // x 轴位置
|
|
747
750
|
yPosition: 8 * SCALE, // y 轴位置
|
|
748
|
-
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.
|
|
751
|
+
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
|
|
749
752
|
fontSize: 16 * SCALE, // 字体⼤⼩
|
|
750
753
|
url: '' // ⽔印图⽚ HTTP 地址
|
|
751
754
|
},
|
|
@@ -788,7 +791,7 @@ class Video extends Component {
|
|
|
788
791
|
enable: true,
|
|
789
792
|
xPosition: 16, // x 轴位置
|
|
790
793
|
yPosition: 8, // y 轴位置
|
|
791
|
-
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.
|
|
794
|
+
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
|
|
792
795
|
fontSize: 16, // 字体⼤⼩
|
|
793
796
|
url: '' // ⽔印图⽚ HTTP 地址
|
|
794
797
|
},
|
|
@@ -1803,6 +1806,8 @@ class Video extends Component {
|
|
|
1803
1806
|
})
|
|
1804
1807
|
} else {
|
|
1805
1808
|
if (document.getElementById('video20').name) {
|
|
1809
|
+
this.saveLog('unPublish share, reason: receive stop whiteboard message 1218')
|
|
1810
|
+
console.log('unPublish share, reason: receive stop whiteboard message 1218')
|
|
1806
1811
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
1807
1812
|
if(this.state.drawCanvasInterval) clearInterval(this.state.drawCanvasInterval)
|
|
1808
1813
|
}
|
|
@@ -1816,12 +1821,12 @@ class Video extends Component {
|
|
|
1816
1821
|
}
|
|
1817
1822
|
|
|
1818
1823
|
} else if (Mival.typeId == 1219) {
|
|
1819
|
-
//
|
|
1820
|
-
if (Mival.sessionId == this.state.sessionId && this.props.recordMode == 2) {
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
}
|
|
1824
|
+
// 旧逻辑废弃。现在无论什么模式均为sdk外部传入
|
|
1825
|
+
// if (Mival.sessionId == this.state.sessionId && this.props.recordMode == 2) {
|
|
1826
|
+
// this.state.salesBranchCode = Mival.salesBranchCode;
|
|
1827
|
+
// this.state.financialOffice = Mival.financialOffice;
|
|
1828
|
+
// this.state.branchName = Mival.salesBranchName;
|
|
1829
|
+
// }
|
|
1825
1830
|
} else if (Mival.typeId == 3100) {
|
|
1826
1831
|
if(Mival.data.sessionId == this.state.sessionId) {
|
|
1827
1832
|
muteJson.set(Mival.data.userId, JSON.stringify(Mival))
|
|
@@ -1936,22 +1941,47 @@ class Video extends Component {
|
|
|
1936
1941
|
}
|
|
1937
1942
|
} else if (Mival.typeId == 10020) {
|
|
1938
1943
|
// 录制中断(模拟测试)
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1944
|
+
const recordId = Mival.recordId;
|
|
1945
|
+
|
|
1946
|
+
// if (this.state.businessRecordId == recordId) {
|
|
1947
|
+
// // 双录录制中断
|
|
1948
|
+
// this.messageClick('双录异常中断,请重新开启', 'error')
|
|
1949
|
+
// this.setState({
|
|
1950
|
+
// isRecordingeErrorModalVisible: true,
|
|
1951
|
+
// businessRecordId: '',
|
|
1952
|
+
// })
|
|
1953
|
+
// this.saveLog(`dual recording crash, recordId=${recordId}`);
|
|
1954
|
+
// // 循环播放录制中断语音
|
|
1955
|
+
// clearTimeout(this.recordLoopPlayTimer)
|
|
1956
|
+
// this.recordLoopPlay = () => {
|
|
1957
|
+
// console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
|
|
1958
|
+
// if(!this.state.businessRecordId && document.getElementById("publish_streamId1")){
|
|
1959
|
+
// let audio = new Audio(recordErrorAudio)
|
|
1960
|
+
// audio.play()
|
|
1961
|
+
// this.recordLoopPlayTimer = setTimeout(this.recordLoopPlay, 3000);
|
|
1962
|
+
// }
|
|
1963
|
+
// }
|
|
1964
|
+
// setTimeout(this.recordLoopPlay, 0);
|
|
1965
|
+
// } else if (this.state.ipadRecordId == recordId) {
|
|
1966
|
+
// // ipad录制中断
|
|
1967
|
+
// this.messageClick('双录异常中断,请重新开启', 'error')
|
|
1968
|
+
// this.setState({
|
|
1969
|
+
// isRecordingeErrorModalVisible: true,
|
|
1970
|
+
// ipadRecordId: '',
|
|
1971
|
+
// })
|
|
1972
|
+
// this.saveLog(`ipad dual recording crash, recordId=${recordId}`);
|
|
1973
|
+
// // 循环播放录制中断语音
|
|
1974
|
+
// clearTimeout(this.recordLoopPlayTimer)
|
|
1975
|
+
// this.recordLoopPlay = () => {
|
|
1976
|
+
// console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
|
|
1977
|
+
// if(!this.state.ipadRecordId && document.getElementById("publish_streamId1")){
|
|
1978
|
+
// let audio = new Audio(recordErrorAudio)
|
|
1979
|
+
// audio.play()
|
|
1980
|
+
// this.recordLoopPlayTimer = setTimeout(this.recordLoopPlay, 3000);
|
|
1981
|
+
// }
|
|
1982
|
+
// }
|
|
1983
|
+
// setTimeout(this.recordLoopPlay, 0);
|
|
1984
|
+
// }
|
|
1955
1985
|
|
|
1956
1986
|
} else if (Mival.typeId == 33001 && this.state.sessionId == Mival.data.sessionId) {
|
|
1957
1987
|
if (Mival.type == 1) {
|
|
@@ -2363,6 +2393,7 @@ class Video extends Component {
|
|
|
2363
2393
|
} else if (sid == this.state.publishScreenSid) {
|
|
2364
2394
|
this.state.isScreenSwitching = false
|
|
2365
2395
|
this.setSharedScreenState(false)
|
|
2396
|
+
this.setSharedScreenTimer(false)
|
|
2366
2397
|
if (code == 5007 || code == 5007 || code == 5009 || code == 5010 || code == 5011) {
|
|
2367
2398
|
this.saveVideoPoint('conFail', `RM投屏媒体链路断开, err_code=${code}`)
|
|
2368
2399
|
playAudioTip();
|
|
@@ -2507,15 +2538,19 @@ class Video extends Component {
|
|
|
2507
2538
|
if ( stream.getVideoTracks()[0] instanceof BrowserCaptureMediaStreamTrack) {
|
|
2508
2539
|
console.log('tab共享')
|
|
2509
2540
|
this.saveLog('Share type = tab')
|
|
2541
|
+
this.state.lastShareType = 'share'
|
|
2510
2542
|
} else if (stream.getVideoTracks()[0] instanceof MediaStreamTrack && stream.getVideoTracks()[0].label.includes('screen')) {
|
|
2511
2543
|
console.log('屏幕共享')
|
|
2512
2544
|
this.saveLog('Share type = screen')
|
|
2545
|
+
this.state.lastShareType = 'share'
|
|
2513
2546
|
} else if (stream.getVideoTracks()[0].label.includes('window')){
|
|
2514
2547
|
console.log('窗口共享')
|
|
2515
2548
|
this.saveLog('Share type = window')
|
|
2549
|
+
this.state.lastShareType = 'share'
|
|
2516
2550
|
} else if (stream.getVideoTracks()[0] instanceof CanvasCaptureMediaStreamTrack){
|
|
2517
2551
|
console.log('白板共享')
|
|
2518
2552
|
this.saveLog('Share type = whiteboard')
|
|
2553
|
+
this.state.lastShareType = 'whiteboard'
|
|
2519
2554
|
}
|
|
2520
2555
|
} catch (err) {
|
|
2521
2556
|
console.log('不支持此浏览器记录投屏类型日志')
|
|
@@ -2568,6 +2603,7 @@ class Video extends Component {
|
|
|
2568
2603
|
if (sid == document.getElementById('video20').name) {
|
|
2569
2604
|
this.state.publishScreenSid = document.getElementById('video20').name
|
|
2570
2605
|
this.setSharedScreenState(true)
|
|
2606
|
+
this.setSharedScreenTimer(true)
|
|
2571
2607
|
this.saveLog('Share success')
|
|
2572
2608
|
this.sendMessage({
|
|
2573
2609
|
'typeId': 2030,
|
|
@@ -2639,6 +2675,7 @@ class Video extends Component {
|
|
|
2639
2675
|
} else {
|
|
2640
2676
|
this.messageClick('投屏失败请重新投屏', 'error')
|
|
2641
2677
|
this.setSharedScreenState(false)
|
|
2678
|
+
this.setSharedScreenTimer(false)
|
|
2642
2679
|
this.saveLog('Share fail, code=' + err_code)
|
|
2643
2680
|
}
|
|
2644
2681
|
|
|
@@ -2898,6 +2935,7 @@ class Video extends Component {
|
|
|
2898
2935
|
})
|
|
2899
2936
|
this.state.isSharedScreen = false
|
|
2900
2937
|
this.setSharedScreenState(false)
|
|
2938
|
+
this.setSharedScreenTimer(false)
|
|
2901
2939
|
this.saveLog('Stop share')
|
|
2902
2940
|
this.setState({
|
|
2903
2941
|
|
|
@@ -2958,6 +2996,41 @@ class Video extends Component {
|
|
|
2958
2996
|
// 推送“取消发布”给与会者
|
|
2959
2997
|
this.test_controller.OnUnPublish = (feed) => {
|
|
2960
2998
|
console.log('取消发布者', feed)
|
|
2999
|
+
|
|
3000
|
+
// ipad取消发布提醒
|
|
3001
|
+
if (feed.uid.includes(IPAD_SUFFIX) && this.state.businessId){
|
|
3002
|
+
// ipad单独处理,双录过程中ipad如果取消发布,要提示+循环播报直到ipad重新入会
|
|
3003
|
+
this.setState({
|
|
3004
|
+
IpadLeaveErrorModalVisible: true,
|
|
3005
|
+
IpadErrorWording: 'iPad 媒体流异常,请重新扫码或输入会议号入会',
|
|
3006
|
+
ipadTag: '',
|
|
3007
|
+
})
|
|
3008
|
+
// 循环播放ipad退出语音
|
|
3009
|
+
clearTimeout(this.ipadLeavePlayTimer)
|
|
3010
|
+
this.ipadMediaClosePlay = () => {
|
|
3011
|
+
if(!this.state.ipadTag && document.getElementById("publish_streamId1")){
|
|
3012
|
+
if (this.ipadLeaveAudio) this.ipadLeaveAudio.pause()
|
|
3013
|
+
setTimeout(() => {
|
|
3014
|
+
this.ipadLeaveAudio = new Audio(ipadMediaCloseAudio)
|
|
3015
|
+
this.ipadLeaveAudio.play()
|
|
3016
|
+
}, 800); // 防止退出房间时重音
|
|
3017
|
+
this.ipadLeavePlayTimer = setTimeout(this.ipadMediaClosePlay, 3000);
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
setTimeout(this.ipadMediaClosePlay, 0);
|
|
3021
|
+
} else if (feed.uid.includes(IPAD_SUFFIX)) {
|
|
3022
|
+
// 非双录下ipad离开提示iPad已断开
|
|
3023
|
+
this.setState({
|
|
3024
|
+
ipadTag: '',
|
|
3025
|
+
})
|
|
3026
|
+
this.messageClick(('iPad 媒体流异常,请调整'), 'error')
|
|
3027
|
+
this.saveLog('iPad media close')
|
|
3028
|
+
if (this.props.isOpenSound) {
|
|
3029
|
+
let audio = new Audio(ipadMediaCloseAudio)
|
|
3030
|
+
audio.play()
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
|
|
2961
3034
|
for (let i = 0; i < this.state.roomCustomerList.length; i++) {
|
|
2962
3035
|
if (this.state.roomCustomerList[i].feedId == feed.feedId) {
|
|
2963
3036
|
this.state.roomCustomerList.splice(i, 1)
|
|
@@ -3014,18 +3087,21 @@ class Video extends Component {
|
|
|
3014
3087
|
// ipad单独处理,双录过程中ipad如果离开,要提示+循环播报直到ipad重新入会
|
|
3015
3088
|
this.setState({
|
|
3016
3089
|
IpadLeaveErrorModalVisible: true,
|
|
3090
|
+
IpadErrorWording: 'iPad 摄像头异常退出,请扫码或输入会议号入会',
|
|
3017
3091
|
ipadTag: '',
|
|
3018
3092
|
})
|
|
3019
3093
|
// 循环播放ipad退出语音
|
|
3020
3094
|
clearTimeout(this.ipadLeavePlayTimer)
|
|
3021
3095
|
this.ipadLeavePlay = () => {
|
|
3022
3096
|
if(!this.state.ipadTag && document.getElementById("publish_streamId1")){
|
|
3023
|
-
|
|
3024
|
-
|
|
3097
|
+
if (this.ipadLeaveAudio) this.ipadLeaveAudio.pause()
|
|
3098
|
+
this.ipadLeaveAudio = new Audio(IpadLeaveAudio)
|
|
3099
|
+
this.ipadLeaveAudio.play()
|
|
3025
3100
|
this.ipadLeavePlayTimer = setTimeout(this.ipadLeavePlay, 3000);
|
|
3026
3101
|
}
|
|
3027
3102
|
}
|
|
3028
3103
|
setTimeout(this.ipadLeavePlay, 0);
|
|
3104
|
+
this.saveLog('iPad leave room during recording')
|
|
3029
3105
|
return
|
|
3030
3106
|
} else if (participant.includes(IPAD_SUFFIX)) {
|
|
3031
3107
|
// 非双录下ipad离开提示iPad已断开
|
|
@@ -3265,7 +3341,7 @@ class Video extends Component {
|
|
|
3265
3341
|
|
|
3266
3342
|
// 如果在业务双录中,需要重新开启;如果是full录制出错,则不用处理
|
|
3267
3343
|
if (this.state.businessRecordId == recordId) {
|
|
3268
|
-
//
|
|
3344
|
+
// 双录录制中断
|
|
3269
3345
|
this.messageClick('双录异常中断,请重新开启', 'error')
|
|
3270
3346
|
this.setState({
|
|
3271
3347
|
isRecordingeErrorModalVisible: true,
|
|
@@ -3283,6 +3359,25 @@ class Video extends Component {
|
|
|
3283
3359
|
}
|
|
3284
3360
|
}
|
|
3285
3361
|
setTimeout(this.recordLoopPlay, 0);
|
|
3362
|
+
} else if (this.state.ipadRecordId == recordId) {
|
|
3363
|
+
// ipad录制中断
|
|
3364
|
+
this.messageClick('双录异常中断,请重新开启', 'error')
|
|
3365
|
+
this.setState({
|
|
3366
|
+
isRecordingeErrorModalVisible: true,
|
|
3367
|
+
ipadRecordId: '',
|
|
3368
|
+
})
|
|
3369
|
+
this.saveLog(`ipad dual recording crash, recordId=${recordId}`);
|
|
3370
|
+
// 循环播放录制中断语音
|
|
3371
|
+
clearTimeout(this.recordLoopPlayTimer)
|
|
3372
|
+
this.recordLoopPlay = () => {
|
|
3373
|
+
console.log('loop recordId', this.state.recordId, 'businessRecordId ', this.state.businessRecordId)
|
|
3374
|
+
if(!this.state.ipadRecordId && document.getElementById("publish_streamId1")){
|
|
3375
|
+
let audio = new Audio(recordErrorAudio)
|
|
3376
|
+
audio.play()
|
|
3377
|
+
this.recordLoopPlayTimer = setTimeout(this.recordLoopPlay, 3000);
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
setTimeout(this.recordLoopPlay, 0);
|
|
3286
3381
|
}
|
|
3287
3382
|
};
|
|
3288
3383
|
// 停止浏览器录制成功回调
|
|
@@ -3374,6 +3469,7 @@ class Video extends Component {
|
|
|
3374
3469
|
this.state.isSharedScreen = true
|
|
3375
3470
|
this.state.isScreenSwitching = false
|
|
3376
3471
|
this.setSharedScreenState(true)
|
|
3472
|
+
this.setSharedScreenTimer(true)
|
|
3377
3473
|
this.saveLog('Share changed')
|
|
3378
3474
|
}
|
|
3379
3475
|
}
|
|
@@ -3392,10 +3488,13 @@ class Video extends Component {
|
|
|
3392
3488
|
})
|
|
3393
3489
|
this.messageClick('切换摄像头或麦克风失败,请先检查设备', 'error')
|
|
3394
3490
|
} else if (this.state.screenName == '切换共享') {
|
|
3491
|
+
this.saveLog('unPublish share, reason: trigger OnChangeMediaStreamFailed')
|
|
3492
|
+
console.log('unPublish share, reason: trigger OnChangeMediaStreamFailed')
|
|
3395
3493
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
3396
3494
|
this.state.isSharedScreen = false
|
|
3397
3495
|
this.state.isScreenSwitching = false
|
|
3398
3496
|
this.setSharedScreenState(false)
|
|
3497
|
+
this.setSharedScreenTimer(false)
|
|
3399
3498
|
this.saveLog('Share fail, code=' + code)
|
|
3400
3499
|
this.setState({
|
|
3401
3500
|
screenName: '共享模式'
|
|
@@ -3530,6 +3629,8 @@ class Video extends Component {
|
|
|
3530
3629
|
this.state.isScreenSwitching = false
|
|
3531
3630
|
} else {
|
|
3532
3631
|
if (!streamShare) {
|
|
3632
|
+
this.saveLog('unPublish share, reason: trigger OnDesktopDisplayClosed, manually click stop or stream onended')
|
|
3633
|
+
console.log('unPublish share, reason: trigger OnDesktopDisplayClosed, manually click stop or stream onended')
|
|
3533
3634
|
document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
|
|
3534
3635
|
} else {
|
|
3535
3636
|
console.log('白板')
|
|
@@ -3537,6 +3638,7 @@ class Video extends Component {
|
|
|
3537
3638
|
this.state.isSharedScreen = false
|
|
3538
3639
|
this.state.isScreenSwitching = false
|
|
3539
3640
|
this.setSharedScreenState(false)
|
|
3641
|
+
this.setSharedScreenTimer(false)
|
|
3540
3642
|
this.setState({
|
|
3541
3643
|
screenName: '共享模式'
|
|
3542
3644
|
});
|
|
@@ -3760,9 +3862,14 @@ class Video extends Component {
|
|
|
3760
3862
|
clearTimeout(this.ipadLeavePlayTimer)
|
|
3761
3863
|
clearTimeout(this.ipadLowPowerPlayTimer)
|
|
3762
3864
|
clearTimeout(this.mediaErrorPlayTimer)
|
|
3865
|
+
clearTimeout(this.screenSharedTimer)
|
|
3763
3866
|
clearInterval(this.state.drawCanvasInterval)
|
|
3764
3867
|
clearInterval(this.state.faceDetectionTimer);
|
|
3765
3868
|
clearInterval(this.state.imageDetectionTimer);
|
|
3869
|
+
this.removeVideoEvent(['video20', 'video21', 'publish_video1'])
|
|
3870
|
+
for(let i=1;i<=12;i++){
|
|
3871
|
+
this.removeVideoEvent(['video'+ i])
|
|
3872
|
+
}
|
|
3766
3873
|
}
|
|
3767
3874
|
finishSession = () => {
|
|
3768
3875
|
// clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
@@ -3996,6 +4103,27 @@ class Video extends Component {
|
|
|
3996
4103
|
hasOcr: 0,
|
|
3997
4104
|
})
|
|
3998
4105
|
}
|
|
4106
|
+
this.videoErrorEvent = (event) => {
|
|
4107
|
+
console.log(event)
|
|
4108
|
+
console.log(`video load ${event.type || 'error'}: sid=${event.target.name}, domid=${event.target.id}`)
|
|
4109
|
+
this.saveLog(`video load ${event.type || 'error'}: sid=${event.target.name}, domid=${event.target.id}`)
|
|
4110
|
+
}
|
|
4111
|
+
this.bindVideoEvent = (domArr) => {
|
|
4112
|
+
domArr.forEach((domId) => {
|
|
4113
|
+
document.getElementById(domId).addEventListener("error", this.videoErrorEvent);
|
|
4114
|
+
document.getElementById(domId).addEventListener("emptied", this.videoErrorEvent);
|
|
4115
|
+
document.getElementById(domId).addEventListener("stalled", this.videoErrorEvent);
|
|
4116
|
+
document.getElementById(domId).addEventListener("suspend", this.videoErrorEvent);
|
|
4117
|
+
})
|
|
4118
|
+
}
|
|
4119
|
+
this.removeVideoEvent = (domArr) => {
|
|
4120
|
+
domArr.forEach((domId) => {
|
|
4121
|
+
document.getElementById(domId).removeEventListener("error", this.videoErrorEvent);
|
|
4122
|
+
document.getElementById(domId).removeEventListener("emptied", this.videoErrorEvent);
|
|
4123
|
+
document.getElementById(domId).removeEventListener("stalled", this.videoErrorEvent);
|
|
4124
|
+
document.getElementById(domId).removeEventListener("suspend", this.videoErrorEvent);
|
|
4125
|
+
})
|
|
4126
|
+
}
|
|
3999
4127
|
this.setState({
|
|
4000
4128
|
videoList: arr
|
|
4001
4129
|
}, () => {
|
|
@@ -4009,7 +4137,9 @@ class Video extends Component {
|
|
|
4009
4137
|
// console.log(arrItem.videoName)
|
|
4010
4138
|
|
|
4011
4139
|
});
|
|
4140
|
+
this.bindVideoEvent(['video'+ i])
|
|
4012
4141
|
}
|
|
4142
|
+
this.bindVideoEvent(['video20', 'video21', 'publish_video1'])
|
|
4013
4143
|
})
|
|
4014
4144
|
if (this.props.sessionId) {
|
|
4015
4145
|
this.getRoomStatus({
|
|
@@ -4044,6 +4174,12 @@ class Video extends Component {
|
|
|
4044
4174
|
let that = this;
|
|
4045
4175
|
this.asr_controller.onConnectError = () => {
|
|
4046
4176
|
this.messageClick('违禁词检测服务连接失败', 'error')
|
|
4177
|
+
this.saveLog('DR_ASR_FAILURE');
|
|
4178
|
+
}
|
|
4179
|
+
this.asr_controller.onAsrError = (info) => {
|
|
4180
|
+
// this.messageClick('违禁词检测服务连接失败', 'error')
|
|
4181
|
+
console.log(`ASR fail event, status=${info.status}, msg=${info.message}, taskId=${info.taskId}`);
|
|
4182
|
+
this.saveLog(`ASR fail event, status=${info.status}, msg=${info.message}, taskId=${info.taskId}`);
|
|
4047
4183
|
}
|
|
4048
4184
|
|
|
4049
4185
|
this.asr_controller.onConnectOK = () => {
|
|
@@ -4212,6 +4348,26 @@ class Video extends Component {
|
|
|
4212
4348
|
}
|
|
4213
4349
|
}
|
|
4214
4350
|
}
|
|
4351
|
+
setSharedScreenTimer = (state) => {
|
|
4352
|
+
// 设置定时,如果x秒内没有重新开启投屏 则弹出提示
|
|
4353
|
+
if (!this.props.screenSharedInterval || typeof this.props.screenSharedInterval != 'number') return;
|
|
4354
|
+
if (state) {
|
|
4355
|
+
clearTimeout(this.screenSharedTimer)
|
|
4356
|
+
} else {
|
|
4357
|
+
clearTimeout(this.screenSharedTimer)
|
|
4358
|
+
this.screenSharedTimer = setTimeout(() => {
|
|
4359
|
+
if (!document.getElementById('video20').name) {
|
|
4360
|
+
this.setState({
|
|
4361
|
+
screenSharedModalVisible: true
|
|
4362
|
+
})
|
|
4363
|
+
let audio = new Audio(screenSharedIntervalAudio)
|
|
4364
|
+
audio.play()
|
|
4365
|
+
} else {
|
|
4366
|
+
console.log('screenSharedTimer触发时已经在投屏')
|
|
4367
|
+
}
|
|
4368
|
+
}, this.props.screenSharedInterval * 1000)
|
|
4369
|
+
}
|
|
4370
|
+
}
|
|
4215
4371
|
isFileSuccuse = () => {
|
|
4216
4372
|
if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
|
|
4217
4373
|
this.messageClick('当前程序异常请先退出重开', 'error')
|
|
@@ -4262,6 +4418,10 @@ class Video extends Component {
|
|
|
4262
4418
|
};
|
|
4263
4419
|
sharedScreen = () => {
|
|
4264
4420
|
console.log('投屏', this.state.tabTitles.find(el => el.value == 'staffScreen'))
|
|
4421
|
+
if (this.state.shareLock) {
|
|
4422
|
+
console.log('发布共享点击太快了')
|
|
4423
|
+
return;
|
|
4424
|
+
}
|
|
4265
4425
|
if (this.isFileSuccuse()) {
|
|
4266
4426
|
if (!this.state.tabTitles.find(el => el.value == 'staffScreen')) {
|
|
4267
4427
|
const publish_config = {};
|
|
@@ -4270,7 +4430,10 @@ class Video extends Component {
|
|
|
4270
4430
|
streamShare = ''
|
|
4271
4431
|
}
|
|
4272
4432
|
if (this.state.isSharedScreen) {
|
|
4433
|
+
this.saveLog('unPublish share, reason: change screen content')
|
|
4434
|
+
console.log('unPublish share, reason: change screen content')
|
|
4273
4435
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
4436
|
+
this.state.shareLock = true;
|
|
4274
4437
|
setTimeout(() => {
|
|
4275
4438
|
publish_config.media_type = 1
|
|
4276
4439
|
publish_config.publish_device = 2
|
|
@@ -4283,7 +4446,18 @@ class Video extends Component {
|
|
|
4283
4446
|
publish_config.publish_streamId_id = 'subscribe_streamId20'
|
|
4284
4447
|
publish_config.publish_tag = 'projectionWhiteboard'
|
|
4285
4448
|
this.test_controller.Publish(publish_config)
|
|
4449
|
+
setTimeout(() => { this.state.shareLock = false; }, 500);
|
|
4286
4450
|
}, 300);
|
|
4451
|
+
this.setState({
|
|
4452
|
+
screenName: '切换共享',
|
|
4453
|
+
isPDF: false
|
|
4454
|
+
})
|
|
4455
|
+
this.tabTitlesClick(
|
|
4456
|
+
{
|
|
4457
|
+
value: 'RMScreen',
|
|
4458
|
+
name: '共享内容'
|
|
4459
|
+
}, 'add'
|
|
4460
|
+
)
|
|
4287
4461
|
// const publish_config = {}
|
|
4288
4462
|
// publish_config.media_type = 1
|
|
4289
4463
|
// publish_config.publish_device = 2
|
|
@@ -4298,7 +4472,10 @@ class Video extends Component {
|
|
|
4298
4472
|
// this.state.isScreenSwitching = true
|
|
4299
4473
|
} else {
|
|
4300
4474
|
if (document.getElementById('video20').name) {
|
|
4475
|
+
this.saveLog('unPublish share, reason: change screen content')
|
|
4476
|
+
console.log('unPublish share, reason: change screen content')
|
|
4301
4477
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
4478
|
+
this.state.shareLock = true;
|
|
4302
4479
|
setTimeout(() => {
|
|
4303
4480
|
publish_config.media_type = 1
|
|
4304
4481
|
publish_config.publish_device = 2
|
|
@@ -4311,7 +4488,8 @@ class Video extends Component {
|
|
|
4311
4488
|
publish_config.publish_streamId_id = 'subscribe_streamId20'
|
|
4312
4489
|
publish_config.publish_tag = 'projectionWhiteboard'
|
|
4313
4490
|
this.test_controller.Publish(publish_config)
|
|
4314
|
-
|
|
4491
|
+
setTimeout(() => { this.state.shareLock = false; }, 500); // 这个延迟用于防止跳出弹窗后仍可以点击共享按钮,大于debounce300即可
|
|
4492
|
+
}, 300);// 这个延迟用于跟UnPublish 产生时差,防止标签未被释放
|
|
4315
4493
|
// publish_config.media_type = 1;
|
|
4316
4494
|
// publish_config.publish_device = 2;
|
|
4317
4495
|
// publish_config.video_profile_type = 1
|
|
@@ -4465,7 +4643,8 @@ class Video extends Component {
|
|
|
4465
4643
|
this.pictureInPicture()
|
|
4466
4644
|
}
|
|
4467
4645
|
this.saveLog('Start business recording')
|
|
4468
|
-
this.enableServerRecording(this.state.businessId)
|
|
4646
|
+
if (!this.state.businessRecordId) this.enableServerRecording(this.state.businessId)
|
|
4647
|
+
if (!this.state.ipadRecordId && this.state.ipadTag) this.enableIpadRecording(this.state.businessId)
|
|
4469
4648
|
clearTimeout(this.recordLoopPlayTimer)
|
|
4470
4649
|
}
|
|
4471
4650
|
handleOkLowPowerConfirm = () => {
|
|
@@ -4476,6 +4655,44 @@ class Video extends Component {
|
|
|
4476
4655
|
'userId': this.props.tellerAccount
|
|
4477
4656
|
})
|
|
4478
4657
|
}
|
|
4658
|
+
// 取消投屏确认
|
|
4659
|
+
handleOkShareConfirm = () => {
|
|
4660
|
+
this.setState({
|
|
4661
|
+
screenSharedModalVisible: false
|
|
4662
|
+
})
|
|
4663
|
+
if (this.state.lastShareType == 'whiteboard') {
|
|
4664
|
+
this.switchExternal()
|
|
4665
|
+
} else {
|
|
4666
|
+
this.sharedScreen()
|
|
4667
|
+
}
|
|
4668
|
+
this.saveLog('Shared overlay click confirm')
|
|
4669
|
+
}
|
|
4670
|
+
handleOkShareCancel = () => {
|
|
4671
|
+
this.setState({
|
|
4672
|
+
screenSharedModalVisible: false,
|
|
4673
|
+
screenSharedSecondaryModalVisible: true
|
|
4674
|
+
})
|
|
4675
|
+
this.saveLog('Shared overlay click cancel')
|
|
4676
|
+
}
|
|
4677
|
+
// 二次取消投屏确认
|
|
4678
|
+
handleOkSecondaryShareConfirm = () => {
|
|
4679
|
+
this.setState({
|
|
4680
|
+
screenSharedSecondaryModalVisible: false
|
|
4681
|
+
})
|
|
4682
|
+
if (this.state.lastShareType == 'whiteboard') {
|
|
4683
|
+
this.switchExternal()
|
|
4684
|
+
} else {
|
|
4685
|
+
this.sharedScreen()
|
|
4686
|
+
}
|
|
4687
|
+
this.saveLog('Shared secondary overlay click confirm')
|
|
4688
|
+
}
|
|
4689
|
+
handleOkSecondaryShareCancel = () => {
|
|
4690
|
+
this.setState({
|
|
4691
|
+
screenSharedSecondaryModalVisible: false
|
|
4692
|
+
})
|
|
4693
|
+
this.saveLog('Shared secondary overlay click cancel')
|
|
4694
|
+
this.saveVideoPoint('cancelShare', 'RM二次确认取消投屏')
|
|
4695
|
+
}
|
|
4479
4696
|
handleOkMediaErrorConfirm = () => {
|
|
4480
4697
|
// 刷新重试
|
|
4481
4698
|
clearTimeout(this.mediaErrorPlayTimer)
|
|
@@ -5538,12 +5755,18 @@ class Video extends Component {
|
|
|
5538
5755
|
//单击停止共享按钮后,触发这个事件
|
|
5539
5756
|
streamShare = ''
|
|
5540
5757
|
if (document.getElementById('video20').name && !this.state.isSharedScreen) {
|
|
5758
|
+
console.log('unPublish share, reason: click stop sharing whiteboard or stream onended')
|
|
5759
|
+
that.saveLog('unPublish share, reason: click stop sharing whiteboard or stream onended')
|
|
5541
5760
|
that.test_controller.UnPublish(document.getElementById('video20').name)
|
|
5542
5761
|
}
|
|
5543
5762
|
}
|
|
5544
5763
|
|
|
5545
5764
|
// 关闭当前共享屏幕
|
|
5546
|
-
document.getElementById('video20') && document.getElementById('video20').name
|
|
5765
|
+
if (document.getElementById('video20') && document.getElementById('video20').name) {
|
|
5766
|
+
console.log('unPublish share, reason: going to share whiteboard, shared screen needs to be stopped')
|
|
5767
|
+
that.saveLog('unPublish share, reason: going to share whiteboard, shared screen needs to be stopped')
|
|
5768
|
+
that.test_controller.UnPublish(document.getElementById('video20').name)
|
|
5769
|
+
}
|
|
5547
5770
|
that.state.isSharedScreen = false
|
|
5548
5771
|
that.state.isScreenSwitching = false
|
|
5549
5772
|
// that.setSharedScreenState(false)
|
|
@@ -5556,6 +5779,9 @@ class Video extends Component {
|
|
|
5556
5779
|
console.log("Unable to acquire screen capture", error);
|
|
5557
5780
|
console.log('取消签署')
|
|
5558
5781
|
that.saveLog('Manual cancel share')
|
|
5782
|
+
if (!document.getElementById('video20').name) {
|
|
5783
|
+
that.setSharedScreenTimer(false)
|
|
5784
|
+
}
|
|
5559
5785
|
});
|
|
5560
5786
|
}
|
|
5561
5787
|
publishRecorderDevice = () => {
|
|
@@ -5640,6 +5866,8 @@ class Video extends Component {
|
|
|
5640
5866
|
//单击停止共享按钮后,触发这个事件
|
|
5641
5867
|
streamRecord = ''
|
|
5642
5868
|
if (document.getElementById('record_video').name) {
|
|
5869
|
+
that.saveLog('unPublish share, reason: click stop recording all screen or stream onended')
|
|
5870
|
+
console.log('unPublish share, reason: click stop recording all screen or stream onended')
|
|
5643
5871
|
that.test_controller.UnPublish(document.getElementById('record_video').name)
|
|
5644
5872
|
}
|
|
5645
5873
|
}
|
|
@@ -5671,6 +5899,7 @@ class Video extends Component {
|
|
|
5671
5899
|
}
|
|
5672
5900
|
}
|
|
5673
5901
|
this.navigatorClick()
|
|
5902
|
+
clearTimeout(this.screenSharedTimer)
|
|
5674
5903
|
|
|
5675
5904
|
} else {
|
|
5676
5905
|
this.messageClick('internal staff正在共享屏幕,请先关闭', 'error')
|
|
@@ -6913,6 +7142,24 @@ class Video extends Component {
|
|
|
6913
7142
|
]}>
|
|
6914
7143
|
<div className='endModal'>双录异常中断,请重新开启</div>
|
|
6915
7144
|
</Modal>
|
|
7145
|
+
{/* 投屏间隔过长确认 */}
|
|
7146
|
+
<Modal closable={false} centered={true} visible={this.state.screenSharedModalVisible} maskClosable={false} footer={[
|
|
7147
|
+
<div key='end'>
|
|
7148
|
+
<Button className="modelButtonCancel" onClick={this.handleOkShareCancel}>取消操作</Button>
|
|
7149
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkShareConfirm}>确认共享</Button>
|
|
7150
|
+
</div>
|
|
7151
|
+
]}>
|
|
7152
|
+
<div className='endModal' style={{paddingBottom: '20px'}}>当前系统未共享屏幕、未共享声音,请确认是否需要开启共享操作?</div>
|
|
7153
|
+
</Modal>
|
|
7154
|
+
{/* 投屏间隔过长二次确认 */}
|
|
7155
|
+
<Modal closable={false} centered={true} visible={this.state.screenSharedSecondaryModalVisible} maskClosable={false} footer={[
|
|
7156
|
+
<div key='end'>
|
|
7157
|
+
<Button className="modelButtonCancel" onClick={this.handleOkSecondaryShareCancel}>取消操作</Button>
|
|
7158
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkSecondaryShareConfirm}>确认共享</Button>
|
|
7159
|
+
</div>
|
|
7160
|
+
]}>
|
|
7161
|
+
<div className='endModal' style={{paddingBottom: '20px'}}>取消操作按钮将无法开启共享屏幕、共享声音,请再次确认</div>
|
|
7162
|
+
</Modal>
|
|
6916
7163
|
{/* ipad低电量确认 */}
|
|
6917
7164
|
<Modal closable={false} centered={true} visible={this.state.ipadLowPowerErrorModalVisible} maskClosable={false} footer={[
|
|
6918
7165
|
<div key='end'>
|
|
@@ -6927,7 +7174,7 @@ class Video extends Component {
|
|
|
6927
7174
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkIpadLeaveConfirm}>确定</Button>
|
|
6928
7175
|
</div>
|
|
6929
7176
|
]}>
|
|
6930
|
-
<div className='ipadModal'>
|
|
7177
|
+
<div className='ipadModal'>{this.state.IpadErrorWording}</div>
|
|
6931
7178
|
<div className='QRCode center'>
|
|
6932
7179
|
<QRCode
|
|
6933
7180
|
value={JSON.stringify({
|
|
@@ -7439,6 +7686,7 @@ Video.defaultProps = {
|
|
|
7439
7686
|
whetherNeedAsr: false, // 是否在双录时开启违禁词检测
|
|
7440
7687
|
faceDetectInterval: 6, // 人脸检测间隔(秒)
|
|
7441
7688
|
lightDetectInterval: 6, // 背光检测间隔(秒)
|
|
7689
|
+
screenSharedInterval: 0, // 取消投屏提示间隔(秒), 0不启用
|
|
7442
7690
|
lightSensitivity: 1, // 光线敏感度系数,默认1
|
|
7443
7691
|
userSide: 2,
|
|
7444
7692
|
meetingDuration: null, // 会议时长,单位小时
|