mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 05:41:20 -08:00
4.1.1
This commit is contained in:
1 parent
b582142ade
commit
3523cb2149
6 files changed
+21
-16
No files matched your search
@@ -11,13 +11,15 @@ export default function autoHeightMix(art, player) {
|
||||
if (value) {
|
||||
const { clientWidth } = $container;
|
||||
const { videoHeight, videoWidth } = $video;
|
||||
const height = videoHeight * (clientWidth / videoWidth) + 'px';
|
||||
setStyle($container, 'height', height);
|
||||
addClass($container, 'art-auto-height');
|
||||
art.emit('autoHeight', height);
|
||||
const height = videoHeight * (clientWidth / videoWidth);
|
||||
if (height) {
|
||||
setStyle($container, 'height', height + 'px');
|
||||
addClass($container, 'art-auto-height');
|
||||
art.emit('autoHeight', height);
|
||||
}
|
||||
} else {
|
||||
setStyle($container, 'height', null);
|
||||
removeClass($container, 'art-auto-size');
|
||||
removeClass($container, 'art-auto-height');
|
||||
art.emit('autoHeight');
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user