react_hsbc_teller 1.9.23 → 1.9.25

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.23",
3
+ "version": "1.9.25",
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.23&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.25&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
 
@@ -1774,23 +1774,6 @@ class Video extends Component {
1774
1774
  if (publish_tag == 'tag1') {
1775
1775
  console.log('tag1', stream)
1776
1776
  let newStream = stream;
1777
- // if (stream.getVideoTracks()[0]) {
1778
- // await startBeauty(newStream);
1779
- // newStream = beautyCaptureStream();
1780
- // // 清理原始流
1781
- // newStream.oninactive = function () {
1782
- // clearOriginStream(stream);
1783
- // };
1784
- // newStream.getVideoTracks()[0].onended = function () {
1785
- // clearOriginStream(stream);
1786
- // };
1787
- // function clearOriginStream(stream) {
1788
- // stream.getTracks().forEach((track) => {
1789
- // track.stop();
1790
- // });
1791
- // stream = null;
1792
- // }
1793
- // };
1794
1777
  if (stream.getVideoTracks()[0]) {
1795
1778
  await startBeauty(newStream);
1796
1779
  newStream = beautyCaptureStream();
@@ -1817,10 +1800,26 @@ class Video extends Component {
1817
1800
  }
1818
1801
 
1819
1802
  if (publish_tag == 'projectionWhiteboard' && publish_device == 2) {
1820
- // this.graffiti()
1821
- console.log('projectionWhiteboard', stream)
1822
1803
  let newStream1 = stream;
1823
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
+ }
1824
1823
  if (this.state.operateShow) {
1825
1824
  await startMix(newStream1, 'mix');
1826
1825
 
@@ -1836,6 +1835,8 @@ class Video extends Component {
1836
1835
  }
1837
1836
 
1838
1837
  newStream1 = mixCaptureStream();
1838
+ newStream1.getVideoTracks()[0].contentHint = "text"; // 解决清晰度问题
1839
+
1839
1840
  console.log('projectionWhiteboard1', newStream1)
1840
1841
  // 清理原始流
1841
1842
  newStream1.oninactive = function () {
@@ -2951,7 +2952,7 @@ class Video extends Component {
2951
2952
  }
2952
2953
  }
2953
2954
  componentWillMount() {
2954
- console.log('hsbc_teller_sdk', '1.9.23')
2955
+ console.log('hsbc_teller_sdk', '1.9.25')
2955
2956
  let arr = []
2956
2957
  for(let i=1;i<=12;i++){
2957
2958
  arr.push({