ucservice 1.4.6 → 1.4.9
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/dist/ucservice.common.js +18 -8
- package/dist/ucservice.common.js.gz +0 -0
- package/dist/ucservice.common.js.map +1 -1
- package/dist/ucservice.umd.js +18 -8
- package/dist/ucservice.umd.js.gz +0 -0
- package/dist/ucservice.umd.js.map +1 -1
- package/dist/ucservice.umd.min.js +1 -1
- package/dist/ucservice.umd.min.js.gz +0 -0
- package/dist/ucservice.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/scooper.video.js +17 -10
package/package.json
CHANGED
package/src/scooper.video.js
CHANGED
|
@@ -612,9 +612,6 @@
|
|
|
612
612
|
me.dispatch('screenchange',{windowNums: num});
|
|
613
613
|
me._opts.windows = num;
|
|
614
614
|
me._opts.extra = extra;
|
|
615
|
-
|
|
616
|
-
//设置旋转了的视频样式
|
|
617
|
-
|
|
618
615
|
},
|
|
619
616
|
|
|
620
617
|
/**
|
|
@@ -1594,12 +1591,22 @@
|
|
|
1594
1591
|
//分屏切换事件
|
|
1595
1592
|
this.dispatch('screenchange', {windowNums:num, flag:me._opts.flag});
|
|
1596
1593
|
|
|
1594
|
+
//设置旋转了的视频样式
|
|
1595
|
+
let videoLi = document.getElementById('videoRef').querySelectorAll('li')
|
|
1596
|
+
me.VIDEO_DATA.forEach((item, index) => {
|
|
1597
|
+
let tel = item.video
|
|
1598
|
+
if (!tel&&item.id) {
|
|
1599
|
+
videoLi[index].querySelector('video').style = ''
|
|
1600
|
+
videoLi[index].querySelector('.rotate-btn').setAttribute('rotate-index', 0)
|
|
1601
|
+
}
|
|
1602
|
+
})
|
|
1597
1603
|
//设置旋转视频的样式
|
|
1598
1604
|
for(let k = 0; k < _li.length; k++){
|
|
1599
1605
|
let rotateIndex = _li.eq(k).find('button[name=rotateVideo]').attr('rotate-index');
|
|
1600
1606
|
if(rotateIndex != 0 && rotateIndex != 2)
|
|
1601
1607
|
me.videoRotateSize(_li.eq(k)[0], rotateIndex);
|
|
1602
1608
|
}
|
|
1609
|
+
|
|
1603
1610
|
},
|
|
1604
1611
|
|
|
1605
1612
|
/**
|
|
@@ -2091,13 +2098,13 @@
|
|
|
2091
2098
|
if(videoHeight * liHeight / videoWidth < liWidth){ //视频横向留白
|
|
2092
2099
|
$(video).css('width', liHeight);
|
|
2093
2100
|
$(video).css('height', 'auto');
|
|
2094
|
-
$(video).css('left', 'calc(' +
|
|
2095
|
-
$(video).css('top', 'calc(-' +
|
|
2101
|
+
$(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
|
|
2102
|
+
$(video).css('top', 'calc(-' + videoHeight * liHeight / videoWidth / 2 + 'px + ' + liHeight + 'px / 2)');
|
|
2096
2103
|
}else { //视频纵向留白
|
|
2097
2104
|
$(video).css('width', 'auto');
|
|
2098
2105
|
$(video).css('height', liWidth);
|
|
2099
|
-
$(video).css('left', 'calc(' + liWidth
|
|
2100
|
-
$(video).css('top', 'calc(
|
|
2106
|
+
$(video).css('left', 'calc(-' + videoWidth * liWidth / videoHeight / 2 + 'px + ' + liWidth + 'px / 2)');
|
|
2107
|
+
$(video).css('top', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
|
|
2101
2108
|
}
|
|
2102
2109
|
}else if(rotateIndex == 2){ //2
|
|
2103
2110
|
$(video).attr('class', 'video-box');
|
|
@@ -2119,12 +2126,12 @@
|
|
|
2119
2126
|
$(video).css('width', liHeight);
|
|
2120
2127
|
$(video).css('height', 'auto');
|
|
2121
2128
|
$(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
|
|
2122
|
-
$(video).css('top', 'calc(-' +
|
|
2129
|
+
$(video).css('top', 'calc(-' + videoHeight * liHeight / videoWidth / 2 + 'px + ' + liHeight + 'px / 2)');
|
|
2123
2130
|
}else { //视频纵向留白
|
|
2124
2131
|
$(video).css('width', 'auto');
|
|
2125
2132
|
$(video).css('height', liWidth);
|
|
2126
|
-
$(video).css('left', 'calc(' + liWidth
|
|
2127
|
-
$(video).css('top', 'calc(
|
|
2133
|
+
$(video).css('left', 'calc(-' + videoWidth * liWidth / videoHeight / 2 + 'px + ' + liWidth + 'px / 2)');
|
|
2134
|
+
$(video).css('top', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
|
|
2128
2135
|
}
|
|
2129
2136
|
}
|
|
2130
2137
|
},
|