mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-14 16:36:18 -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
@@ -2374,13 +2374,16 @@
|
||||
var clientWidth = $container.clientWidth;
|
||||
var videoHeight = $video.videoHeight,
|
||||
videoWidth = $video.videoWidth;
|
||||
var height = videoHeight * (clientWidth / videoWidth) + 'px';
|
||||
setStyle($container, 'height', height);
|
||||
addClass($container, 'art-auto-height');
|
||||
art.emit('autoHeight', height);
|
||||
var 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