mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 11:21:20 -08:00
4.1.4
This commit is contained in:
1 parent
d6ea0b2355
commit
072ba6e703
8 files changed
+27
-20
No files matched your search
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user