react_hsbc_teller 1.9.24 → 1.9.26

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.24",
3
+ "version": "1.9.26",
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.24&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.26&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
 
@@ -1802,6 +1802,24 @@ class Video extends Component {
1802
1802
  if (publish_tag == 'projectionWhiteboard' && publish_device == 2) {
1803
1803
  let newStream1 = stream;
1804
1804
  if (stream.getVideoTracks()[0]) {
1805
+ try {
1806
+ console.log('共享')
1807
+ console.log(stream.getVideoTracks()[0])
1808
+ if ( stream.getVideoTracks()[0] instanceof BrowserCaptureMediaStreamTrack) {
1809
+ console.log('tab共享')
1810
+ this.saveLog('Share type = tab')
1811
+ } else if (stream.getVideoTracks()[0] instanceof MediaStreamTrack && stream.getVideoTracks()[0].label.includes('screen')) {
1812
+ console.log('屏幕共享')
1813
+ this.saveLog('Share type = screen')
1814
+ } else if (stream.getVideoTracks()[0].label.includes('window')){
1815
+ console.log('窗口共享')
1816
+ this.saveLog('Share type = window')
1817
+ }
1818
+ } catch (err) {
1819
+ console.log('不支持此浏览器记录投屏类型日志')
1820
+ console.log(navigator.userAgent)
1821
+ console.log(err)
1822
+ }
1805
1823
  if (this.state.operateShow) {
1806
1824
  await startMix(newStream1, 'mix');
1807
1825
 
@@ -1855,7 +1873,11 @@ class Video extends Component {
1855
1873
  'tellerId': this.props.tellerAccount
1856
1874
  })
1857
1875
  });
1858
- 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 == '共享屏幕') {
1859
1881
  this.state.isSharedScreen = true
1860
1882
  this.state.isScreenSwitching = false
1861
1883
  }
@@ -2934,7 +2956,7 @@ class Video extends Component {
2934
2956
  }
2935
2957
  }
2936
2958
  componentWillMount() {
2937
- console.log('hsbc_teller_sdk', '1.9.24')
2959
+ console.log('hsbc_teller_sdk', '1.9.26')
2938
2960
  let arr = []
2939
2961
  for(let i=1;i<=12;i++){
2940
2962
  arr.push({
@@ -3089,30 +3111,58 @@ class Video extends Component {
3089
3111
  streamShare = ''
3090
3112
  }
3091
3113
  if (this.state.isSharedScreen) {
3092
- const publish_config = {}
3114
+ this.test_controller.UnPublish(document.getElementById('video20').name)
3115
+ setTimeout(() => {
3093
3116
  publish_config.media_type = 1
3094
3117
  publish_config.publish_device = 2
3118
+ publish_config.need_volume_analyser = true
3095
3119
  publish_config.video_profile_type = 1
3096
- // publish_config.video_profile_type=100
3097
- // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3120
+ publish_config.desktopStreamToCanvas = false
3098
3121
  publish_config.enableDesktopAudio = true
3099
3122
  publish_config.degradationType = 2
3100
- publish_config.desktopStreamToCanvas = false
3101
- publish_config.sid = document.getElementById('video20').name
3102
- this.test_controller.ChangeMediaStream(publish_config)
3103
- this.state.isScreenSwitching = true
3123
+ publish_config.publish_video_id = 'video20'
3124
+ publish_config.publish_streamId_id = 'subscribe_streamId20'
3125
+ publish_config.publish_tag = 'projectionWhiteboard'
3126
+ this.test_controller.Publish(publish_config)
3127
+ }, 300);
3128
+ // const publish_config = {}
3129
+ // publish_config.media_type = 1
3130
+ // publish_config.publish_device = 2
3131
+ // publish_config.video_profile_type = 1
3132
+ // // publish_config.video_profile_type=100
3133
+ // // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3134
+ // publish_config.enableDesktopAudio = true
3135
+ // publish_config.degradationType = 2
3136
+ // publish_config.desktopStreamToCanvas = false
3137
+ // publish_config.sid = document.getElementById('video20').name
3138
+ // this.test_controller.ChangeMediaStream(publish_config)
3139
+ // this.state.isScreenSwitching = true
3104
3140
  } else {
3105
3141
  if (document.getElementById('video20').name) {
3106
- publish_config.media_type = 1;
3107
- publish_config.publish_device = 2;
3108
- publish_config.video_profile_type = 1
3109
- // publish_config.video_profile_type=100
3110
- // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3111
- publish_config.enableDesktopAudio = true
3112
- publish_config.desktopStreamToCanvas = false
3113
- publish_config.degradationType = 2
3114
- publish_config.sid = document.getElementById('video20').name;
3115
- this.test_controller.ChangeMediaStream(publish_config);
3142
+ this.test_controller.UnPublish(document.getElementById('video20').name)
3143
+ setTimeout(() => {
3144
+ publish_config.media_type = 1
3145
+ publish_config.publish_device = 2
3146
+ publish_config.need_volume_analyser = true
3147
+ publish_config.video_profile_type = 1
3148
+ publish_config.desktopStreamToCanvas = false
3149
+ publish_config.enableDesktopAudio = true
3150
+ publish_config.degradationType = 2
3151
+ publish_config.publish_video_id = 'video20'
3152
+ publish_config.publish_streamId_id = 'subscribe_streamId20'
3153
+ publish_config.publish_tag = 'projectionWhiteboard'
3154
+ this.test_controller.Publish(publish_config)
3155
+ }, 300);
3156
+ // publish_config.media_type = 1;
3157
+ // publish_config.publish_device = 2;
3158
+ // publish_config.video_profile_type = 1
3159
+ // // publish_config.video_profile_type=100
3160
+ // // publish_config.video_profile_diy={width:1280, height:720, frameRate:8, bitrate:1500}
3161
+ // publish_config.enableDesktopAudio = true
3162
+ // publish_config.desktopStreamToCanvas = false
3163
+ // publish_config.degradationType = 2
3164
+ // publish_config.sid = document.getElementById('video20').name;
3165
+ // this.test_controller.ChangeMediaStream(publish_config);
3116
3166
  } else {
3117
3167
  publish_config.media_type = 1
3118
3168
  publish_config.publish_device = 2