react_hsbc_teller 1.9.25 → 1.9.27

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.25",
3
+ "version": "1.9.27",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -296,7 +296,7 @@ class Video extends Component {
296
296
  saveLog = (val) => {
297
297
  axios({
298
298
  method: 'get',
299
- baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.25&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
299
+ baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.27&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
300
300
 
301
301
  }).then(res => {
302
302
 
@@ -1873,7 +1873,11 @@ class Video extends Component {
1873
1873
  'tellerId': this.props.tellerAccount
1874
1874
  })
1875
1875
  });
1876
- if (this.state.screenName == '切换共享') {
1876
+ // if (this.state.screenName == '切换共享') {
1877
+ // this.state.isSharedScreen = true
1878
+ // this.state.isScreenSwitching = false
1879
+ // }
1880
+ if (this.state.screenName == '共享屏幕') {
1877
1881
  this.state.isSharedScreen = true
1878
1882
  this.state.isScreenSwitching = false
1879
1883
  }
@@ -2747,6 +2751,9 @@ class Video extends Component {
2747
2751
  clearStreamRemain()
2748
2752
  this.test_controller.LeaveRoom()
2749
2753
  this.test_controller.Disconnect()
2754
+ setTimeout(() => {
2755
+ this.saveLocalLog();
2756
+ }, 500);
2750
2757
  try {
2751
2758
  beautySetMode('none');
2752
2759
  beautyStop();
@@ -2952,7 +2959,7 @@ class Video extends Component {
2952
2959
  }
2953
2960
  }
2954
2961
  componentWillMount() {
2955
- console.log('hsbc_teller_sdk', '1.9.25')
2962
+ console.log('hsbc_teller_sdk', '1.9.27')
2956
2963
  let arr = []
2957
2964
  for(let i=1;i<=12;i++){
2958
2965
  arr.push({
@@ -3047,6 +3054,25 @@ class Video extends Component {
3047
3054
  return true
3048
3055
  }
3049
3056
  };
3057
+ // 保存日志
3058
+ saveLocalLog = () => {
3059
+ const dat = new Date();
3060
+ //格式化时间
3061
+ const year = dat.getFullYear();
3062
+ const mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
3063
+ const day = dat.getDate() < 10 ? "0"+(dat.getDate()) : dat.getDate();
3064
+ const hour = dat.getHours() < 10 ? "0"+(dat.getHours()) : dat.getHours();
3065
+ const min = dat.getMinutes() < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
3066
+ const sec = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
3067
+
3068
+ const newDate = year +""+ mon +""+ day +"_"+ hour +""+ min +""+ sec;
3069
+ try {
3070
+ this.test_controller.DownloadLog('Log_'+ this.props.sessionId + '_' + newDate);
3071
+ } catch(err) {
3072
+ console.log('当前SDK版本暂不支持保存本地日志,请更新后重试')
3073
+ // this.messageClick('当前SDK版本暂不支持,请更新后重试', 'error')
3074
+ }
3075
+ }
3050
3076
  cameraClick = () => {
3051
3077
  if (this.isFileSuccuse()) {
3052
3078
  if (!this.state.audioed) {
@@ -3107,30 +3133,58 @@ class Video extends Component {
3107
3133
  streamShare = ''
3108
3134
  }
3109
3135
  if (this.state.isSharedScreen) {
3110
- const publish_config = {}
3136
+ this.test_controller.UnPublish(document.getElementById('video20').name)
3137
+ setTimeout(() => {
3111
3138
  publish_config.media_type = 1
3112
3139
  publish_config.publish_device = 2
3140
+ publish_config.need_volume_analyser = true
3113
3141
  publish_config.video_profile_type = 1
3114
- // publish_config.video_profile_type=100
3115
- // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3142
+ publish_config.desktopStreamToCanvas = false
3116
3143
  publish_config.enableDesktopAudio = true
3117
3144
  publish_config.degradationType = 2
3118
- publish_config.desktopStreamToCanvas = false
3119
- publish_config.sid = document.getElementById('video20').name
3120
- this.test_controller.ChangeMediaStream(publish_config)
3121
- this.state.isScreenSwitching = true
3145
+ publish_config.publish_video_id = 'video20'
3146
+ publish_config.publish_streamId_id = 'subscribe_streamId20'
3147
+ publish_config.publish_tag = 'projectionWhiteboard'
3148
+ this.test_controller.Publish(publish_config)
3149
+ }, 300);
3150
+ // const publish_config = {}
3151
+ // publish_config.media_type = 1
3152
+ // publish_config.publish_device = 2
3153
+ // publish_config.video_profile_type = 1
3154
+ // // publish_config.video_profile_type=100
3155
+ // // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3156
+ // publish_config.enableDesktopAudio = true
3157
+ // publish_config.degradationType = 2
3158
+ // publish_config.desktopStreamToCanvas = false
3159
+ // publish_config.sid = document.getElementById('video20').name
3160
+ // this.test_controller.ChangeMediaStream(publish_config)
3161
+ // this.state.isScreenSwitching = true
3122
3162
  } else {
3123
3163
  if (document.getElementById('video20').name) {
3124
- publish_config.media_type = 1;
3125
- publish_config.publish_device = 2;
3126
- publish_config.video_profile_type = 1
3127
- // publish_config.video_profile_type=100
3128
- // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3129
- publish_config.enableDesktopAudio = true
3130
- publish_config.desktopStreamToCanvas = false
3131
- publish_config.degradationType = 2
3132
- publish_config.sid = document.getElementById('video20').name;
3133
- this.test_controller.ChangeMediaStream(publish_config);
3164
+ this.test_controller.UnPublish(document.getElementById('video20').name)
3165
+ setTimeout(() => {
3166
+ publish_config.media_type = 1
3167
+ publish_config.publish_device = 2
3168
+ publish_config.need_volume_analyser = true
3169
+ publish_config.video_profile_type = 1
3170
+ publish_config.desktopStreamToCanvas = false
3171
+ publish_config.enableDesktopAudio = true
3172
+ publish_config.degradationType = 2
3173
+ publish_config.publish_video_id = 'video20'
3174
+ publish_config.publish_streamId_id = 'subscribe_streamId20'
3175
+ publish_config.publish_tag = 'projectionWhiteboard'
3176
+ this.test_controller.Publish(publish_config)
3177
+ }, 300);
3178
+ // publish_config.media_type = 1;
3179
+ // publish_config.publish_device = 2;
3180
+ // publish_config.video_profile_type = 1
3181
+ // // publish_config.video_profile_type=100
3182
+ // // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3183
+ // publish_config.enableDesktopAudio = true
3184
+ // publish_config.desktopStreamToCanvas = false
3185
+ // publish_config.degradationType = 2
3186
+ // publish_config.sid = document.getElementById('video20').name;
3187
+ // this.test_controller.ChangeMediaStream(publish_config);
3134
3188
  } else {
3135
3189
  publish_config.media_type = 1
3136
3190
  publish_config.publish_device = 2