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