react_hsbc_teller 1.1.3 → 1.1.4

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.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -30,6 +30,7 @@ const LEAVE_TYPE = {
30
30
  let pictureInPictureVideo
31
31
  let mix_stream
32
32
  let worker
33
+ let streamShare
33
34
  message.config({
34
35
  getContainer: ()=>document.getElementById('allHSBC')
35
36
  })
@@ -157,11 +158,7 @@ class Video extends Component {
157
158
  });
158
159
  console.log(result);
159
160
  this.state.imRoomId = result.imRoomId,
160
- this.state.sessionId = result.sessionId,
161
- this.setState({
162
-
163
- loading: false,
164
- });
161
+ this.state.sessionId = result.sessionId;
165
162
  let publish_config = {}
166
163
  publish_config.media_type = 1
167
164
  publish_config.publish_device = 1
@@ -585,6 +582,9 @@ class Video extends Component {
585
582
  }
586
583
  };
587
584
  endSessionValue = () => {
585
+ if(streamShare) {
586
+ streamShare.getTracks().forEach(track => track.stop());
587
+ }
588
588
  this.finishSession()
589
589
 
590
590
  };
@@ -1588,6 +1588,10 @@ class Video extends Component {
1588
1588
  });
1589
1589
  }
1590
1590
  if(sid == document.getElementById('publish_video1').name) {
1591
+ this.setState({
1592
+
1593
+ loading: false,
1594
+ });
1591
1595
  this.enterRoom()
1592
1596
  this.timer = setInterval(
1593
1597
  () => {
@@ -2838,6 +2842,9 @@ class Video extends Component {
2838
2842
  console.log('投屏')
2839
2843
  if (this.isFileSuccuse()) {
2840
2844
  const publish_config = {};
2845
+ if(streamShare) {
2846
+ streamShare.getTracks().forEach(track => track.stop());
2847
+ }
2841
2848
  if (this.state.isSharedScreen) {
2842
2849
  // if (this.state.isWhiteboard) {
2843
2850
  // publish_config.publish_device = 4
@@ -3338,6 +3345,7 @@ class Video extends Component {
3338
3345
  })
3339
3346
  .then((stream) => {
3340
3347
  videoMedia.srcObject = stream;
3348
+ streamShare = stream
3341
3349
  stream.getVideoTracks()[0].onended = async ()=>{
3342
3350
  //单击停止共享按钮后,触发这个事件
3343
3351
  if(document.getElementById('video20').name && !this.state.isSharedScreen) {
@@ -3421,6 +3429,7 @@ class Video extends Component {
3421
3429
  })
3422
3430
  .then((stream) => {
3423
3431
  videoMedia.srcObject = stream;
3432
+ streamShare = stream
3424
3433
  stream.getVideoTracks()[0].onended = async ()=>{
3425
3434
  //单击停止共享按钮后,触发这个事件
3426
3435
  if(document.getElementById('video20').name&&!this.state.isSharedScreen) {
@@ -3492,7 +3501,7 @@ class Video extends Component {
3492
3501
  var box=document.getElementById("whiteboardDIV");
3493
3502
  if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
3494
3503
  this.state.whiteboardWidth = box.offsetWidth,
3495
- this.state.whiteboardHeight = box.offsetHeight - 33,
3504
+ this.state.whiteboardHeight = box.offsetHeight * 0.92,
3496
3505
  console.log('whiteboardDIV', this.state.whiteboardHeight,box.clientHeight,this.state.whiteboardWidth)
3497
3506
  }
3498
3507
  }
@@ -4169,7 +4178,7 @@ class Video extends Component {
4169
4178
  ></CanvasDraw>
4170
4179
  </div>
4171
4180
  </Modal>
4172
- <Modal title="设置视频设备" closable={false} centered={true} visible={this.state.isModalVisibleInspection} footer={[
4181
+ <Modal title="设置视频设备" width={650} closable={false} centered={true} visible={this.state.isModalVisibleInspection} footer={[
4173
4182
  <div key='inspection'>
4174
4183
  <Button className="modelButtonCancel" onClick={this.handleCancelInspection}>取消</Button>
4175
4184
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkInspection}>确定</Button>
@@ -4184,7 +4193,7 @@ class Video extends Component {
4184
4193
  this.state.speakerList.length > 0 &&
4185
4194
  <span>
4186
4195
  <div>扬声器:
4187
- <span className='speakerTitle'>(请更改系统设置)</span>
4196
+ <span className='speakerTitle'>(此为默认选项。若需切换,请在平板电脑右下角任务栏中的Speaker设置中调整)</span>
4188
4197
  </div>
4189
4198
  {speaker}
4190
4199
  </span>