ucservice 2.5.3 → 2.5.5
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 +42 -33
- package/dist/ucservice.common.js.gz +0 -0
- package/dist/ucservice.common.js.map +1 -1
- package/dist/ucservice.umd.js +42 -33
- 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/dist/ucservice.common.js
CHANGED
|
@@ -14172,19 +14172,33 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
14172
14172
|
videoRotateSize(li, rotateIndex) {
|
|
14173
14173
|
if (!li) return;
|
|
14174
14174
|
let video = li.querySelector('video');
|
|
14175
|
+
let isScale = video.classList.contains('scale-scene');
|
|
14176
|
+
|
|
14177
|
+
if (isScale) {
|
|
14178
|
+
if (rotateIndex == 0 || rotateIndex == 2) {
|
|
14179
|
+
$(video).css('height', '100%');
|
|
14180
|
+
$(video).css('width', '100%');
|
|
14181
|
+
} else if (rotateIndex == 1 || rotateIndex == 3) {
|
|
14182
|
+
$(video).css('height', liWidth);
|
|
14183
|
+
$(video).css('width', liHeight);
|
|
14184
|
+
}
|
|
14185
|
+
}
|
|
14186
|
+
|
|
14175
14187
|
let videoWidth = video.videoWidth;
|
|
14176
14188
|
let videoHeight = video.videoHeight;
|
|
14177
14189
|
let vWidth = video.offsetWidth;
|
|
14178
14190
|
let vHeight = video.offsetHeight;
|
|
14179
14191
|
let liWidth = li.offsetWidth;
|
|
14180
14192
|
let liHeight = li.offsetHeight;
|
|
14181
|
-
let isScale = video.classList.contains('scale-scene');
|
|
14182
14193
|
|
|
14183
14194
|
if (rotateIndex == 0) {
|
|
14184
14195
|
//0
|
|
14185
14196
|
// $(video).attr('class', 'video-box');
|
|
14186
|
-
|
|
14187
|
-
|
|
14197
|
+
if (!isScale) {
|
|
14198
|
+
$(video).css('height', 'auto');
|
|
14199
|
+
$(video).css('width', 'auto');
|
|
14200
|
+
}
|
|
14201
|
+
|
|
14188
14202
|
$(video).css('max-height', '100%');
|
|
14189
14203
|
$(video).css('max-width', '100%');
|
|
14190
14204
|
video.style.position = 'absolute';
|
|
@@ -14192,11 +14206,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
14192
14206
|
$(video).css('top', '50%');
|
|
14193
14207
|
if (videoWidth / videoHeight < liWidth / liHeight) $(video).css('height', '100%');else $(video).css('width', '100%');
|
|
14194
14208
|
video.style.transform = 'translate(-50%, -50%)';
|
|
14195
|
-
|
|
14196
|
-
if (isScale) {
|
|
14197
|
-
$(video).css('height', '100%');
|
|
14198
|
-
$(video).css('width', '100%');
|
|
14199
|
-
}
|
|
14200
14209
|
} else if (rotateIndex == 3) {
|
|
14201
14210
|
//3
|
|
14202
14211
|
// $(video).attr('class', 'video-box');
|
|
@@ -14207,27 +14216,31 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
14207
14216
|
|
|
14208
14217
|
if (videoHeight * liHeight / videoWidth < liWidth) {
|
|
14209
14218
|
//视频横向留白
|
|
14210
|
-
|
|
14211
|
-
|
|
14219
|
+
if (!isScale) {
|
|
14220
|
+
$(video).css('width', liHeight);
|
|
14221
|
+
$(video).css('height', 'auto');
|
|
14222
|
+
}
|
|
14223
|
+
|
|
14212
14224
|
$(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
|
|
14213
14225
|
$(video).css('top', 'calc(-' + videoHeight * liHeight / videoWidth / 2 + 'px + ' + liHeight + 'px / 2)');
|
|
14214
14226
|
} else {
|
|
14215
14227
|
//视频纵向留白
|
|
14216
|
-
|
|
14217
|
-
|
|
14228
|
+
if (!isScale) {
|
|
14229
|
+
$(video).css('width', 'auto');
|
|
14230
|
+
$(video).css('height', liWidth);
|
|
14231
|
+
}
|
|
14232
|
+
|
|
14218
14233
|
$(video).css('left', 'calc(-' + videoWidth * liWidth / videoHeight / 2 + 'px + ' + liWidth + 'px / 2)');
|
|
14219
14234
|
$(video).css('top', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
|
|
14220
14235
|
}
|
|
14221
|
-
|
|
14222
|
-
if (isScale) {
|
|
14223
|
-
$(video).css('height', liWidth);
|
|
14224
|
-
$(video).css('width', liHeight);
|
|
14225
|
-
}
|
|
14226
14236
|
} else if (rotateIndex == 2) {
|
|
14227
14237
|
//2
|
|
14228
14238
|
// $(video).attr('class', 'video-box');
|
|
14229
|
-
|
|
14230
|
-
|
|
14239
|
+
if (!isScale) {
|
|
14240
|
+
$(video).css('height', 'auto');
|
|
14241
|
+
$(video).css('width', 'auto');
|
|
14242
|
+
}
|
|
14243
|
+
|
|
14231
14244
|
$(video).css('max-height', '100%');
|
|
14232
14245
|
$(video).css('max-width', '100%');
|
|
14233
14246
|
video.style.position = 'absolute';
|
|
@@ -14235,11 +14248,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
14235
14248
|
$(video).css('top', '50%');
|
|
14236
14249
|
if (videoWidth / videoHeight < liWidth / liHeight) $(video).css('height', '100%');else $(video).css('width', '100%');
|
|
14237
14250
|
video.style.transform = 'translate(-50%, -50%) rotate(180deg)';
|
|
14238
|
-
|
|
14239
|
-
if (isScale) {
|
|
14240
|
-
$(video).css('height', '100%');
|
|
14241
|
-
$(video).css('width', '100%');
|
|
14242
|
-
}
|
|
14243
14251
|
} else if (rotateIndex == 1) {
|
|
14244
14252
|
//1
|
|
14245
14253
|
// $(video).attr('class', 'video-box');
|
|
@@ -14250,22 +14258,23 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
14250
14258
|
|
|
14251
14259
|
if (videoHeight * liHeight / videoWidth < liWidth) {
|
|
14252
14260
|
//视频横向留白
|
|
14253
|
-
|
|
14254
|
-
|
|
14261
|
+
if (!isScale) {
|
|
14262
|
+
$(video).css('width', liHeight);
|
|
14263
|
+
$(video).css('height', 'auto');
|
|
14264
|
+
}
|
|
14265
|
+
|
|
14255
14266
|
$(video).css('left', 'calc(' + liWidth + 'px / 2' + ' - ' + liHeight + 'px / 2)');
|
|
14256
14267
|
$(video).css('top', 'calc(-' + videoHeight * liHeight / videoWidth / 2 + 'px + ' + liHeight + 'px / 2)');
|
|
14257
14268
|
} else {
|
|
14258
14269
|
//视频纵向留白
|
|
14259
|
-
|
|
14260
|
-
|
|
14270
|
+
if (!isScale) {
|
|
14271
|
+
$(video).css('width', 'auto');
|
|
14272
|
+
$(video).css('height', liWidth);
|
|
14273
|
+
}
|
|
14274
|
+
|
|
14261
14275
|
$(video).css('left', 'calc(-' + videoWidth * liWidth / videoHeight / 2 + 'px + ' + liWidth + 'px / 2)');
|
|
14262
14276
|
$(video).css('top', 'calc(' + liHeight + 'px / 2' + ' - ' + liWidth + 'px / 2)');
|
|
14263
14277
|
}
|
|
14264
|
-
|
|
14265
|
-
if (isScale) {
|
|
14266
|
-
$(video).css('height', liWidth);
|
|
14267
|
-
$(video).css('width', liHeight);
|
|
14268
|
-
}
|
|
14269
14278
|
}
|
|
14270
14279
|
},
|
|
14271
14280
|
|
|
Binary file
|