ucservice 1.5.8 → 1.6.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "ucservice",
3
3
  "private": false,
4
- "version": "1.5.8",
4
+ "version": "1.6.1",
5
5
  "description": "统一通信服务",
6
6
  "main": "dist/ucservice.common.js",
7
7
  "style": "ucservice.css",
@@ -1337,7 +1337,8 @@
1337
1337
  let tel = item.video
1338
1338
  if (!tel&&item.id) {
1339
1339
  videoLi[index].querySelector('video').style = ''
1340
- videoLi[index].querySelector('.rotate-btn').setAttribute('rotate-index', 0)
1340
+ if(videoLi[index].querySelector('.rotate-btn'))
1341
+ videoLi[index].querySelector('.rotate-btn').setAttribute('rotate-index', 0)
1341
1342
  }else{
1342
1343
  let rotateIndex = $(videoLi[index]).find('button[name=rotateVideo]').attr('rotate-index')
1343
1344
  setTimeout(() => {
@@ -1366,7 +1367,8 @@
1366
1367
  let tel = item.video
1367
1368
  if (!tel&&item.id) {
1368
1369
  videoLi[index].querySelector('video').style = ''
1369
- videoLi[index].querySelector('.rotate-btn').setAttribute('rotate-index', 0)
1370
+ if(videoLi[index].querySelector('.rotate-btn'))
1371
+ videoLi[index].querySelector('.rotate-btn').setAttribute('rotate-index', 0)
1370
1372
  }else{
1371
1373
  let rotateIndex = $(videoLi[index]).find('button[name=rotateVideo]').attr('rotate-index')
1372
1374
  setTimeout(() => {
@@ -1665,9 +1667,11 @@
1665
1667
  me.VIDEO_DATA.forEach((item, index) => {
1666
1668
  let tel = item.video
1667
1669
  if (!tel&&item.id) {
1668
- videoLi[index].querySelector('video').style = ''
1670
+ if(videoLi[index]){
1671
+ videoLi[index].querySelector('video').style = ''
1669
1672
  if(videoLi[index].querySelector('.rotate-btn'))
1670
1673
  videoLi[index].querySelector('.rotate-btn').setAttribute('rotate-index', 0)
1674
+ }
1671
1675
  }
1672
1676
  })
1673
1677
  }
@@ -2212,6 +2216,7 @@
2212
2216
  },
2213
2217
 
2214
2218
  videoRotateSize(li, rotateIndex){
2219
+ if(!li) return
2215
2220
  let video = li.querySelector('video');
2216
2221
  let videoWidth = video.videoWidth;
2217
2222
  let videoHeight = video.videoHeight;
@@ -2775,7 +2780,8 @@
2775
2780
  '<div class="hide frame-decoded" id="frame-decoded-' + i + '"style="position:absolute;float:left;color:#fff;width:67%;z-index:1;top:135px;left:180px">网络信号不佳</div>' +
2776
2781
  '<div class="operate-btn">';
2777
2782
  //videoHtml +='<button type="button" class="unlock-video-btn hide" name="lockVideo"></button>';
2778
- checkUserMediaAvailable() && (videoHtml += '<button type="button" class="rotate-btn hide" name="rotateVideo" rotate-index="0" title="视频旋转"></button><button type="button" class="unsend-audio-btn hide" name="sendAudio"></button>');
2783
+ // checkUserMediaAvailable() &&
2784
+ videoHtml += '<button type="button" class="rotate-btn hide" name="rotateVideo" rotate-index="0" title="视频旋转"></button><button type="button" class="unsend-audio-btn hide" name="sendAudio"></button>';
2779
2785
  videoHtml += '<button type="button" class="unrecv-audio-btn hide" name="recvAudio"></button>' +
2780
2786
  '<button type="button" class="close-btn hide" name="closeVideo"></button>' +
2781
2787
  '</div>' +
@@ -3588,6 +3594,7 @@
3588
3594
  this.packetsLostSum = 0;
3589
3595
  this.packetsReceivedSum = 0;
3590
3596
  //清除显示的视频信息
3597
+ if(document.getElementById('info-' + (Number(this.index) + Number(1))))
3591
3598
  document.getElementById('info-' + (Number(this.index) + Number(1))).innerHTML = '';
3592
3599
  //隐藏视频信息
3593
3600
  this.tagBox.parent().find('.info').hide();