react_hsbc_teller 1.9.16 → 1.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "1.9.16",
3
+ "version": "1.9.18",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -59,7 +59,7 @@ let videoName
59
59
  let muteJson = new Map()
60
60
  let dateTime = 0
61
61
  let messageValue = ''
62
- let beautyType = false
62
+ // let beautyType = false
63
63
  // let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
64
64
  let rateList = []
65
65
  let beautyDiv = {};
@@ -108,6 +108,7 @@ function clearStreamRemain() {
108
108
  document.body.removeChild(beautyDiv.beauty_div);
109
109
  beautyDiv.beauty_div = null;
110
110
  }
111
+ console.log('clearStreamRemain!!!!!')
111
112
  beautyDiv = {};
112
113
  };
113
114
  async function startBeauty(stream) {
@@ -167,6 +168,7 @@ class Video extends Component {
167
168
  }
168
169
  cancel = axios.CancelToken.source()
169
170
  state = {
171
+ beautyType: false,
170
172
  beautyName: '开启美颜',
171
173
  signNoClick: false,
172
174
  listVideoPicture: [],
@@ -292,7 +294,7 @@ class Video extends Component {
292
294
  saveLog = (val) => {
293
295
  axios({
294
296
  method: 'get',
295
- baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.16&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
297
+ baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.18&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
296
298
 
297
299
  }).then(res => {
298
300
 
@@ -808,7 +810,8 @@ class Video extends Component {
808
810
  // faceFailReason: result.message
809
811
  })
810
812
  this.errorCodeClick('face',result.code)
811
- this.saveLog('meeting ID&V error, code=' + result.code )
813
+ // this.saveLog('meeting ID&V error, code=' + result.code )
814
+ this.saveLog('face recognition api error code ' + result.code + '. [ LIVE_SIGN_ALI_FACE_RECOGNITION_ERROR ]')
812
815
  }
813
816
 
814
817
 
@@ -1743,6 +1746,44 @@ class Video extends Component {
1743
1746
  this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
1744
1747
  }
1745
1748
  }
1749
+ if (JSON.parse(msg).typeId == 4004 && this.state.sessionId == JSON.parse(msg).data.sessionId) {
1750
+ if (this.isFileSuccuse()) {
1751
+ if (!this.state.voiceStatue) {
1752
+ // 静音本地
1753
+ this.setState({
1754
+ voiceStatue: true,
1755
+ voiceImg: voiceImgCloe,
1756
+ voiceName: '解除静音'
1757
+ });
1758
+ let sid = document.getElementById('publish_video1').name || document.getElementById('publish_streamId1').name;
1759
+ this.test_controller.SetLocalAudioEnable(0, parseInt(sid, 10));
1760
+ callNimIM('sendCustomCmdMsg', {
1761
+ customId: this.state.imRoomId,
1762
+ content: JSON.stringify({
1763
+ 'typeId': 1013,
1764
+ 'muteStatus': 1,
1765
+ 'data': {
1766
+ 'sessionId': this.state.sessionId,
1767
+ 'userId': this.props.tellerAccount
1768
+ }
1769
+ })
1770
+ }, function (code, message, data) {
1771
+ // console.log(data)
1772
+ })
1773
+ }
1774
+ setTimeout(() => {
1775
+ callNimIM('sendCustomCmdMsg', {
1776
+ customId: this.state.imRoomId,
1777
+ content: JSON.stringify({
1778
+ 'typeId': 1223,
1779
+ 'state': 1, // app解除静音
1780
+ 'sessionId': this.state.sessionId,
1781
+ 'userId': uid //this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId1').innerText).uid
1782
+ })
1783
+ });
1784
+ }, 1000);
1785
+ }
1786
+ }
1746
1787
  this.saveLog('mrtc OnReceiveTextMsg info:', uid, msg, JSON.parse(msg).typeId, JSON.parse(msg).data.sessionId, this.state.sessionId)
1747
1788
  }
1748
1789
  this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) => {
@@ -2729,6 +2770,13 @@ class Video extends Component {
2729
2770
  clearStreamRemain()
2730
2771
  this.test_controller.LeaveRoom()
2731
2772
  this.test_controller.Disconnect()
2773
+ try {
2774
+ beautySetMode('none');
2775
+ beautyStop();
2776
+ console.log('beautyStop!!')
2777
+ } catch (err){
2778
+ console.error(err)
2779
+ }
2732
2780
  }
2733
2781
  if (this.state.imStatus) {
2734
2782
  console.log('disconnect断开连接')
@@ -2926,7 +2974,7 @@ class Video extends Component {
2926
2974
  }
2927
2975
  }
2928
2976
  componentWillMount() {
2929
- console.log('hsbc_teller_sdk', '1.9.16')
2977
+ console.log('hsbc_teller_sdk', '1.9.18')
2930
2978
  let arr = []
2931
2979
  for(let i=1;i<=12;i++){
2932
2980
  arr.push({
@@ -4447,14 +4495,14 @@ class Video extends Component {
4447
4495
  // publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
4448
4496
  // this.test_controller.ChangeMediaStream(publish_config)
4449
4497
  // beautyNum = beautyNum == 0 ? 1 : 0
4450
- if (beautyType) {
4451
- beautyType = false
4498
+ if (this.state.beautyType) {
4499
+ this.state.beautyType = false
4452
4500
  this.setState({
4453
4501
  beautyName: '开启美颜'
4454
4502
  })
4455
4503
  beautySetMode('none')
4456
4504
  } else {
4457
- beautyType = true
4505
+ this.state.beautyType = true
4458
4506
  beautySetMode('beauty')
4459
4507
  this.setState({
4460
4508
  beautyName: '关闭美颜'