ucservice 1.4.0 → 1.4.3

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.4.0",
4
+ "version": "1.4.3",
5
5
  "description": "统一通信服务",
6
6
  "main": "dist/ucservice.common.js",
7
7
  "style": "ucservice.css",
@@ -2085,15 +2085,15 @@
2085
2085
  video.style.position = 'absolute';
2086
2086
  video.style.transform = 'rotate(270deg)';
2087
2087
  if(videoWidth / videoHeight > liWidth / liHeight){ //视频横向留白
2088
+ $(video).css('width', 'auto');
2089
+ $(video).css('height', liWidth);
2090
+ $(video).css('left', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
2091
+ $(video).css('top', 'calc(-' + liWidth / 2 + ' / ' + vHeight + ' * ' + vWidth + 'px + ' + liWidth + 'px / 2)');
2092
+ }else { //视频纵向留白
2088
2093
  $(video).css('width', liHeight);
2089
2094
  $(video).css('height', 'auto');
2090
- $(video).css('left', 'calc(' + liWidth + ' / 2' + ' - ' + liHeight + ' / 2)');
2091
- $(video).css('top', 'calc(-' + liHeight / 2 + ' / ' + vWidth + ' * ' + vHeight + ' + ' + liHeight + ' / 2)');
2092
- }else { //视频纵向留白
2093
- $(video).css('height', liWidth);
2094
- $(video).css('width', 'auto');
2095
- $(video).css('left', 'calc(' + liHeight + ' / 2' + ' - ' + liWidth + ' / 2)');
2096
- $(video).css('top', 'calc(-' + liWidth / 2 + ' / ' + vHeight + ' * ' + vWidth + ' + ' + liWidth + ' / 2)');
2095
+ $(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
2096
+ $(video).css('top', 'calc(-' + liHeight / 2 + ' / ' + vWidth + ' * ' + vHeight + 'px + ' + liHeight + 'px / 2)');
2097
2097
  }
2098
2098
  }else if(rotateIndex == 2){ //2
2099
2099
  $(video).attr('class', 'video-box');
@@ -2108,15 +2108,15 @@
2108
2108
  video.style.position = 'absolute';
2109
2109
  video.style.transform = 'rotate(90deg)';
2110
2110
  if(videoWidth / videoHeight > liWidth / liHeight){ //视频横向留白
2111
+ $(video).css('width', 'auto');
2112
+ $(video).css('height', liWidth);
2113
+ $(video).css('left', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
2114
+ $(video).css('top', 'calc(-' + liWidth / 2 + ' / ' + vHeight + ' * ' + vWidth + 'px + ' + liWidth + 'px / 2)');
2115
+ }else { //视频纵向留白
2111
2116
  $(video).css('width', liHeight);
2112
2117
  $(video).css('height', 'auto');
2113
2118
  $(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
2114
2119
  $(video).css('top', 'calc(-' + liHeight / 2 + ' / ' + vWidth + ' * ' + vHeight + 'px + ' + liHeight + 'px / 2)');
2115
- }else { //视频纵向留白
2116
- $(video).css('height', liWidth);
2117
- $(video).css('width', 'auto');
2118
- $(video).css('left', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
2119
- $(video).css('top', 'calc(-' + liWidth / 2 + ' / ' + vHeight + ' * ' + vWidth + 'px + ' + liWidth + 'px / 2)');
2120
2120
  }
2121
2121
  }
2122
2122
  },
@@ -2205,7 +2205,8 @@
2205
2205
  videoFlagObj.find('button[name=rotateVideo]').click(function(){
2206
2206
  let rotateIndex = Number($(this).attr("rotate-index"));
2207
2207
  rotateIndex++
2208
- $(this).attr("rotate-index", rotateIndex % 4);
2208
+ rotateIndex %= 4
2209
+ $(this).attr("rotate-index", rotateIndex);
2209
2210
  let li = $(this).parent().parent()[0];
2210
2211
  me.videoRotateSize(li, rotateIndex)
2211
2212
  })