mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 05:41:20 -08:00
修复旋转计算错误
This commit is contained in:
1 parent
8754fea23d
commit
77c766416e
3 files changed
+16
-26
No files matched your search
@@ -23,11 +23,8 @@ export default function rotateMix(art, player) {
|
||||
$player.dataset.rotate = deg;
|
||||
|
||||
const getScaleValue = () => {
|
||||
const { clientWidth: videoWidth, clientHeight: videoHeight } = $video;
|
||||
const { clientWidth: playerWidth, clientHeight: playerHeight } = $player;
|
||||
const playerRatio = playerWidth / playerHeight;
|
||||
const videoRatio = videoWidth / videoHeight;
|
||||
return playerRatio > videoRatio ? playerWidth / videoHeight : playerHeight / videoWidth;
|
||||
const { videoWidth, videoHeight } = $video;
|
||||
return videoWidth > videoHeight ? videoHeight / videoWidth : videoWidth / videoHeight;
|
||||
};
|
||||
|
||||
let degValue = 0;
|
||||
|
||||
Reference in new issue
Block a user