This commit is contained in:
Harvey committed 2021-12-31 18:20:51 +08:00
1 parent d6ea0b2355
commit 072ba6e703
8 files changed
+27 -20

No files matched your search

+7 -7
View File
@@ -2353,7 +2353,8 @@
}
function autoHeightMix(art, player) {
var _art$template = art.template,
var option = art.option,
_art$template = art.template,
$container = _art$template.$container,
$video = _art$template.$video;
var heightCache = $container.style.height;
@@ -2367,15 +2368,14 @@
var videoHeight = $video.videoHeight,
videoWidth = $video.videoWidth;
var height = videoHeight * (clientWidth / videoWidth);
if (height) {
setStyle($container, 'height', height + 'px');
addClass($container, 'art-auto-height');
art.emit('autoHeight', height);
}
setStyle($container, 'height', height + 'px');
addClass($container, 'art-auto-height');
player.autoSize = option.autoSize;
art.emit('autoHeight', height);
} else {
setStyle($container, 'height', heightCache);
removeClass($container, 'art-auto-height');
player.autoSize = option.autoSize;
art.emit('autoHeight');
}
}