react_hsbc_teller 0.3.1 → 0.3.2

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": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -727,6 +727,17 @@ class Video extends Component {
727
727
  // 发布媒体流成功
728
728
  this.test_controller.OnPublishSucc = (sid) => {
729
729
  console.log('发布媒体流成功', sid)
730
+ if(sid == document.getElementById('video10').name) {
731
+ callNimIM('sendCustomCmdMsg', {
732
+ customId: this.state.imRoomId,
733
+ content: JSON.stringify({
734
+ 'typeId': 2030,
735
+ 'sessionId': this.state.sessionId,
736
+ 'sharedScreen': 1,
737
+ 'tellerId': this.props.tellerAccount
738
+ })
739
+ });
740
+ }
730
741
  };
731
742
  // 发布媒体流失败
732
743
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
@@ -778,7 +789,18 @@ class Video extends Component {
778
789
  };
779
790
  // 取消发布成功
780
791
  this.test_controller.OnUnPublishSucc = (sid) => {
781
- console.log('取消发布成功', sid)
792
+ console.log('取消发布成功', sid,document.getElementById('publish_video1').name)
793
+ if(sid != document.getElementById('publish_video1').name) {
794
+ callNimIM('sendCustomCmdMsg', {
795
+ customId: this.state.imRoomId,
796
+ content: JSON.stringify({
797
+ 'typeId': 2030,
798
+ 'sessionId': this.state.sessionId,
799
+ 'sharedScreen': 0,
800
+ 'tellerId': this.props.tellerAccount
801
+ })
802
+ })
803
+ }
782
804
  };
783
805
  // 取消订阅媒体流成功
784
806
  this.test_controller.OnUnSubscribeSucc = (sid) => {
@@ -965,36 +987,6 @@ class Video extends Component {
965
987
  // 切流成功通知
966
988
  this.test_controller.OnChangeMediaStreamSuccess = (sid) => {
967
989
  console.log('切流成功通知', sid);
968
- if (this.state.publishDevic == 2) {
969
- // 打开共享
970
- callNimIM('sendCustomCmdMsg', {
971
- customId: this.state.imRoomId,
972
- content: JSON.stringify({
973
- 'typeId': 2030,
974
- 'sessionId': this.state.sessionId,
975
- 'sharedScreen': 1,
976
- 'tellerId': this.props.tellerAccount
977
- })
978
- });
979
- this.setState({
980
- isSharedScreen: true,
981
- screenName: '取消共享'
982
- });
983
- } else {
984
- this.setState({
985
- isSharedScreen: false,
986
- screenName: '投屏'
987
- });
988
- callNimIM('sendCustomCmdMsg', {
989
- customId: this.state.imRoomId,
990
- content: JSON.stringify({
991
- 'typeId': 2030,
992
- 'sessionId': this.state.sessionId,
993
- 'sharedScreen': 0,
994
- 'tellerId': this.props.tellerAccount
995
- })
996
- })
997
- }
998
990
  };
999
991
  // 切流失败通知
1000
992
  this.test_controller.OnChangeMediaStreamFailed = (
@@ -1398,7 +1390,7 @@ class Video extends Component {
1398
1390
  publish_config.video_profile_type = 5
1399
1391
  publish_config.publish_video_id = 'video10'
1400
1392
  publish_config.publish_streamId_id = 'subscribe_streamId10'
1401
- publish_config.publish_tag = ''
1393
+ publish_config.publish_tag = 'projectionWhiteboard'
1402
1394
  this.test_controller.Publish(publish_config)
1403
1395
  }
1404
1396
 
@@ -1678,7 +1670,7 @@ class Video extends Component {
1678
1670
  publish_config.part_of_screen_id = 'touBoxItem';
1679
1671
  publish_config.publish_video_id = 'video10'
1680
1672
  publish_config.publish_streamId_id = 'subscribe_streamId10'
1681
- publish_config.publish_tag = ''
1673
+ publish_config.publish_tag = 'projectionWhiteboard'
1682
1674
  this.test_controller.Publish(publish_config)
1683
1675
  }
1684
1676
  } else{
@@ -1713,7 +1705,7 @@ class Video extends Component {
1713
1705
  <Spin spinning={this.state.loading} tip="视频初始化中...">
1714
1706
  <Header></Header>
1715
1707
  <div className="health">
1716
- <div className="projection" style={{ display: (this.state.isCustomer == 'noVideo') ? '' : 'none', }}>
1708
+ <div className="projection" style={{ display: (this.state.isCustomer) ? '' : 'none', }}>
1717
1709
  <div className="button">
1718
1710
  <div className={`${this.state.isSelect == 'video' ? 'selectSee' : "noSelest"}`} onClick={this.switchSelect.bind(this)}>视频画面</div>
1719
1711
  <div className={`${this.state.isSelect == 'noVideo' ? 'selectSee' : "noSelest"}`} onClick={this.switchSelect.bind(this)}>投屏白板</div>
@@ -1805,9 +1797,7 @@ class Video extends Component {
1805
1797
  </div>
1806
1798
 
1807
1799
  </div>
1808
- <div className={`itemed ${this.state.isBigVideo == 'video2' ? 'item1' : ""}`}>
1809
-
1810
- <div onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
1800
+ <div className={`itemed ${this.state.isBigVideo == 'video2' ? 'item1' : ""}`} onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
1811
1801
  <video
1812
1802
  id="video2"
1813
1803
  autoPlay
@@ -1818,7 +1808,6 @@ class Video extends Component {
1818
1808
  <label style={{ display: 'none' }} id="feedId2" type="text" />
1819
1809
  {/* <div className='customerTitle'>客户</div> */}
1820
1810
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClassOne" id="subscribe_volumeView2" width="40" height="70"></canvas>
1821
- </div>
1822
1811
  </div>
1823
1812
  <div className={`itemed ${this.state.isBigVideo == 'video3' ? 'item1' : ""}`}
1824
1813
  onClick={this.enlargeClick.bind(this, 'isLangVideo3')}>
@@ -79,8 +79,8 @@
79
79
  height: 100%;
80
80
  }
81
81
  .health{
82
- margin: 20px;
83
- height: ~"calc(100vh - 60px)";
82
+ margin: 20px 20px 0 20px;
83
+ height: ~"calc(100vh - 130px)";
84
84
  }
85
85
  .all{
86
86
  height: 100%;
@@ -144,7 +144,7 @@
144
144
  }
145
145
  .projection{
146
146
  width: 80%;
147
- height: 88%;
147
+ height: ~"calc(100vh - 130px)";
148
148
  position: absolute;
149
149
  z-index: 1;
150
150
  // background: #fff;